public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/7831: GCC 3.2 MIPS64 endian issues
@ 2002-09-04 18:56 cvansch
  0 siblings, 0 replies; only message in thread
From: cvansch @ 2002-09-04 18:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7831
>Category:       c
>Synopsis:       GCC 3.2 MIPS64 endian issues
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 04 18:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Carl van Schaik
>Release:        gcc version 3.2
>Organization:
>Environment:
x86 host, mips64el-l4-elf-gcc crosscompiler
Configured with: ./configure --target=mips64el-l4-elf --enable-64-bit-bfd --enable-languages=c --with-gnu-as --with-gnu-ld : (reconfigured) ./configure --target=mips64el-l4-elf --enable-64-bit-bfd --enable-languages=c --with-gnu-as --with-gnu-ld --prefix=/usr/local/mips : (reconfigured) ./configure --target=mips64el-l4-elf --enable-64-bit-bfd --enable-languages=c --with-gnu-as --with-gnu-ld --prefix=/usr/local/mips : (reconfigured) ./configure --target=mips64el-l4-elf --enable-64-bit-bfd --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --prefix=/usr/local/mips
>Description:
gcc compiled to default to little endian, but is producing some big-endian load/stores.

Specific problem was fixed by specifiing "-EL" compiler flag.
Assembler code showed:
    1fc8:       ffa20030        sd      v0,48(sp)
...
    1fe4:       dfa20008        ld      v0,8(sp)
    1fe8:       0002103e        dsrl32  v0,v0,0x0
...
    1ffc:       dfa30008        ld      v1,8(sp)
    2000:       8fa20030        lw      v0,52(sp) <- error here, should be 48(sp)
    2004:       00431016        dsrlv   v0,v1,v0
>How-To-Repeat:
with no optimizations, the extracted code would be equivalent to:
word_t = unsigned long int

word_t i = 32;
printf("x = %x\n", (word_t) vaddr >> 32);
printf("x = %x  %x\n", (word_t) vaddr >> i, i);
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-05  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 18:56 c/7831: GCC 3.2 MIPS64 endian issues cvansch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).