This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cft] fix big-endian bitfield problems
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Nov 2004 12:49:25 +0100
- Subject: Re: [cft] fix big-endian bitfield problems
- References: <20041112031344.GA16377@redhat.com>
> Will someone please test this on powerpc, sparc, and hppa and see
> if it does the job?
The testsuite is clean again on sparc-sun-solaris2.8, but we still have a few
regressions on sparc64-sun-solaris2.9:
FAIL: gcc.c-torture/execute/20010605-2.c execution, -O1
FAIL: gcc.c-torture/execute/20010605-2.c execution, -O2
FAIL: gcc.c-torture/execute/20010605-2.c execution, -Os
FAIL: gcc.c-torture/execute/20020227-1.c execution, -O0
FAIL: gcc.c-torture/execute/20020227-1.c execution, -O1
FAIL: gcc.c-torture/execute/920625-1.c execution, -Os
FAIL: gcc.c-torture/execute/strct-stdarg-1.c execution, -Os
FAIL: tmpdir-gcc.dg-struct-layout-1/t024 c_compat_x_tst.o-c_compat_y_tst.o
execute
They might be corner cases and/or related to CONCATs, e.g. 20010605-2.c:
before:
- lduw [%fp+1991], %g1
- sllx %g1, 32, %g1
- lduw [%fp+1995], %g4
- or %g4, %g1, %g4
- stx %g4, [%fp+2031]
- ldd [%fp+2031], %f10
- st %f10, [%fp+1975]
- st %f11, [%fp+1979]
after:
+ mov 0, %o3
+ ldx [%fp+1991], %g4
+ and %o3, 64, %o2
+ srlx %g4, 1, %g1
+ movre %o3, %g0, %g1
+ sllx %g4, %o3, %o4
+ or %g1, %o4, %o4
+ sllx %g4, %o3, %o5
+ movrne %o2, %o5, %o4
+ st %o4, [%fp+2031]
+ ld [%fp+2031], %f8
+ st %f8, [%fp+1975]
+ st %o4, [%fp+1979]
--
Eric Botcazou