Re: genrecog: ran out of alphabet

2009-06-17 Thread Ian Lance Taylor
DJ Delorie writes: > genrecog uses strings to keep track of where it is, specifically, > digits and letters. I've got an insn that writes to more than 26 > registers. Would switching to something bigger than [A-Z] be > difficult? Perhaps using Japanese letters instead of English? ;-) That so

Re: Rationale for an old TRUNCATE patch

2009-06-17 Thread Ian Lance Taylor
Adam Nemet writes: > Ian Lance Taylor writes: >> truncate has a machine independent meaning. > > Yes, I guess with your definition below it does. It's interesting though that > Jim had said the opposite in the excerpts posted by Jeff: > > And a later messag

Re: AVR C++ - how to move vtables into FLASH memory

2009-06-17 Thread Ian Lance Taylor
Tomasz Francuz writes: > Ok, I’ve studied a little bit gcc sources, I’ve found sections > responsible for generating different register loading instructions, > and indeed there is no information telling to the compiler how to load > data >> From FLASH. This is easy to correct, I suppose. But I h

Re: 4.3 weekly snapshots bot broken?

2009-06-17 Thread Ian Lance Taylor
Dave Korn writes: > Joseph S. Myers wrote: >> On Wed, 17 Jun 2009, Kai Henningsen wrote: >> >>> Joseph S. Myers schrieb: If you are interested in following the fine points of breakage of individual snapshots or other individual jobs run from cron, you should follow the gccad

Re: Rationale for an old TRUNCATE patch

2009-06-17 Thread Ian Lance Taylor
Adam Nemet writes: > Ian Lance Taylor writes: >> I'm not entirely sure, but I don't think Jim said the opposite. He said >> that the way truncate works is machine dependent. I said that the >> output of truncate is machine independent. Since truncate is only &

Re: genrecog: ran out of alphabet

2009-06-17 Thread Ian Lance Taylor
DJ Delorie writes: >> That sounds like an awkward insn. > > The opcode swaps two register banks. 32 SETs total. Perhaps you can cheat by using larger modes. E.g., if it's a 32-bit machine, using DImode will cut the number of operands in half. Ian

Should -Wjump-misses-init be in -Wall?

2009-06-19 Thread Ian Lance Taylor
I recently added the new -Wjump-misses-init warning option. It warns when a goto or switch jumps into the scope of an initialized variable without actually initializing the variable. I added the warning to -Wall because it seems to me to fit the criteria of -Wall: a dubious code practice which is

Re: Should -Wjump-misses-init be in -Wall?

2009-06-20 Thread Ian Lance Taylor
Basile STARYNKEVITCH writes: > Ian Lance Taylor wrote: >> I recently added the new -Wjump-misses-init warning option. It warns >> when a goto or switch jumps into the scope of an initialized variable >> without actually initializing the variable. I added the warning t

Re: Should -Wjump-misses-init be in -Wall?

2009-06-20 Thread Ian Lance Taylor
Ralf Wildenhues writes: > * Ian Lance Taylor wrote on Sat, Jun 20, 2009 at 07:12:50AM CEST: >> Any opinions on this? Should I take the new warning out of -Wall? > > Is the missing of an initialization detected elsewhere, or can it be > detected elsewhere, maybe only in cases

Re: Should -Wjump-misses-init be in -Wall?

2009-06-20 Thread Ian Lance Taylor
Jeff Law writes: > I think (as always) we need to find a balance between throwing > everything *we* find valuable in -Wall and avoiding all changes to > accommodate users on the other end of the spectrum. With that in mind > I'd ask Ian to chime in and say something about the # of warnings we >

Re: Should -Wjump-misses-init be in -Wall?

2009-06-23 Thread Ian Lance Taylor
Paolo Bonzini writes: > I don't think this warning can report anything that -Wuninitialized > cannot report, so it should go in -Wc++-compat only. For the record, it can, as in when compiling this case without optimization. This is not a strong example by any means. extern void f2 (int *); int

Re: TEMPLATE_PARM_PARAMETER_PACK redundant check in find_parameter_packs_r

2009-06-23 Thread Ian Lance Taylor
Larry Evans writes: > At pt.c:2462 > > http://gcc.gnu.org/viewcvs/trunk/gcc/cp/pt.c?revision=148666&view=markup > > there's: > > switch (TREE_CODE (t)) > { > case TEMPLATE_PARM_INDEX: > if (TEMPLATE_PARM_PARAMETER_PACK (t)) > parameter_pack_p = true; > break; > > In

Phase 1 of gcc-in-cxx now complete

2009-06-25 Thread Ian Lance Taylor
I am pleased to report that if you configure gcc with --enable-build-with-cxx, which causes the core compiler to be built using a C++ compiler, a bootstrap on x86_64-unknown-linux-gnu now completes. I would like to encourage people to try using --enable-build-with-cxx in other configuration--other

Re: Phase 1 of gcc-in-cxx now complete (Ada)

2009-06-25 Thread Ian Lance Taylor
Richard Guenther writes: >> I guess this has to do with reserved word conflict on "new": >> >> << >> tree >> substitute_in_type (tree t, tree f, tree r) >> { >>  tree new; >> >> Do you have some way to deal with this? > > Use a non-reserved identifier. I guess on trunk Ada doesn't build > w

Re: Phase 1 of gcc-in-cxx now complete (Ada)

2009-06-25 Thread Ian Lance Taylor
Laurent GUERBY writes: > Wanting to test Ada on the branch, after checkout I did on x86_64-linux: > > ../gcc/configure --enable-languages=c,c++,ada --enable-__cxa_atexit > --disable-nls --enable-threads=posix --with-mpfr=/opt/cfarm/mpfr-2.4.1/ > --with-gmp=/opt/cfarm/gmp-4.2.4/ --prefix=/n/16/gu

Re: Phase 1 of gcc-in-cxx now complete (Ada)

2009-06-26 Thread Ian Lance Taylor
Laurent GUERBY writes: > What is the way forward: fixing in some way the Ada Makefile? Or doing > search and replace in case of keyword/identifier conflict? If > search/replace, do AdaCore people have an opinion on the best way > to proceed to avoid maintenance issues in the various trees? (eg: c

Re: Phase 1 of gcc-in-cxx now complete (Ada)

2009-06-26 Thread Ian Lance Taylor
Laurent GUERBY writes: > Next issue is that gnat1 link fails on many missing symbols: > > ada/b_gnat1.o: In function `adainit()': > ada/b_gnat1.c:287: undefined reference to `system__soft_links___elabb()' > ada/b_gnat1.c:291: undefined reference to > `system__secondary_stack___elabb()' > > a

Re: Phase 1 of gcc-in-cxx now complete (Ada)

2009-06-26 Thread Ian Lance Taylor
Robert Dewar writes: > Ian Lance Taylor wrote: > >> I think the function to change is Gen_Output_File_C in bindgen.adb. > > I don't really see any urgency for this change, yes gnatbind has > the option to generate C, but it is not the normal path, and only > of use i

Re: unsigned integer wrap 'trap'.

2009-06-26 Thread Ian Lance Taylor
samboy writes: > I have a storage application to which I can record or retrieve files. Its > multi-process C/C++ compiled > to run on the SPARC platform. The problem is the maximum file size which can > be stored is 4GB due to > the size being internally conveyed using an unsigned integer. I ne

Re: Phase 1 of gcc-in-cxx now complete (Ada)

2009-06-26 Thread Ian Lance Taylor
Arnaud Charlet writes: >> Switching gnatbind to generate Ada if there's nothing against >> it might be a better solution since stage1 uses the system gnatbind, so >> a patch to current gnatbind will not help (unless we push it to branches >> and tell user to install a fairly recent gnatbind first

Re: Phase 1 of gcc-in-cxx now complete

2009-06-26 Thread Ian Lance Taylor
Matt writes: >> * Develop some trial patches which require C++, e.g., convert VEC to >> std::vector. > > Do you have any ideas for the easiest starting points? Is there > anywhere that is decently self-contained, or will if have to be a big > bang? Thanks for your interest. I think the one I m

Re: Phase 1 of gcc-in-cxx now complete

2009-06-27 Thread Ian Lance Taylor
Richard Guenther writes: > All that above said - do you expect us to carry both vec.h (for VEC in > GC memory) and std::vector (for VECs in heap memory) (and vec.h > for the alloca trick ...)? Or do you think we should try to make the GTY > machinery C++ aware and annotate the standard library (

Re: Exploring gcc-in-cxx compiler build requirements

2009-06-29 Thread Ian Lance Taylor
Jerry Quinn writes: > Both 3.1.1 and 3.2.3 fail to bootstrap with the following error: > > make[1]: Entering directory `/home/jlquinn/gcc/dev/build/gcc323/gcc' > gcc -c -DIN_GCC--std=gnu89 -W -Wall -Wwrite-strings > -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic > -Wno-long-

Re: How to deal with unrecognizable RTL code

2009-06-29 Thread Ian Lance Taylor
"daniel.tian" writes: > I check the MIPS and ARM, both those cc1 files opened in Insight debug tool > contain the mips.md and arm.md file. It is convenient while break point can > be set in it. > My port md file doesn't appear in the insight. You seem to be asking a question about Insight rather

Re: PR 23296: Strange -O3 -finstrument-functions behaviour

2009-06-29 Thread Ian Lance Taylor
Richard Sandiford writes: > Is this really the intended behaviour? Andrew closed the bug as invalid, > saying that this is what we expect, but the docs seem to suggest that we > ought to do something like: > > ... > __cyg_profile_func_enter (&main, ...); > ... > __cyg_profile_fun

Re: Base register restrictions

2009-06-29 Thread Ian Lance Taylor
Dobes writes: > I am working on a port to an architecture with some strict rules. The > restriction that I am unable to figure out how to enforce is a base register > that is allowed in the destination operand, but not in a source operand. > For example, this would be allowed "add 4($1), $8, $9

Re: A small (preprocessor) problem, and a modest enhancement proposal

2009-07-01 Thread Ian Lance Taylor
"Ronald F. Guilmette" writes: > I'd like to propose a small enhancement for the GNU preprocessor, i.e. > the addition of a new __MACRO__ pre-defined built-in symbol. We support the __COUNTER__ macro these days. To get __COUNTER__ to be expaned as you wish, you have to pass it through another ma

Re: -fstack-limit-register not work for ARM?

2009-07-01 Thread Ian Lance Taylor
Haitao Zhang writes: > we recently use GCC 4.3.3 to build userland application use ARM EABI, > for running on a ARM7TDMI, mmuless platform. > > after explicit compile application with -fstack-limit-register=R10, > there is no binary change with or without this option. Does this option work? > > a

Re: -fstack-limit-register not work for ARM?

2009-07-01 Thread Ian Lance Taylor
Jun Sun writes: > If you or someone could point out where are the code section is for > adding this support for those arches, or even better, provide some > hints for us to search the related svn history, that would be really > helpful. We might get brave enough to add this code for ARM (probably

Re: About feasibility of implementing an instruction

2009-07-02 Thread Ian Lance Taylor
Mohamed Shafi writes: > I just want to know about the feasibility of implementing an > instruction for a port in gcc 4.4 > The target has 40 bit register where the normal load/store/move > instructions will be able to access the 32 bits of the register. In > order to move data into the rest of th

Re: -print-* command-line switches misbehave or are misdocumented

2009-07-04 Thread Ian Lance Taylor
Eli Zaretskii writes: > Some of the -print-* command-line switches either don't work as > advertised or their documentation should be made more clear. > > All of the examples below are with the following version of GCC: > > gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5) > Copyright (C) 2006 Free

Re: gtyp-input.list should contain absolute paths.

2009-07-04 Thread Ian Lance Taylor
Basile STARYNKEVITCH writes: >@: $(call write_entries_to_file,$(realpath $(GTFILES)),tmp-gi.list) >$(SHELL) $(srcdir)/../move-if-change tmp-gi.list gtyp-input.list >$(STAMP) s-gtyp-input In general, one should try to avoid changing a user specified relative path to an absolute path.

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-05 Thread Ian Lance Taylor
Trevor Scroggins writes: > Hello, all. I'm attempting to port GCC 4.4.0 to a new m68k target. The > target begins execution in the first byte of the first text section. > Adding '#define CONSTANT_POOL_BEFORE_FUNCTION 0' in my target's tm.h > seems like the simplest way to avoid execution of read-

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-06 Thread Ian Lance Taylor
Trevor Scroggins writes: > What I'd like to do is place all constant and read-only data, which I > now think means all data affected by CONSTANT_POOL_BEFORE_FUNCTION and > READONLY_DATA_SECTION_ASM_OP (and others?); however, I'd like local, > read-only data--strings and whatnot--to stay in .text,

Re: --with-host-libstdcxx doesn't work as expected

2009-07-06 Thread Ian Lance Taylor
fied. > > So, that's not true. Sorry about that. There was a missing comma in configure.ac. Fixed as follows (also fixed indentation). Committed as obvious. Ian 2009-07-06 Ian Lance Taylor * configure.ac: Add missing comma in AC

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-06 Thread Ian Lance Taylor
Trevor Scroggins writes: > No, that won't work. The assembler only recognizes .text, .data, and > .bss and doesn't support .section. Surely there's a simple hook that > instructs that compiler to print locals after a function instead of > before it? No. Why should there be? Even if you fix the

Re: Internal Representation

2009-07-07 Thread Ian Lance Taylor
Nicolas COLLIN writes: > I looked at the part of the documentation about function bodies and I > wonder something : is there a way to get the function calls from it ? > Because I'd like to make a call graph which represent function and the > functions it calls. gcc builds a call graph. See cgra

Re: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"', error msg

2009-07-08 Thread Ian Lance Taylor
Richard Henderson writes: > A better project for helping debug gcc would be to convert all macros > that use statement expressions into proper inline functions. Which > would then be emitted as out-of-line functions by gcc's -fkeep-inlines > flag, which would yield something that's callable from

Re: TARGET_OPTION_CAN_INLINE_P vs TARGET_CAN_INLINE_P

2009-07-08 Thread Ian Lance Taylor
DJ Delorie writes: > The documentation says: > > @deftypefn {Target Hook} bool TARGET_CAN_INLINE_P (tree @var{caller}, tree > @var{callee}) > > But the code says: > > #ifndef TARGET_OPTION_CAN_INLINE_P > #define TARGET_OPTION_CAN_INLINE_P default_target_option_can_inline_p > #endif > > #define T

Re: Internal Representation

2009-07-09 Thread Ian Lance Taylor
Nicolas COLLIN writes: >> From internal representation. I got the body with DECL_SAVED_TREE >> and I > succeed to get the name of functions and methods called from > CALL_EXPR, using TREE_OPERAND, EXPR_STMT_EXPR, etc... But I can't get > the object on which is called the method (for example in a

Re: [SH] ICE compiling pr34330 testcase for sh-linux-gnu

2009-07-09 Thread Ian Lance Taylor
Andrew Stubbs writes: > The problem insn is created by gen_reload when it is given the > following rtl as input: > > (plus:SI (plus:SI (reg/v/f:SI 4 r4 [orig:192 a ] [192]) > (const_int 2 [0x2])) > (reg:SI 0 r0 [orig:188 ivtmp.24 ] [188])) You need to backtrack before that point to s

Re: TARGET_OPTION_CAN_INLINE_P vs TARGET_CAN_INLINE_P

2009-07-09 Thread Ian Lance Taylor
DJ Delorie writes: > * targhooks.c (default_target_can_inline_p): Rename from > default_target_option_can_inline_p. > * targhooks.h (default_target_can_inline_p): Likewise. > * target-def.h (TARGET_CAN_INLINE_P): Rename from > TARGET_OPTION_CAN_INLINE_P. > * co

Re: CALL_USED_REGISTERS vs CALL_REALLY_USED_REGISTERS

2009-07-10 Thread Ian Lance Taylor
Mohamed Shafi writes: > The GCC 4.4.0 internal says : > [Macro] CALL_REALLY_USED_REGISTERS > Like CALL_USED_REGISTERS except this macro doesn’t require that the > entire set of > FIXED_REGISTERS be included. (CALL_USED_REGISTERS must be a superset of FIXED_ > REGISTERS). This macro is optional. I

Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h?

2009-07-10 Thread Ian Lance Taylor
Trevor Scroggins writes: > While I still think the choice is arbitrary (why the front and not the > back--and mine's a lay opinion, I know), what's the generally accepted > method for reorganizing string literals and other constants to appear > after the function asm rather than before it? Some t

Re: Why not contribute? (to GCC)

2010-04-25 Thread Ian Lance Taylor
Ralf Wildenhues writes: > FWIW, I wrote vc-chlog a while ago (ships together with vc-dwim[1]) which > IMVHO is fairly accurate at creating stub ChangeLog entries if you have > Exuberant Ctags installed. Without it, updates to the GCC build system > would have been rather painful. > > I would add

Re: Why not contribute? (to GCC)

2010-04-25 Thread Ian Lance Taylor
Chris Lattner writes: > The key distinction is that contributing to LLVM does not require > you to sign a form (which isn't even publicly available) and mail it > in to a busy and high-latency organization before non-trivial > patches will be accepted. For the record (Chris probably knows this),

Re: Long paths with ../../../../ throughout

2010-04-25 Thread Ian Lance Taylor
Jon writes: > Ian Lance Taylor wrote, On 15/03/10 03:12: >> Jon writes: >> >>> How long is it until back in stage 1 development phase? >> >> Reasonably soon, I hope, but there is no specific schedule. > > Hi Ian, > Just wanted to ask if it had been

Re: merging the maverick FPU patches

2010-04-25 Thread Ian Lance Taylor
Martin Guy writes: > now that stage3 is over I'm thinking of updating the > MaverickCrunch FPU fixes (currently for 4.3) and merging them but > would appreciate some guidance. > > There are 26 patches in all and I can't expect anyone to understand > them because they require a good understanding

Re: PowerPC suboptimal "add with carry" optimization

2010-04-25 Thread Ian Lance Taylor
Joakim Tjernlund writes: > Noticed that gcc 4.3.4 doesn't optimize "add with carry" properly: Please file a missed-optimization report according to http://gcc.gnu.org/bugs/ . Thanks. Ian

Re: Long paths with ../../../../ throughout

2010-04-25 Thread Ian Lance Taylor
Manuel López-Ibáñez writes: > Ian, how can I check that there is a copyright assignment in place? http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html Jon does have a copyright assignment. Ian

Re: Why not contribute? (to GCC)

2010-04-25 Thread Ian Lance Taylor
Mark Mielke writes: > Wouldn't contributing a patch to be read by the person who will be > solving the problem, but without transferring of rights, introduce > risk or liability for the FSF and GCC? > > I thought "clean room implementation" implies not seeing how somebody > else did it first, as

Re: PowerPC suboptimal "add with carry" optimization

2010-04-26 Thread Ian Lance Taylor
Joakim Tjernlund writes: > Anyway, I *looked* at the page and it said something about gccbug so I tried > that, not obvious either but I let me fire off a report an back came > bug ID 43892 Thanks for filing the report. Ian

Re: PowerPC suboptimal "add with carry" optimization

2010-04-26 Thread Ian Lance Taylor
Joakim Tjernlund writes: > Ian Lance Taylor wrote on 2010/04/25 20:07:03: >> >> Joakim Tjernlund writes: >> >> > Noticed that gcc 4.3.4 doesn't optimize "add with carry" properly: > > BTW, I can see in gcc src: > (define_insn &q

Re: Why not contribute? (to GCC)

2010-04-26 Thread Ian Lance Taylor
Mark Mielke writes: > What are clean room implementations for if not for avoiding copyright > violation? Avoiding contract violations such as promises to keep source code secret. A strict clean room implementation also makes it clear that no copyright violation could have occurred. > At my co

Re: Why not contribute? (to GCC)

2010-04-26 Thread Ian Lance Taylor
Chris Lattner writes: > w.r.t. "hoarding", I'll point out that (in the context of GCC) being > able to enforce copyright is pretty useless IMO. While you can > force someone to release their code, the GPL doesn't force them to > assign the copyright to the FSF. In practice this means that you >

Re: Why not contribute? (to GCC)

2010-04-26 Thread Ian Lance Taylor
Jonathan Corbet writes: > What you agree to is the developers certificate of origin (DCO), which > says you have the right to contribute the code to the kernel. No > copyright assignment takes place. Trust me, I have thousands of lines > of code in the kernel, and the copyright remains mine. T

Re: Why not contribute? (to GCC)

2010-04-26 Thread Ian Lance Taylor
Chris Lattner writes: > On Apr 26, 2010, at 12:23 PM, Ian Lance Taylor wrote: >> >> Again, just for the record. History shows that this is not entirely >> useless. People at NeXT wrote the Objective C frontend to GCC. They >> did not intend to release the source c

Re: Why not contribute? (to GCC)

2010-04-26 Thread Ian Lance Taylor
Mark Mielke writes: > This presumes that NeXT would not have discovered the value of free > software and done the right thing eventually anyways. I think anybody > who truly believes in free software should believe in it for practical > reasons. It's not just a religion - it's the right way to do

Re: redundant divmodsi4 not optimized away

2010-04-26 Thread Ian Lance Taylor
Greg McGary writes: > I have a port without div or mod machine instructions. I wrote > divmodsi4 patterns that do the libcall directly, hoping that GCC would > recognize the opportunity to use a single divmodsi4 to compute both > quotient and remainder. Alas, GCC calls divmodsi4 twice with the

Re: The usage of the "clobber "match_scratch""

2010-04-27 Thread Ian Lance Taylor
redriver jiang writes: > test3.c:27: error: insn does not satisfy its constraints: > (insn 52 51 32 0 (parallel [ > (set (reg:HI 16 BASE0) > (plus:HI (reg:HI 16 BASE0) > (const_int -2 [0xfffe]))) > (clobber (scratch:QI)) > ]

Re: Why not contribute? (to GCC)

2010-04-27 Thread Ian Lance Taylor
"Alfred M. Szmidt" writes: > That is more or less what a potentional contributor gets via email > when submitting a patch. I don't see how a web form would make things > different. True, but I think it would make a significant difference if the web form could be filled out online without requir

Re: LTO question

2010-04-27 Thread Ian Lance Taylor
"Bingfeng Mei" writes: > I have been playing with LTO. I notice that LTO doesn't work when > object files are achived into static library files and the final > binary is linked against them, although these object files are compiled > with -flto and I can see all the lto related sections in .a fil

Re: Accepted applications for Google Summer of Code 2010

2010-04-28 Thread Ian Lance Taylor
Aina Niemetz writes: > i'm one of the students who didn't get accepted this year, unfortunately. This > doesn't lessen my motivation to get involved, though. Thus i decided to roll > up > my sleeves and start to work on my proposed project anyway as i think it'd be > just perfect for getting fam

Re: Accepted applications for Google Summer of Code 2010

2010-04-28 Thread Ian Lance Taylor
Toon Moene writes: > On 04/28/2010 01:44 AM, Diego Novillo wrote: > >> This year GCC received 10 slots for Google Summer of Code. > > [ This is probably documented on the Google site somewhere, > but I couldn't find it. ] > > How is this division in "projects" determined ? > > What makes GCC "g

Re: LTO vs static library archives [was Re: lto1: internal compiler error: in lto_symtab_merge_decls_1, at lto-symtab.c:549]

2010-04-29 Thread Ian Lance Taylor
Richard Guenther writes: > Well, we'd then need to re-architect the symbol merging and > LTO unit read-in to properly honor linking semantics (drop > a LTO unit from an archive if it doesn't resolve any unresolved > symbols). I don't know how easy that will be, but it shouldn't > be impossible a

Re: Type-generic macros with C

2010-04-30 Thread Ian Lance Taylor
Jörg Leis writes: > would it be possible for GCC to ignore the expression that is not > chosen by __builtin_choose_expr? > > Furthermore, it seems like this built-in function inhibits GCC's > ability to inline functions. I get an undefined reference when I > compile without -O2; the function is d

Re: gcc.3.4.6 vs. gcc-4.3.2 re: pseudo instructions & bus error

2010-05-01 Thread Ian Lance Taylor
"SHANE MILLER, BLOOMBERG/ 731 LEXIN" writes: > Hi, I compile .c files using both gcc.3.4.6 and gcc-4.3.2 chaining to Sun's > assembler "Sun Compiler Common 10 Patch 09/04/2007" in both cases: > > gcc -O3 -D_SOLARIS -D_SPARC -Wall -Wa,-xarch=v8plus -fexceptions -c ... > How can I turn pseudo a

Re: Question about Machine Description

2010-05-03 Thread Ian Lance Taylor
yazdanbakhsh writes: > I'm working on my a gcc compiler for my own written processor with the help > of SimpleScalar. > I want to remove "srav/slav" (immediate arithmetic shift) from the > instruction set. I explore ss.md file but I didn't see any define_ins for > the mentioned instructions, but

Re: gcc4.5.0/libiberty/pex-common.h missing pid_t on vms

2010-05-03 Thread Ian Lance Taylor
Jay K writes: > proposed/tested fix: > #ifdef __vms > #include > #endif > > or similar. Use #ifdef HAVE_UNISTD_H instead. There are many examples in libiberty. Ian

Re: gcc 4.5.0 libiberty .o vs. .obj confusion

2010-05-03 Thread Ian Lance Taylor
Jay K writes: > I'm guessing that every ".o" in libiberty/Makefile.in should be changed to > $(OBJEXT). Yes. Ian

Re: peephole optimizations

2010-05-03 Thread Ian Lance Taylor
roy rosen writes: > 1. Is that true that if I try to match in the pattern two insns and in > my code between these insns there is another insn which does not have > any dependency connection to the other two, Is that true that the > peephole would not match in this case? (i.e. the insns to match

Re: Question about Machine Description

2010-05-03 Thread Ian Lance Taylor
yazdanbakhsh writes: > Please assume I'm working with the MIPS. There is a little difference > between the MIPS and what I'm actually working on it. How can I remove > immediate logical shift right/left from the compiler? > I mean If I want the programmer writes an immediate shift, It is compiled

Re: Question about Machine Description

2010-05-03 Thread Ian Lance Taylor
yazdanbakhsh writes: > This is the newer version. It works correctly. I just want know is there any > other way. Did you read what I wrote earlier? http://gcc.gnu.org/ml/gcc/2010-05/msg00048.html Ian

Re: peephole optimizations

2010-05-04 Thread Ian Lance Taylor
roy rosen writes: > 2010/5/3, Ian Lance Taylor : >> roy rosen writes: >> >> > 1. Is that true that if I try to match in the pattern two insns and in >> > my code between these insns there is another insn which does not have >> > any dependency connecti

Re: -pthread

2010-05-04 Thread Ian Lance Taylor
Magnus Fromreide writes: > I recently ended up in a discussion about the -pthread flag at work and > when looking at the documentation I noticed that it is defined onlt for > SPARC and RS/6000/PowerPC. > > Additionally -fopenmp and -ftree-parallelize-loops say they are only > supported on targets

Re: Question about Machine Description

2010-05-04 Thread Ian Lance Taylor
u have specific questions. Ian > Ian Lance Taylor-3 wrote: >> >> yazdanbakhsh writes: >> >>> Please assume I'm working with the MIPS. There is a little difference >>> between the MIPS and what I'm actually working on it. How can I remove >>

Re: Question about Machine Description

2010-05-04 Thread Ian Lance Taylor
t; Ian Lance Taylor-3 wrote: >> >> yazdanbakhsh writes: >> >>> I want to change instruction blez to ble. ble compare two registers and >>> jump >>> to the target address if the condition is true. >> >> Read the internals manual to unde

Re: Question about Machine Description

2010-05-06 Thread Ian Lance Taylor
yazdanbakhsh writes: > (define_expand "cbranchsi4" > [(set (pc) > (if_then_else: SI (le:SI (match_operand:SI 0 "register_operand" "=d,d") > (match_operand:SI 1 "register_operand" "=d,d")) > (label_ref (match_operand 2 "" "")) > (pc)))] > "" > "

Re: role of "register" C keyword?

2010-05-06 Thread Ian Lance Taylor
Basile Starynkevitch writes: > Long time ago (probably in the GCC 2.95 & 3.2 time frame) I would > imagine that the "register" keyword indeed affected register > allocation, in the sense that variables declared with register where > indeed & preferentially put in a machine register. I don't thin

Re: [RFC] Introduce -Ofast

2010-05-06 Thread Ian Lance Taylor
Richard Guenther writes: > This is a proposal to introduce an optimization level -Ofast > that can collect (target specific) optimization flags that > can affect runtime behavior such as -funsafe-math-optimizations > or -mrecip. Sounds like a good idea to me. I don't like the name -Ofast, which

Re: C++0x Memory model and gcc

2010-05-06 Thread Ian Lance Taylor
Andrew MacLeod writes: > I've been working for a while on understanding how the new memory > model and Atomics work, and what the impacts are on GCC. Thanks for looking at this. One issue I didn't see clearly was how to actually implement this in the compiler. For example, speculated stores ar

Re: C++0x Memory model and gcc

2010-05-07 Thread Ian Lance Taylor
Andrew MacLeod writes: > They are independent as far as dependencies within this compilation unit. > The problem is if thread number 2 is performing > a.j = val > b.i = val2 > > now there are data races on both A and B if we load/store full words > and the struct was something like: struct { >

Re: C++0x Memory model and gcc

2010-05-09 Thread Ian Lance Taylor
Albert Cohen writes: > Jean-Marc Bourguet wrote: >>> -fmemory-model=single >>> Assume single threaded execution, which also means no signal >>> handlers. >>> -fmemory-model=fast >>> The user is responsible for all synchronization. Accessing >>> the same me

Re: Question about Machine Description

2010-05-09 Thread Ian Lance Taylor
yazdanbakhsh writes: > (define_insn "*bltdf" > [(set (pc) > (if_then_else (lt:SI (match_operand:DF 1 "" "") >(match_operand:DF 2 "" "")) > (match_operand 3 "pc_or_label_operand" "") > (match_operand 4 "pc_or_label_operand" "")))] > "" > > "* > {

Re: -disable-fixincludes doesn't quite work, minor

2010-05-10 Thread Ian Lance Taylor
Jay K writes: > -disable-libgcc and/or -disable-fixincludes are useful, depending on your > goal. > >  Like if you just want to compile C to assembly or object files. > > > It fails, but only after doing what I want anyway. > > make[2]: *** No rule to make target > `../build-sparc-sun-solaris2.

Re: optimizing a DSO

2010-05-10 Thread Ian Lance Taylor
Vivek Verma writes: > I am trying to speedup the load and startup time of a shared > library. After reading Ulrich Drepper's paper on "How to write shared > libraries", it seems that the easiest thing to try would be to reduce > the number of symbols that are globally visible. After carefully >

Re: -disable-fixincludes doesn't quite work, minor

2010-05-10 Thread Ian Lance Taylor
Jay K writes: > Ok if I do both or the emails are just annoying? As far as I'm concerned, it's fine to do both. > I find that bugs are often ignored just as well (but not lost/forgotten, > granted. :) ) Agreed on both counts. Ian

Re: optimizing a DSO

2010-05-11 Thread Ian Lance Taylor
Marc Glisse writes: > On Tue, 11 May 2010, Jakub Jelinek wrote: > >> And you can use -Wl,-O1 (pass -O1 to the linker) to let the linker >> determine optimal size of the hash table (minimum number of collisions >> for reasonably sized section). > > Was it considered enabling this automatically wit

Re: rep prefix doesn't work with Solaris 2.9 Sun assembler

2010-05-11 Thread Ian Lance Taylor
Jay K writes: > Understood, but I'll have to stick to "small" changes as I can't get the > papers. Note that for copyright purposes a series of unrelated small changes counts as a big change. If you truly can't do the paperwork, then it's probably best for the project if you avoid sending actu

Re: Coverage of backend rules

2010-05-11 Thread Ian Lance Taylor
"Paulo J. Matos" writes: > I have a backend and I would like to have a systematic way to know if > my testsuite covers all the define_insn and define_expand rules in my > md file. > > What's the best way to achieve this? For define_insn you can use the -da option, and scan the debug files for

Re: libgcc2

2010-05-12 Thread Ian Lance Taylor
Eggenmüller Bernd writes: > is it possible to translate the libgcc2 when i only have 4 registers > which are 32 bits long. > One of the four Registers is defined as Basepointer and another as > Stackpointer. > The other two can be used to calculate. libgcc2 is intended to be machine independent.

Re: Clobbering two registers

2010-05-12 Thread Ian Lance Taylor
"Paulo J. Matos" writes: > How can I say in the machine architecture that to generate code for a > particular insn I need any two registers for intermediate operations? > To get one I think that (clobber (match_operand ...)) will work but > what if I want two? Can I add two clobbers on the same d

Re: Different flags for building plugins and gcc.

2010-05-12 Thread Ian Lance Taylor
IainS writes: > .. this seems a bit strange : -fPIC is not a ld flag... LDFLAGS is flags that are passed to the compiler when linking. It is not flags passed directly to the linker. I don't know why -fPIC is there, but it shouldn't do any harm. The Makefile fragment config/mh-ppc-darwin is s

Re: C++0x Memory model and gcc

2010-05-17 Thread Ian Lance Taylor
Michael Matz writes: > On Wed, 12 May 2010, Andrew MacLeod wrote: > >> Well, you get the same thing you get today. Any synchronization done >> via a function call will tend to be correct since we never move shared >> memory operations across calls. Depending on your application, the >> types

Re: libgcc2

2010-05-17 Thread Ian Lance Taylor
Eggenmüller Bernd writes: > Andrew Pinski schrieb: >> On Thu, May 13, 2010 at 8:46 AM, Eggenmüller Bernd wrote: >> >>> Is there any implementation with less registers like this. >>> >> >> libgcc2 is written in C; so if it fails to compile you need to fix up >> your backend. There might

Re: C++0x Memory model and gcc

2010-05-17 Thread Ian Lance Taylor
Michael Matz writes: > On Mon, 17 May 2010, Ian Lance Taylor wrote: > >> >> Since the atomic operations are being built into the compiler, the >> >> intent is to eventually optimize and inline them for speed... and in >> >> the best case, simply resu

Re: Updating multilib support after a compiler is built

2010-05-18 Thread Ian Lance Taylor
"Jon Beniston" writes: > Is it possible to update the multilib combinations supported by GCC after it > has been built? I believe that all the multilib information can be read from the specs file, so, technically, yes. > %rename multilib_matches old_multilib_matches > *multilib_matches: > mcpu

Re: useless stores generated when returning a struct -- bug?

2010-05-18 Thread Ian Lance Taylor
Joshua Haberman writes: > I have a case where I think useless stores are being generated, but I > want to be sure before I file a bug. This is with gcc 4.4.3 on Ubuntu > 10.04, x86-64. I concur that this is a missed optimization bug. Ian

Re: disallow movm in a register class

2010-05-18 Thread Ian Lance Taylor
Eggenmüller Bernd writes: > how can I disallow the mov operation for a register class. > Can someone help me? Please do not start a new thread by replying to an existing message. That hides your message for all of us who use threaded e-mail readers. If there is some mode which can be stored in

Re: Question about rtx format for insn, call_insn and junp_insn

2010-05-19 Thread Ian Lance Taylor
kito writes: > Hello every body > I have read the rtl.h & rtl.c, > but I don't realize the format for  insn, call_insn and junp_insn > > it's define in rtl.def > > DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieie0", RTX_INSN) > > and it's dump by some real program > > (jump_insn 14  /*  i */ >     

<    12   13   14   15   16   17   18   19   20   21   >