PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...

2006-11-28 Thread Etienne Lorrain
Hello, My problem is quite simple, the PPC has few conditions registers and some are assumed to be saved over function calls (in my test case NU_Sleep()), but the hard real time kernel do not save those (partial flags) registers. This behaviour is perfectly documented in gcc-4.1.1/gcc/config/rs6

Re : PPC440, GCC-4.1.1 supposes cr{2,3,4} saved but the hard real time kernel doesn't...

2006-11-28 Thread Etienne Lorrain
ped on cygwin: $ gcc -v Using built-in specs. Target: i686-pc-cygwin Configured with: ../gcc-4.1.1/configure Thread model: single gcc version 4.1.1 Etienne. - Message d'origine De : Ian Lance Taylor <[EMAIL PROTECTED]> À : Etienne Lorrain <[EMAIL PROTECTED]> Cc : gcc

Disable auto-generation of strncpy on ppc?

2007-02-13 Thread Etienne Lorrain
Hello, [EMAIL PROTECTED] /cygdrive/x $ cat tmp.c typedef unsigned size_t; char *strncpy (char *pDest, const char *pSrc, size_t n) { return pDest; } [EMAIL PROTECTED] /cygdrive/x $ powerpc-eabi-gcc -v Using built-in specs. Target: powerpc-eabi Configured with: ../gcc-4.1.1/configure --ta

Re: Disable auto-generation of strncpy on ppc?

2007-02-13 Thread Etienne Lorrain
Sorry please ignore, not enough coffee... Etienne. ___ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expér

Re: Disable auto-generation of strncpy on ppc?

2007-02-13 Thread Etienne Lorrain
--- Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > I don't actually understand the question. gcc is compiling the > function as you wrote it. What do you want it to do differently? This has been resolved today by: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30785 I was adding code to test a

CPP inconsistency

2005-04-19 Thread Etienne Lorrain
Hi, Just a minor thing, but I hit this problem times to times, I know the CPP preprocessor has no warning like "end of line ignored"... GCC-3.3.5 and 3.4.3. [EMAIL PROTECTED]:~/projet$ cat > tmp.c #define OPTION1 0x0001 #define OPTION2 0x0002 #define OPTION3 0x0004 #define OPTION4 0x0008 #

Re: Proposal: GCC core changes for different address spaces

2005-04-25 Thread Etienne Lorrain
Paul Schlie wrote: > My impression is that there are 3 fundamental types of memory references: > > - literal-code (call/goto code-label/ptr) > - literal-data (mem static-const-symbol/ptr) > - runtime-data (mem non-static-const-symbol/ptr) > > As such it seems likely sufficient to simply enable the

Re: GCC 3.4.4 RC1

2005-05-11 Thread Etienne Lorrain
> GCC 3.4.4 RC1 is available here: > > ftp://gcc.gnu.org/pub/gcc/prerelease-3.4.4-20050510/ I downloaded and rebuild for ia32 with latest pre binutils on my project and noticed an increase of size. I am compiling with -Os because size is very important in my case - so I invertigated by lookin

Re: GCC 3.4.4 RC1

2005-05-11 Thread Etienne Lorrain
> Etienne Lorrain <[EMAIL PROTECTED]> wrote: > >> Some of those problem may also exist in GCC-4.0 because this >> version (and the 4.1 I tested) gives me an increase of 60% of the >> code size compared to 3.4.3. > > > This is a serious regression which

Re: GCC 3.4.4 RC1

2005-05-12 Thread Etienne Lorrain
> Etienne Lorrain <[EMAIL PROTECTED]> wrote: > >> If I compile that with GCC-3.4, I get: >> >> $ size tmp.o >> textdata bss dec hex filename >> 243 0 0 243 f3 tmp.o >> >> With GCC-4.0: >> >

Re: GCC 3.4.4 RC1

2005-05-12 Thread Etienne Lorrain
> Etienne Lorrain <[EMAIL PROTECTED]> wrote: > >> If I compile that with GCC-3.4, I get: >> >> $ size tmp.o >> textdata bss dec hex filename >> 243 0 0 243 f3 tmp.o >> >> With GCC-4.0: >> >

Re: GCC 3.4.4 RC2

2005-05-16 Thread Etienne Lorrain
> GCC 3.4.4 RC2 is now available here: > ftp://gcc.gnu.org/pub/gcc/prerelease-3.4.4-20050512 > There are just a few changes from RC1 to fix critical problems people experienced with RC1. Work for me, thanks. Etienne.

GCC-4.0 vs GCC-3.3.6 ia32 -Os: code size increase from 261 to 5339 bytes

2005-05-20 Thread Etienne Lorrain
Hello, This stripped down extract of a real file (main.c of Gujin-1.1) gives: [EMAIL PROTECTED]:~/projet/gujin$ gcc -Os tst.c -c -o tst.o && size tst.o textdata bss dec hex filename 261 0 0 261 105 tst.o [EMAIL PROTECTED]:~/projet/gujin$ ../toolchain/

Re: GCC-4.0 vs GCC-3.3.6 ia32 -Os: code size increase from 261 to 5339 bytes

2005-05-20 Thread Etienne Lorrain
--- Falk Hueffner <[EMAIL PROTECTED]> wrote: > You should always enter it on bugzilla, if you cannot find this out > for yourself. We have highly trained professionals who will swiftly > close duplicate bug reports, and that way the report cannot get lost. So it is: http://gcc.gnu.org/bugzilla/s

sizeof() function parameter array: known problem?

2005-07-01 Thread Etienne Lorrain
The result of this funtion is 1, is there a C lawyer around? $ cat tmp.c unsigned fct (unsigned array[10]) { return sizeof(array) / sizeof(array[0]); } $ gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/m

GCC-4.0.2 20050811: should GCC consider inlining functions in between different sections?

2005-08-12 Thread Etienne Lorrain
Hello, Subject says it all - I do not know if that is new. I just have a bug in Gujin-1.2 with this new compiler, because function: __attribute__ ((section (".xcode_start"), noreturn)) void xcodeseg_never_call_address_zero (void) calls xcodeseg_BOOT1_putstr() generated by macro: #define GE

Re: GCC-4.0.2 20050811: should GCC consider inlining functions in between different sections?

2005-08-12 Thread Etienne Lorrain
--- Richard Guenther <[EMAIL PROTECTED]> wrote: > Please explain the problem you're seeing. I can see nothing wrong with > inlining functions within different sections in general. If you're > trying to do things behind the compilers back, though, be prepared to > change workarounds with compiler

ia32: clearing a 7116 bytes struct inserted as "C.171.8759: .zero 7116 ... memcpy()" with gcc-4.0.2

2005-08-24 Thread Etienne Lorrain
Hello, Investigated again a big increase of size going from GCC-3.4 to 4.x (gcc (GCC) 4.0.2 20050811 (prerelease)) on my Gujin-v1.2, quickly way to reproduce: Download and untar gujin, then build "fs.s" : url_get http://prdownloads.sourceforge.net/gujin/gujin-1.2.tar.gz?download tar -xvzf

Re: ia32: clearing a 7116 bytes struct inserted as "C.171.8759: .zero 7116 ... memcpy()" with gcc-4.0.2

2005-08-26 Thread Etienne Lorrain
Thanks James, Shall I create a new bug report or re-open: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21626 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21478 Etienne. --- James E Wilson <[EMAIL PROTECTED]> wrote: > Etienne Lorrain wrote: > > Investigated again a big i

gcc-4.0-20050908 is now available

2005-09-09 Thread Etienne Lorrain
I do not know if http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23477 should be fixed in this release, but I am sure http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23631 which was marked as duplicate is not fixed: [EMAIL PROTECTED]:~/projet/gujin$ cat > tmp.c int sub (int i) { int array[100]

RE: gcc-4.0-20050908 is now available

2005-09-10 Thread Etienne Lorrain
The bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23631 was filled against 4.0.2-pre and is concerning C; the bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23477 is in C++ and filled against 4.1, it was marked duplicate, but it would be nice to have 4.0.2 fixed before release. Etienne.

Re: GCC 4.0.2 RC2

2005-09-19 Thread Etienne Lorrain
Hello, You really do not want to get a correction for: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23631 before release? I checked again with 4.0.2 20050917, and nothing has changed since: http://gcc.gnu.org/ml/gcc/2005-09/msg00251.html Etienne. _

Re: GCC 4.0.2 RC2

2005-09-19 Thread Etienne Lorrain
--- Paolo Bonzini <[EMAIL PROTECTED]> wrote: > Etienne Lorrain wrote: > > Hello, > > > > You really do not want to get a correction for: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23631 > > before release? > > > > I checked agai

WouldBeNice/Optimisation: const variable-parameter-list for printf

2005-12-21 Thread Etienne Lorrain
Hello, A lot of people (me too) write this kind of code: struct param1_str *param1; struct param2_str *param2; struct param3_str *param3; error = treat_alpha (param1, param2, param3); if (error) printf ("treat_alpha failed error %d, param1 = %p, " "param2 = %p, param3 = %p

Building/installing gcc-4.4.1, pb with headers/libraries

2009-08-04 Thread Etienne Lorrain
Hello, I am trying to rebuild gcc, for my target (ia32/amd64 bootloader) I will not use any library whatsoever, target is ia32. If I do: rm -f -r ../toolchain mkdir ../toolchain ../toolchain/source ../toolchain/build tar --directory ../toolchain -xjf ../binutils-2.19.1.tar.bz2 mv ../toolchain

ia32 gcc-Debian 4.3.2-1 "rep ret" ?

2008-12-04 Thread Etienne Lorrain
Hello, I did not find any documentation of a "rep ret" instruction, at http://www.intel.com/design/processor/manuals/253667.pdf they just say: "The behavior of the REP prefix is undefined when used with non-strings instructions". Any pointers? Thanks, Etienne. etienne:~$ gcc --version gcc

Undocumented and used behaviour (was: Re: GCC-only software)

2009-03-11 Thread Etienne Lorrain
Manuel López-Ibáñez wrote: > Anything not documented there is likely to change or be removed in the > future, so you should not rely on it. On the other hand, if you find > some behaviour that you feel should be documented and it is not, > please submit a documentation patch (or at least open a b

Re: Undocumented and used behaviour (was: Re: GCC-only software)

2009-03-12 Thread Etienne Lorrain
--- Mer 11.3.09, Ian Lance Taylor wrote: > But they aren't documented in the user manual. I think > they should be, just as we document the machine specific > constraint characters in the user manual. > I think it would be appropriate to open a bug report about this. > > Ian http://gcc.gnu.org

GCC-4.1 -fno-function-cse still supported?

2006-05-12 Thread Etienne Lorrain
Hello, the docs for "-fno-function-cse" says: `-fno-function-cse' Do not put function addresses in registers; make each instruction that calls a constant function contain the function's address explicitly. This option results in less efficient code, but some strange hacks

Re: optimizing calling conventions for function returns

2006-05-24 Thread Etienne Lorrain
> Looking at assembly listings of the Linux kernel I see thousands of > places where function returns are checked to be non-zero to indicate > errors. For example something like this: > > mov bx, 0 > .L1 >call foo >test ax,ax >jnz .Lerror Another calling convention could be to no

Re: optimizing calling conventions for function returns

2006-05-24 Thread Etienne Lorrain
--- Andrew Pinski wrote: > On May 24, 2006, at 2:54 AM, Etienne Lorrain wrote: > > Another calling convention could be to not only return the "return > > value" in %eax (or %edx:%eax for long long returns) but also its > > comparisson to zero in the flags, so

GCC 4.1.1 prerelease ia32 extra assembly instructions (not regression)

2006-05-24 Thread Etienne Lorrain
Was just looking again at the assembly file generated by GCC, and noted this pattern I have already seen - maybe beginning with 4.0. In short: [EMAIL PROTECTED]:~/projet/gujin$ /home/etienne/projet/toolchain/bin/gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configu

Re: help interpreting gcc 4.1.1 optimisation bug

2006-06-14 Thread Etienne Lorrain
> The correct version is I think, > > void longcpy(long* _dst, long* _src, unsigned _numwords) > { > asm volatile ( > "cld \n\t" > "rep \n\t" > "movsl \n\t" > // Outputs (read/write) > : "=S" (_src), "=D" (_dst), "=c" (_numwords) >

RE : Re: help interpreting gcc 4.1.1 optimisation bug

2006-06-14 Thread Etienne Lorrain
--- Andrew Haley <[EMAIL PROTECTED]> wrote: > Etienne Lorrain writes: > > > The correct version is I think, > > > > > > void longcpy(long* _dst, long* _src, unsigned _numwords) > > > { > > > asm volatile ( > > &

Re: does gcc support multiple sizes, or not?

2006-08-16 Thread Etienne Lorrain
DJ Delorie wrote: > I strongly request we continue supporting the use of attribute((mode)) > to create pointers of different sizes, at least for copying and > passing. The m32c reset vector and interrupt table really want to be > set up like this example: > > typedef void (*ifunc)() __attribute__(

Re: [RFC] Program Bounds Checking

2006-09-28 Thread Etienne Lorrain
You write you needs 6 assembly instructions to check a pointer on x86, I am using the "bound" ia32 instruction (1 byte opcode 0x62, invalid in ia64) to check the stack pointer for few years now in Gujin (http://gujin.org) without problem. I am doing this kind of thing to guard against stack

RE : Re: [RFC] Program Bounds Checking

2006-09-29 Thread Etienne Lorrain
--- Robert Dewar <[EMAIL PROTECTED]> wrote: > Tzi-cker Chiueh wrote: > > We have considered the bound instruction in the CASH project. But > > we found that bound instruction is slower than the six normal > > instructions it is meant to replace for range checking. For example, the > > bound instruc

Re: 16-bit real-mode code

2005-02-23 Thread Etienne Lorrain
> I ponder about writing a "i386 16bit realmode" gcc backend as my master > thesis - which would be usefull for generating 16-bit bios code needed > by the virtual machine developed at my university. I do not know the virtual machine at your university, but there is two different project you ma

Re: inline assembly question (memory side-effects)

2008-05-12 Thread Etienne Lorrain
> What is the proper way to tell gcc that a inline assembly statement either > modifies > a particular area of memory or needs it to be updated/in-sync because the > assembly > reads from it. Maybe also related to: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32642 i.e. "=m" works for variables

Re: gcc will become the best optimizing x86 compiler -> PPC case

2008-08-01 Thread Etienne Lorrain
> You forgot to look at PowerPC : > > http://cvs.opensolaris.org/source/xref/ppc-dev/ppc-dev/usr/src/lib/libc/ppc/gen/memcpy.s > > is that nice and small ? I had to clear/check the whole 256 Mbytes SDRAM on a PPC system, and the fastest way I got (excluding DMA access) is by playing with the laye

Re: gcc will become the best optimizing x86 compiler -> PPC case

2008-08-06 Thread Etienne Lorrain
---Andrew Pinski <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote: > > The PPC has a very fast dcbz (data cache block zero) to clear memory, > > and also dcbi (data cache block invalidate) which permit to have a > > cached line caching an address without reading first the memory (when > > yo

Why --with-gmp doesn't default to --prefix for GCC-4.3.* ?

2008-08-26 Thread Etienne Lorrain
If you build and install binutils (for instance in $HOME), I think GCC build will use them when using --prefix to build GCC. But for GMP and MPFR, you need to set --with-gmp to the same path as --prefix. Would it be simpler to use the same --prefix to build binutils, GMP, MPFR and GCC - so defau

volatile structures: Is that a bug?

2008-09-19 Thread Etienne Lorrain
Hello, On C structures, for attributes like "const", it is enough to consider that each field inherit the attribute of the structure. But for the volatile attribute, is it valid to treat each field as volatile like GCC does it now? I mean: volatile struct { unsigned char a,b,c,d; } volstruct; voi

Re: volatile structures: Is that a bug?

2008-09-19 Thread Etienne Lorrain
> > On C structures, for attributes like "const", it is enough to > > consider that each field inherit the attribute of the structure. > > But for the volatile attribute, is it valid to treat each field as > > volatile like GCC does it now? > > "An object that has volatile-qualified type may be >

Strange error message about condition code in assembly (ia32)

2017-11-06 Thread Etienne Lorrain via gcc
Hello, On GCC: gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0, Binutils: GNU ld (GNU Binutils for Ubuntu) 2.29.1,I get such error messages: boot.c: In function ‘dummy_do_not_call’: boot.c:1656:3: error: invalid 'asm': operand is not a condition code, invalid operand code 'c'    asm volatile (" bootbefore_part