Re: apply maintainer?

2008-11-10 Thread Ian Lance Taylor
"Eric Fisher" <[EMAIL PROTECTED]> writes: > Anyone could tell how to be a gcc maintainer? Is there any > requirement? Actually, my previous work are all not based on the gcc > trunk. So no patch submitted. Anyway, it's cool to contribute :-) The usual procedure is to write a bunch of good patches

Re: Contributing to gcc

2008-11-11 Thread Ian Lance Taylor
José Manuel Marín Román <[EMAIL PROTECTED]> writes: > I'm a spanish senior c++ development and I would like to contribute to > gnu compiler in some way you consider neccesary. > > My expertise is on graphic and games technologies, such as 3d realtime > engine programming, raytracing, artificial in

Re: change to gcc from lcc

2008-11-14 Thread Ian Lance Taylor
Anna Sidera <[EMAIL PROTECTED]> writes: > The following code works in lcc in windows but it does not work in > gcc in unix. I think it is memory problem. In lcc there is an option > to use more temporary memory than the default. Is there something > similar in gcc? In gcc, no. But if you are usi

Re: Restrict implementation considered harmful

2008-11-21 Thread Ian Lance Taylor
Richard Guenther <[EMAIL PROTECTED]> writes: > int foo (int *__restrict p) > { > int *__restrict q; > int v; > q = p + 1; > q = q - 1; > v = *q; > *p = 1; > return v + *q; > } > extern void abort (void); > int main() > { > int i = 0; > if (foo (&i) != 1) > abort (); > retur

Re: Restrict implementation considered harmful

2008-11-21 Thread Ian Lance Taylor
Michael Matz <[EMAIL PROTECTED]> writes: >> This program appears to me to be invalid according to C99 6.7.3.1, >> which is the only definition of restrict that we have. >> >> If P is assigned the value of a pointer expression E that is based >> on another restricted pointer object P2, ass

Re: Several puzzles about gcc top level makefile

2008-11-28 Thread Ian Lance Taylor
"Cheng bin" <[EMAIL PROTECTED]> writes: > 1 : At the end of that makefile , There is a section noted as > "Regenerating top level configury". > It is clear what it do, but for what? Where is this piece of > code used in building procedure? Those pieces of code are used by developers if and

Re: Athlon XP segfaults with -fweb -ftracer

2008-12-02 Thread Ian Lance Taylor
Daniel Kasak <[EMAIL PROTECTED]> writes: > I'm experiencing segfaults with applications that use fontconfig, only > if fontconfig is compiled with -fweb -ftracer. In full, I used: > > -march=athlon-xp -O2 -pipe -fweb -ftracer > > I have seen a very similar bugs reported at: > > https://bugs.gentoo

Re: generate assembly mnemonic depending the resource allocation

2008-12-03 Thread Ian Lance Taylor
Alex Turjan <[EMAIL PROTECTED]> writes: > Thanks for answer but Im not able to make it work; I dont know how > to extract the specific slot-usage (out of a number of an > alternatives) out of the RTL insn description. > Is there some get_attr_ for this? You would have to invent the attribute. T

Re: generate assembly mnemonic depending the resource allocation

2008-12-03 Thread Ian Lance Taylor
Alex Turjan <[EMAIL PROTECTED]> writes: > Im now looking the in gcc mainline to find when an instruction (with > alternative resource utilizations) is issued which of the resources > are used. This is described using define_insn_reservation and so forth in the MD file. This is well documented in

Re: generate assembly mnemonic depending the resource allocation

2008-12-03 Thread Ian Lance Taylor
Alex Turjan <[EMAIL PROTECTED]> writes: > I use as atribute of one of the instructions the following > define_insn_reservation: > (define_insn_reservation "vmove" 1 "vector_type" "vmove") "c_valu_1|c_vlsu_1") > > As you can see vmove has two alternative reservation : c_valu_1 or c_vlsu_1, > wher

Re: Reload generating memory ref in memory ref

2008-12-04 Thread Ian Lance Taylor
Michael Eager <[EMAIL PROTECTED]> writes: > I'm running into a situation where reload is replacing > a pseudo-register in an insn with a memory reference. > The problem is that this is happening in a memory ref. > > The initial pattern is something like > > (set (reg/v:SI 1) (mem/s:SI (plus:SI >

Re: Reload generating memory ref in memory ref

2008-12-06 Thread Ian Lance Taylor
Michael Eager <[EMAIL PROTECTED]> writes: > The insn was previously recognized before the following > code at the end of reload replaces the pseudo-reg with the reg-equivalent: > > 1107 /* Now eliminate all pseudo regs by modifying them into > 1108 their equivalent memory references. > 1109

Re: [ARM] Implement __builtin_bswap32() via ARMv6 "rev" instruction

2008-12-08 Thread Ian Lance Taylor
"Alexandre Pereira Nunes" <[EMAIL PROTECTED]> writes: > I can provide these, tough as for the copyright assignment, the > document mentions I can declare the changes in public domain, and > since I already published something (which may or may not be used by > someone in the future), I hereby

Re: [ARM] Implement __builtin_bswap32() via ARMv6 "rev" instruction

2008-12-08 Thread Ian Lance Taylor
Nils Pipenbrinck <[EMAIL PROTECTED]> writes: > I am now a lawyer, but as far as I know in my country (germany) it is > not possible to decline copyright (called Urheberrecht here - it's not > exactly the same but close). You can give away the usage-rights to > your code at will and for free (by pu

Re: gcc -r

2008-12-09 Thread Ian Lance Taylor
Ralf Corsepius <[EMAIL PROTECTED]> writes: > 1) Is "gcc -r" officially supported by gcc? > > It apparently works, but I can't find it documented anywhere in GCC's > documentation. When invoking the linker, a -r option on the command line will be passed to the linker. The same is true of -A, -d,

Re: Thread safe functions from the C standard library

2008-12-09 Thread Ian Lance Taylor
David Livshin <[EMAIL PROTECTED]> writes: > What functions from the GNU's C standard library ( libc ) are thread > safe? Of a particular interest are transcendental functions ( like > exp', 'sin' etc. ) - are they thread safe? > > Are there any requirements/guidelines/assurances regarding thread >

Re: gcc -r

2008-12-09 Thread Ian Lance Taylor
Ralf Corsepius <[EMAIL PROTECTED]> writes: > So what would you recommend: To use "gcc -r" or "gcc -Wl,-r" ? Ah, when you put the question like that, I would recommend "ld -r". This is the one case where you get no advantage from using the gcc driver to invoke the linker, and it can actually mess

Re: inlining a virtual function

2008-12-09 Thread Ian Lance Taylor
Marco Correia <[EMAIL PROTECTED]> writes: > The following is a simplification of my problem: > > struct Base { virtual void func() = 0; }; > > struct Derived : Base { inline void func() {...} }; > > Derived& d = ...; > d.func(); > > This last call is not being inlined. Is this normal? (As I said m

Re: Thread safe functions from the C standard library

2008-12-09 Thread Ian Lance Taylor
David Livshin <[EMAIL PROTECTED]> writes: > I thought that "gcc" mailing list is appropriate as I need this > information in order to implement auto-parallelizer for the > gcc-generated code. How the gcc-supported parallelizer ( > "-ftree-parallelize-loops=n" ) treats the calls to library routines

Re: Machine Dependent Reorganization Question

2008-12-15 Thread Ian Lance Taylor
"Balaji V. Iyer" writes: > 1) Is the machine dependent reorganization phase occuring after or > before the register allocation phase? After. See passes.c. > 2) Also, is it possible for me to add my own "demands" (or suggestions) > into the register allocator? It really depends on what you m

Re: Machine Dependent Reorganization Question

2008-12-15 Thread Ian Lance Taylor
"Balaji V. Iyer" writes: > This is what I want to do: I want the scheduling phase to say an RTX X > must be allocated registers from Register CLASS A. So how can I tell > register allocator to do this? Not in any convenient way, no. The closest you could come would be to have several different

Re: gcc-4.3.2 native build error

2008-12-16 Thread Ian Lance Taylor
Chandra Prakash Garg writes: > checking for > i686-pc-linux-gnu-gcc... > /home/abhijitd/gcc/gcc-4.3.2/host-i686-pc-linux-gnu/gcc/xgcc > -B/home/abhijitd/gcc/gcc-4.3.2/host-i686-pc-linux-gnu/gcc/ > -B/home/abhijitd/gcc/gcc-4.3.2/i686-pc-linux-gnu/bin/ > -B/home/abhijitd/gcc/gcc-4.3.2/i686-pc-linu

Re: How can I determine a register is referred through MEM at split2 stage?

2008-12-16 Thread Ian Lance Taylor
"Guo, Xuepeng" writes: > I am working on an optimization which happens at split2 stage. I > need to determine whether the destination operand of the current RTL > (which is a register operand) will be referred by other RTL through > MEM within a basic block. I see there is a function named > reg_

Re: How can I determine a register is referred through MEM at split2 stage?

2008-12-17 Thread Ian Lance Taylor
"Guo, Xuepeng" writes: > Thanks for your comments. It's not exactly the entire basic > block. It should be from the current RTL to the end of the current > basic block. As you know GCC will optimize "addl %ebx, %eax" to > "leal (%ebx, %eax), %eax" to avoid the flag register dependency > through a

Re: Are BOOT_CFLAGS, CFLAGS_FOR_TARGET, and CXXFLAGS_FOR_TARGET necessary and sufficient?

2008-12-17 Thread Ian Lance Taylor
"Gordon Magnusson" writes: > I read http://gcc.gnu.org/install/build.html but wasn't completely > enlightened. > > If I'm building C and C++ (i.e. configuring with > --enable-languages=c,c++) and I want to build gcc, g++, and libstdc++ > with -O3 instead of the default (which I believe is -g -O2

Re: Bug in optimize_bitfield_assignment_op()?

2008-12-19 Thread Ian Lance Taylor
"Bingfeng Mei" writes: > Here the bitpos = 0, bitsize = 52. HOST_WIDE_INT for our processor > is 32, though 64-bit long long type is supported. The marked > statement produces a mask of 0xf, thus causes the upper 32-bit > removed later. Is this a potential bug, or did I miss something? gc

Re: Tru64 non-virtual thunks multiply defined

2008-12-19 Thread Ian Lance Taylor
"Peter O'Gorman" writes: > When building qt-3.3.8 and wxGTk on Tru64 UNIX 5.1 > (alphaev67-dec-osf5.1) with gcc-4.2.4, we got linker failures about > duplicate non-virtual thunks, e.g. from qt: > /usr/ccs/bin/ld: > .obj/release-shared-mt/qmotifdnd_x11.o: non-virtual thunk to > QDragMoveEvent::~Q

Re: Code Motion after Machine Dependent Reorganization??

2008-12-30 Thread Ian Lance Taylor
"Balaji V. Iyer" writes: > I printed out the RTL dump using the following code during the machine > dependent reorganization > > > FOR_EACH_BB(bb) { > for (insn = bb_head(bb); insn != bb_end(bb); insn = NEXT_INSN(insn)) > { >if (INSN_P(insn)) > print_rtl_single(insn); >

Re: Code Motion after Machine Dependent Reorganization??

2008-12-30 Thread Ian Lance Taylor
"Balaji V. Iyer" writes: > Thanks for your help. What I mainly want to do is to make some > hardware decisions by looking at the instructions inside a Basic block. > Ths is why I was using the "FOR_EACH_BB" function. > > When and where can I intercept the RTL such that I can get the >

Re: [PING] Re: Patch for Re: out of date docs?

2009-01-06 Thread Ian Lance Taylor
Gerald Pfeifer writes: > 2008-11-18 Gerald Pfeifer > > * doc/install.texi (alpha*-dec-osf*): Remove note on 32-bit > hosted cross-compilers generating less efficient code. This is OK. Thanks. Ian

Re: Question about UNSPEC rtx and a new instruction

2009-01-07 Thread Ian Lance Taylor
JCX writes: > Hello, I am working on a gcc porting for a new instruction. This > instruction needs to move data from memory to two registers. So I use > the SET rtx, and the dest of SET is an UNSPEC rtx with two registers. > By using such a rtl pattern, gcc performs very differently. It makes > m

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"Ye, Joey" writes: > Option 3: Define BIGGEST_ALIGNMENT as a fixed value 32 bytes, for > all x86 target, and extend to 64 or more bytes in future. Assuming that code compiled with -mavx is intended to interoperate with code compiled without -mavx, I believe that this is the only viable long-term

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"Richard Guenther" writes: > As there is no hardware implementation of AVX available I think > we definitely should stay with 16 for 4.4. That makes sense. > And IMNSHO also for > all future - __attribute__((aligned)) is part of the ABI, and if it is > not the only user of BIGGEST_ALIGNMENT the

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"H.J. Lu" writes: > Fixing BIGGEST_ALIGNMENT to 16 may require extensive changes. > I am thinking to add DEFAULT_ALIGNMENT with > > #ifndef DEFAULT_ALIGNMENT > #define DEFAULT_ALIGNMENT BIGGEST_ALIGNMENT > #endif > > and use it only for attribute((aligned)). This does need to be done, but DEFAUL

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"Richard Guenther" writes: >> That is, there are two conflicting requirements: maintaining a stable >> ABI on a single platform, and supporting a cross-platform API. I >> would argue that code which runs on a single platform and needs a >> stable ABI should avoid __attribute__ ((aligned)). That

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"H.J. Lu" writes: > Index: gcc/doc/extend.texi > === > --- gcc/doc/extend.texi (revision 4884) > +++ gcc/doc/extend.texi (working copy) > @@ -3697,9 +3697,8 @@ that forces the union to be double-word > As in the precedi

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
Jakub pointed out on gcc-patches that changing the value of __attribute__ ((aligned)) has difficulties. Historically this value was never intended to be fixed for all time. For example, for the i386, it was last changed here: Tue Jan 18 16:19:55 MET 2000 Jan Hubicka * i386.h (BIGGEST_

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"H.J. Lu" writes: > On Wed, Jan 7, 2009 at 2:47 PM, Ian Lance Taylor wrote: >> 2) Introduce __attribute__ ((aligned (max))). This will be documented >> as having the largest value available for any version of the >> architecture, and thus in particular it may

Re: Options of fixing biggest alignment in PR target/38736

2009-01-07 Thread Ian Lance Taylor
"Ye, Joey" writes: > From: Ian Lance Taylor [mailto:i...@google.com]: >> Therefore, I propose that we do the following: >> >> 1) Introduce __attribute__ ((aligned (scalar))). This will be >>documented as having a fixed value for each ABI. The

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: >> Given that __attribute__ ((aligned (max))) may change, I don't >> think it is very useful. A portable generic memory allocator should >> take an additional argument for alignment. >> > > If we really want the maximum useful alignment for the target machine > we are compiling

Re: Getting calling function in the C frontend

2009-01-08 Thread Ian Lance Taylor
Per Ekman writes: > Is it possible to get hold of the calling function (in the compiled > program, not in gcc itself) in c-typeck.c:build_function_call()? It's in the global variable current_function_decl. Ian

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: > It it hard to guess what the alignment should be for C++ new operator. > Whatever you choose today may not be appropriate tomorrow > or for others. I think g++ should issue a warning when new operator > is used on a type whose alignment greater than MALLOC_ABI_ALIGNMENT: The

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: > On Thu, Jan 8, 2009 at 10:49 AM, Ian Lance Taylor wrote: >> "H.J. Lu" writes: >> >>> It it hard to guess what the alignment should be for C++ new operator. >>> Whatever you choose today may not be appropriate tomorrow

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: > We can solve it with > > 1. A target should define MALLOC_ABI_ALIGNMENT properly. > 2. g++ should issue an error when the default new operator > is used on a type whose alignment is greater than > MALLOC_ABI_ALIGNMENT. > 3. It is user's responsibility to provide a new operator

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: > For 4.4, we can apply my patch: > > http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00367.html > > and update document with > > As in the preceding examples, you can explicitly specify the alignment > (in bytes) that you wish the compiler to use for a given variable or > structur

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"Richard Guenther" writes: > I don't think we should encourage more uses of __attribute__((aligned)). But then how can one write a general purpose portable memory allocator? Ian

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
Michael Meissner writes: >> For that matter, don't we have a problem on x86 GNU/Linux, where >> malloc returns an 8-byte alignment but attribute((aligned)) is a 16 >> byte alignment? > > In that case, malloc should be changed to return items that are 16-byte > aligned > if any type needs 16-byte

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: >> For that matter, don't we have a problem on x86 GNU/Linux, where >> malloc returns an 8-byte alignment but attribute((aligned)) is a 16 >> byte alignment? > > I don't think it is the same as MALLOC_ABI_ALIGNMENT. > attribute((aligned)) is something determined by compiler, > w

Re: Options of fixing biggest alignment in PR target/38736

2009-01-08 Thread Ian Lance Taylor
"H.J. Lu" writes: >> There are many ways to align data without exposing it in the >> ABI--e.g., the alignment of a global array is not part of the ABI, in >> that nothing breaks if the alignment is increased. Also, there are >> many programs which simply don't care about an external ABI. >> > >

Re: Options of fixing biggest alignment in PR target/38736

2009-01-09 Thread Ian Lance Taylor
"Richard Guenther" writes: >> There are many ways to align data without exposing it in the >> ABI--e.g., the alignment of a global array is not part of the ABI, in >> that nothing breaks if the alignment is increased. Also, there are >> many programs which simply don't care about an external ABI

Re: Options of fixing biggest alignment in PR target/38736

2009-01-09 Thread Ian Lance Taylor
"H.J. Lu" writes: > You can't use _attribute__ ((aligned(max))) directly with memory > allocator. How about a new macro, __BIGGEST_ALIGNMENT__? You can use __attribute__ ((aligned)), you just need to also use __alignof__. I have no objection to __BIGGEST_ALIGMENT__ but that is a separate discus

Re: Options of fixing biggest alignment in PR target/38736

2009-01-09 Thread Ian Lance Taylor
"Richard Guenther" writes: > On Fri, Jan 9, 2009 at 4:31 PM, Ian Lance Taylor wrote: >> "Richard Guenther" writes: >> >>>> There are many ways to align data without exposing it in the >>>> ABI--e.g., the alignment of a global array

Re: correct place for code.

2009-01-14 Thread Ian Lance Taylor
IainS writes: > I need to make a test expanded from ASM_OUTPUT_LABEL_REF that is > language dependent (on objc/objcxx). > > It's not clear where the best/proper place to put the code is. > > if I put it in {stub,act}-objc.c that's fine for c, c++, objc and > objc++ ... > ... but it means that st

Re: Missed bitfield packing?

2009-01-16 Thread Ian Lance Taylor
Adam Nemet writes: > struct s > { > char a:4; > char b:8; > char c:4; > } __attribute__ ((packed)) > > is 3 bytes long because b gets pushed to the next byte boundary. Sounds like a bug. > The reason for this behavior is that finish_struct does not propagate packed > to fields whose type

Re: prologue length

2009-01-16 Thread Ian Lance Taylor
"Vincent R." writes: > I am working on a gcc-4.1.2 and I would like to know how the prologue > length from a function can be calculated. The question is not well formed. The instructions which are part of the prologue (e.g., saving callee-saved registers onto the stack) can be interspersed with

Re: prologue length

2009-01-16 Thread Ian Lance Taylor
"Vincent R." writes: > To locate appropriate handlers when an exception occurs in Win32 > environments other than x86, Note that as far as I know, gcc only supports win32 for ARM and x86 (and x86_64, I guess, or maybe that is win64). So I assume you are talking about ARM. > The portion of th

Re: prologue length

2009-01-16 Thread Ian Lance Taylor
"Vincent R." writes: > No you are right, prologue definition in my context is : > Typically, a prolog segment contains separate sequences of instructions > that perform the following tasks: > > * Allocate a stack frame. > * Save incoming argument registers. > * Set up the frame pointe

Re: putting operands in MEM even with register_operand predicate

2009-01-17 Thread Ian Lance Taylor
"Sean D'Epagnier" writes: > I have a rule in machine descriptor: > > (define_insn "fract2" > [(set (match_operand:FIXED1 0 "register_operand" "") > (fract_convert:FIXED1 (match_operand:FIXED2 1 > "register_operand" "")))] > "" > "* return fract_out (insn, operands, 1, NULL);" > [(

Re: C integrated RPC

2009-01-20 Thread Ian Lance Taylor
"andrew babanin" writes: > I am working on the remote procedure call system integrated into C > language. System called CRPC, > it consists of C wrapper compiler and shared library. Wrapper compiler > works with GCC. > > New RPC system helps you develop socket based applications. With the > syste

Re: register int variable being written to/read from stack

2009-01-20 Thread Ian Lance Taylor
baver writes: > A sample code listing is at the bottom of the email, as well as the lines > we've added to opcodes/mips-opc.c for our opcodes. > > > > Anyone know how to stop the register from being stored and read from on the > stack? We've defined it as > > volatile register int idx asm(

Re: C integrated RPC

2009-01-21 Thread Ian Lance Taylor
andrew babanin writes: > In attach you can find example program, > client and server side. And doc for the system as README file. > The newest version of the sources can be downloaded from > crpc at sf dot net. Thanks. This does seem useful for some people. I would be interested in hearing tho

Re: Document error on TARGET_ASM_NAMED_SECTION ?

2009-01-22 Thread Ian Lance Taylor
"Bingfeng Mei" writes: > According to current GCC internal manual. > http://gcc.gnu.org/onlinedocs/gccint/File-Framework.html#index-TARGET_005fASM_005fNAMED_005fSECTION-4335 > > - Target Hook: void TARGET_ASM_NAMED_SECTION (const char *name, unsigned int > flags, unsigned int align) > > Out

Re: gcc-4.3.3.tar.bz2 md5sum does not match

2009-01-26 Thread Ian Lance Taylor
Richard Guenther writes: > On Mon, Jan 26, 2009 at 4:23 PM, Andrew Walrond wrote: >> I've tried two mirrors with the same results: >> >> $ cat md5.sum | grep gcc-4.3.3.tar.bz2 >> >> d3338b75fa6f83be08908b1eed56d439 gcc-4.3.3.tar.bz2 >> >> $ md5sum gcc-4.3.3.tar.bz2 >> cc3c5565fdb9ab87a05ddb106b

Re: Archive for SPEC CPU 2K/2006 results?

2009-01-26 Thread Ian Lance Taylor
"H.J. Lu" writes: > My website isn't visible to public. Also it isn't really benchmark since > I only run functional tests. My reports only show pass or which tests > failed. For what it's worth, Diego is posting his spec runs on my website, at http://www.airs.com/dnovillo/spec2000/ . I'd be ha

Re: gcc-4.3.3.tar.bz2 md5sum does not match

2009-01-27 Thread Ian Lance Taylor
Richard Guenther writes: > On Mon, Jan 26, 2009 at 7:53 PM, Ian Lance Taylor wrote: >> Richard Guenther writes: >> >>> On Mon, Jan 26, 2009 at 4:23 PM, Andrew Walrond wrote: >>>> I've tried two mirrors with the same results: >>

Re: Serious code generation/optimisation bug (I think)

2009-01-27 Thread Ian Lance Taylor
Daniel Jacobowitz writes: > On Tue, Jan 27, 2009 at 06:52:18PM +1100, zol...@bendor.com.au wrote: >> // Debug( tst->value ); >> >>if ( ! tst ) { >>ptr->next = (void *) 0; >>break; >>} > > This optimization comes up on the list frequently. Do folks thi

Re: Serious code generation/optimisation bug (I think)

2009-01-27 Thread Ian Lance Taylor
Laurent GUERBY writes: > Just curious: is there a "portable" way to read from memory > address zero in C code? "portable" here means likely to work > on most compilers without exotic compile flags in 2009. char *my_null_pointer; char fn() { return *my_null_pointer; } It will be quite a while be

Re: Serious code generation/optimisation bug (I think)

2009-01-27 Thread Ian Lance Taylor
Robert Dewar writes: > Interestingly, my viewpoint on this from the compiler domain might > seem to be quite inconsistent. I think it is generally a bad idea > for compilers to aggressively optimize based on assumptions that > programs are free of these kinds of mistakes. I would only be in > fav

Re: RFD: simple instruction cache code layout heuristics

2009-01-27 Thread Ian Lance Taylor
Joern Rennecke writes: > So I was wodering if we could get a good first-order approximation > by placing library code that is called frequently together with the > code that is calling it. A co-worker of mine at Google did some experiments along those lines using gold. He was not able to demons

Re: New GCC Runtime Library Exception

2009-01-27 Thread Ian Lance Taylor
David Edelsohn writes: > The GCC Steering Committee, along with the Free Software Foundation > and the Software Freedom Law Center, is pleased to announce the release > of a new GCC Runtime Library Exception. > > This license exception has been developed to allow various GCC > libraries to upgrad

Re: Serious code generation/optimisation bug (I think)

2009-01-27 Thread Ian Lance Taylor
Chris Lattner writes: > On Jan 27, 2009, at 1:10 PM, Ian Lance Taylor wrote: > >> Laurent GUERBY writes: >> >>> Just curious: is there a "portable" way to read from memory >>> address zero in C code? "portable" here means likely to work &g

Re: Serious code generation/optimisation bug (I think)

2009-01-27 Thread Ian Lance Taylor
Chris Lattner writes: > On Jan 27, 2009, at 5:10 PM, Ian Lance Taylor wrote: > >> Chris Lattner writes: >> >>> On Jan 27, 2009, at 1:10 PM, Ian Lance Taylor wrote: >>> >>>> Laurent GUERBY writes: >>>> >>>>> Just cur

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-28 Thread Ian Lance Taylor
Joern Rennecke writes: > The definition of 'independent module' is such that it does not include files > that make no use of any runtime interfaces at all. E.g. a newlib file > is an independent module if it uses a multiply and that multiply is > implemented as a libgcc function all by gcc, but

Re: RFC: case insensitive for #include

2009-01-28 Thread Ian Lance Taylor
"H.J. Lu" writes: > I got a request to try "FOO.H" if foo.h doesn't exist when dealing > with > > #include "foo.h" > > Any comments? Please, no. They could use header.gcc instead. http://gcc.gnu.org/onlinedocs/cppinternals/Files.html Ian

Re: RFC: case insensitive for #include

2009-01-28 Thread Ian Lance Taylor
"H.J. Lu" writes: > On Wed, Jan 28, 2009 at 12:32 PM, Ian Lance Taylor wrote: >> "H.J. Lu" writes: >> >>> I got a request to try "FOO.H" if foo.h doesn't exist when dealing >>> with >>> >>> #include &

Re: RFC: case insensitive for #include

2009-01-28 Thread Ian Lance Taylor
"H.J. Lu" writes: > Say I have > > #include "Foo/Foo.h" > > I want to map it to foo/foo.h on disk. Can I map Foo to foo with > header.gcc in directory, foo? Yes. Put this at top level (i.e., in the same directory where the directory "foo" is): Foo/Foo.h foo/foo.h Then #include "Foo/Foo.h" wil

Re: Void Pointer Alignment - GCC 3.4.6

2009-01-28 Thread Ian Lance Taylor
Rohit Arul Raj writes: > I am working with GCC 3.4.6 for a private target. The Alignment of all > pointer variables in my target is supposed to be 16bits. But it seems > that for void pointers, the alignment by default is taken as 8 bits. I > have defined the following macros to get the desired a

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: > Quoting Manuel López-Ibáñez : > >> 2009/1/29 Joern Rennecke : >>> The runtime library license says that you can link libgcc with proprietary code, whether that proprietary code was compiled with gcc or whether it was compiled with some non-gcc proprietary c

Re: New GCC Runtime Library Exception

2009-01-29 Thread Ian Lance Taylor
Florian Weimer writes: > The difference is that the front end does not work on source code, but > Java bytecode, which seems closer to intermediate representation than > to a "high-level, non-intermediate language". I think it is clear that Java bytecode, which can even be executed directly by s

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: >>> Note that there is also code which is not written in a high level language >>> which uses gcc runtime library interfaces. For example, look at >>> libgloss/m68k/crt0.S , which uses __do_global_dtors . >>> That the license of libgloss is GPL-compatible does not help her

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: > Quoting Ian Lance Taylor : >> Code that is neither Target Code nor an Independent Module is code >> that has never been involved with gcc, and the license does not cover >> it. > > There is a lot of Target code that is, per definition, not an &

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: >> The license says that you have permission to propagate works when >> certain conditions apply. It does not say that you do not have >> permission if certain other conditions apply. Therefore, if certain >> conditions apply, you have permission. It is not necessary for

Re: New GCC Runtime Library Exception

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: >> > The difference is that the front end does not work on source code, but >> > Java bytecode, which seems closer to intermediate representation than >> > to a "high-level, non-intermediate language". >> >> I think it is clear that Java bytecode, which can even be executed

Re: New GCC Runtime Library Exception

2009-01-29 Thread Ian Lance Taylor
Florian Weimer writes: > * Ian Lance Taylor: > >> Florian Weimer writes: >> >>> The difference is that the front end does not work on source code, but >>> Java bytecode, which seems closer to intermediate representation than >>> to a "high-leve

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: > You seem to be saying that I could do incremental linking, first > linking libgcc against the Independent Modules, slapping my own > license on the partially linked work of Target Code (provided all > used pieces of libgcc are target code - that is hardly ever the > case,

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: > Combining the runtime Library with Independent Modules is certainly > more specific than combining the runtime Library with Independent Modules > and anything else you feel like. > Moreover, a typical link will contain Target Code which has not been > generated by Eligibl

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: > So, assuming you may link in other stuff that is not an Independent > Module, that logically includes pieces derived from gcc itself if you > make sure that they either don't need the GCC runtime, or that they > incorporate pieces of it. You'd only need to make sure that

Re: New GCC Runtime Library Exception: not fit for purpose

2009-01-29 Thread Ian Lance Taylor
Joern Rennecke writes: > Quoting Ian Lance Taylor : > >> Joern Rennecke writes: >> >>> So, assuming you may link in other stuff that is not an Independent >>> Module, that logically includes pieces derived from gcc itself if you >>> make sure that th

GCC Runtime Library Exception

2009-01-30 Thread Ian Lance Taylor
After the e-mail flurry, here is my personal summary of the issues regarding the GCC Runtime Library Exception (http://www.gnu.org/licenses/gcc-exception.html). I personally think that this includes all the substantive issues which were raised, though I understand that others may disagree. * The

Re: GCC Runtime Library Exception

2009-01-30 Thread Ian Lance Taylor
Sebastian Redl writes: > Ian Lance Taylor wrote: >> LLVM byte code is generated by LLVM, not gcc. The question here is >> whether it is desirable to permit using LLVM to generate LLVM byte >> code and to then use GCC to turn that byte code into machine code. >>

Re: help needed on gcc instruction scheduling with unspec_volatile()

2009-02-02 Thread Ian Lance Taylor
raja.sal...@iap-online.com writes: > In gcc, while instruction scheduling can it be possible to suspend the > scheduling for some instructions ? or No. You can turn off instruction scheduling for the entire compilation. You can use #pragma GCC optimize to turn scheduling off for a specific func

Re: Stack traces and sections in PE/COFF

2009-02-02 Thread Ian Lance Taylor
Piotr Wyderski writes: > The PE header walker is able to > dump PE sections, > but they have strange, numeric names, e.g.: > > sec[5]: name = /4 That strange numeric name is used when the section name is more than 8 characters long. The value after the '/' is an offset into the string table. I

Re: help needed on gcc instruction scheduling with unspec_volatile()

2009-02-03 Thread Ian Lance Taylor
raja.sal...@iap-online.com writes: >>> Is there a way to make the instruction has to allocate to run without >>> using the scheduler for particular instruction ? >> >> I don't understand the question. > > The target we are using supports parallel instruction execution, Max 7. > For one cycle, one

Re: gcc 4.5 ... && 32 build on 64

2009-02-03 Thread Ian Lance Taylor
"Brian O'Mahoney" writes: > Two quick questions: This message might have been better sent to gcc-h...@gcc.gnu.org. Please consider taking any followups there. Thanks. > (1) Is the feature roadmap for 4.5, 4.6 ... published anywhere No. We're not that formal. Likely major features are LTO,

Re: unspec_volatile() RTL template

2009-02-03 Thread Ian Lance Taylor
raja.sal...@iap-online.com writes: > Can anybody explain about the unspec_volatile() rtl template usage, sample > example and the purpose of it. unspec_volatile is documented in the gcc internals manual. There are many examples of using it in the existing gcc backends. The purpose is to permit

Re: Constant folding and Constant propagation

2009-02-05 Thread Ian Lance Taylor
Jean Christophe Beyler writes: > I'm currently working on removing the constant folding and constant > propagation because, on the architecture I'm working on, it is highly > costly to move a constant into a register if the number is big (we can > say over 16 bits). > > Currently, I've been looki

Re: Constant folding and Constant propagation

2009-02-06 Thread Ian Lance Taylor
Jean Christophe Beyler writes: > All of these have an outer code of SET. Therefore, I'm not quite > positive of how I'm supposed to implement my rtx_cost function. Since > I don't seem to get a choice between a set 0xcb03 and a (plus 0xcafe > 5), how can I tell the compiler the different costs?

Re: Constant folding and Constant propagation

2009-02-06 Thread Ian Lance Taylor
Bernd Schmidt writes: >> But I don't know that gcc will implement the particular optimization >> that you are looking for. I'm not aware of any other processor which is >> able to load a large constant in a single instruction, but for which an >> add instruction is cheaper if there is a similar

Re: Difference between vec_shl_ and ashl3

2009-02-10 Thread Ian Lance Taylor
"Bingfeng Mei" writes: > Could anyone explain to me what is difference between > vec_shl_ and ashl3 patterns? It seems to me > that both shift a vector operand 1 with scalar operand 2. The difference is that with a vector mode gcc will look for the standard name vec_shl_MODE, and with a non-vect

Re: Difference between vec_shl_ and ashl3

2009-02-10 Thread Ian Lance Taylor
"Bingfeng Mei" writes: > Thanks for prompt reply. Just out of curiosity. Isn't this naming > convention for shift instructions inconsistent with other patterns? > For example, we can define add3 and GCC will > automatically use it by vectorization or in plus expression of two > vector types. Why

<    9   10   11   12   13   14   15   16   17   18   >