This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: function parms in reg patch


Alan,

This patch:

2003-05-02  Alan Modra  <amodra@bigpond.net.au>

        * calls.c (struct arg_data): Move offset, slot_offset, size and
        alignment_pad to struct locate_and_pad_arg_data.  Update all refs.
        (initialize_argument_information): Adjust call to 
locate_and_pad_parm.
        Delete alignment_pad var.  Don't calculate slot_offset here.
        (emit_library_call_value_1): Delete alignment_pad, offset and size
        vars.  Use struct locate_and_pad_arg_data instead.  Adjust refs.
        Adjust call to locate_and_pad_parm.  Don't tweak arg size for
        partial in-regs here.  Formatting fixes.
        * expr.h (struct locate_and_pad_arg_data): New struct.
        (locate_and_pad_parm): Adjust declaration.
        * function.c (assign_parms): Localize vars.  Use "locate" instead 
of
        other arg location vars.  Don't invoke FUNCTION_ARG or
        FUNCTION_INCOMING_ARG unless pretend_named is different from
        named_arg.  Heed MUST_PASS_IN_STACK and set up "partial" before
        calling locate_and_pad_parm.  Adjust locate_and_pad_parm call.
        Use slot_offset for stack home of reg parms.  Correct test for
        parm passed in memory.  Formatting fixes.
        (locate_and_pad_parm): Add "partial" to params.  Replace offset_ptr
        arg_size_ptr and alignment pad with "locate".  Set slot_offset 
here.
        Correct initial_offset_ptr handling.  Localize vars.  Always pad
        locate->offset even when in_regs.

Is causing many regression failures on arm-elf, and causing bootstrap 
failures on arm-netbsd.  It seems that when a double or long long is being 
split between registers and the stack the two words of the argument are 
swapped round.  So for

test3 (int a, int b, int c, long long value, int after)

with arguments   test3 (1, 2, 3, 0x123456789abcdefLL, 0x55);

The arguments passed are

r0 = 1
r1 = 2
r2 = 3
r4 = 0x89abcdef
[sp] = 0x01234567
[sp+4] = 0x55

When they must be

r0 = 1
r1 = 2
r2 = 3
r4 = 0x01234567
[sp] = 0x89abcdef
[sp+4] = 0x55

(this is a little-endian config).

R.

New testsuite failures (C only, arm-elf+newlib):

FAIL: gcc.c-torture/execute/20000706-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/20000706-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/20000706-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/20000706-1.c execution,  -Os 
FAIL: gcc.c-torture/execute/20000706-2.c execution,  -O0 
FAIL: gcc.c-torture/execute/20000706-2.c execution,  -O1 
FAIL: gcc.c-torture/execute/20000706-2.c execution,  -O2 
FAIL: gcc.c-torture/execute/20000706-2.c execution,  -Os 
FAIL: gcc.c-torture/execute/20000717-5.c execution,  -O0 
FAIL: gcc.c-torture/execute/20000717-5.c execution,  -O1 
FAIL: gcc.c-torture/execute/20000717-5.c execution,  -O2 
FAIL: gcc.c-torture/execute/20000717-5.c execution,  -Os 
FAIL: gcc.c-torture/execute/20020411-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/20020411-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/20020411-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/20020411-1.c execution,  -Os 
FAIL: gcc.c-torture/execute/920501-2.c execution,  -O0 
FAIL: gcc.c-torture/execute/920501-2.c execution,  -O1 
FAIL: gcc.c-torture/execute/920501-2.c execution,  -O2 
FAIL: gcc.c-torture/execute/920501-2.c execution,  -Os 
FAIL: gcc.c-torture/execute/920501-5.c execution,  -O0 
FAIL: gcc.c-torture/execute/920501-5.c execution,  -O1 
FAIL: gcc.c-torture/execute/920501-5.c execution,  -O2 
FAIL: gcc.c-torture/execute/920501-5.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/920501-5.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/920501-5.c execution,  -Os 
FAIL: gcc.c-torture/execute/930603-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/930603-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/930603-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/930603-1.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/930603-1.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/930603-1.c execution,  -Os 
FAIL: gcc.c-torture/execute/991216-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/991216-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/991216-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/991216-1.c execution,  -Os 
FAIL: gcc.c-torture/execute/complex-6.c execution,  -O0 
FAIL: gcc.c-torture/execute/complex-6.c execution,  -O1 
FAIL: gcc.c-torture/execute/complex-6.c execution,  -O2 
FAIL: gcc.c-torture/execute/complex-6.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/complex-6.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/complex-6.c execution,  -Os 
FAIL: gcc.c-torture/execute/conversion.c execution,  -O0 
FAIL: gcc.c-torture/execute/conversion.c execution,  -O1 
FAIL: gcc.c-torture/execute/conversion.c execution,  -O2 
FAIL: gcc.c-torture/execute/conversion.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/conversion.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/conversion.c execution,  -Os 
FAIL: gcc.c-torture/execute/func-ptr-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/func-ptr-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/func-ptr-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/func-ptr-1.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/func-ptr-1.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/func-ptr-1.c execution,  -Os 
FAIL: gcc.c-torture/execute/gofast.c execution,  -O0 
FAIL: gcc.c-torture/execute/gofast.c execution,  -O1 
FAIL: gcc.c-torture/execute/gofast.c execution,  -O2 
FAIL: gcc.c-torture/execute/gofast.c execution,  -Os 
FAIL: gcc.c-torture/execute/struct-ret-1.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/struct-ret-1.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -Os 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O3 
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/rbug.c execution,  -Os 
FAIL: gcc.dg/compat/scalar-by-value-2 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/compat/struct-by-value-1 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/compat/struct-by-value-2 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/compat/struct-by-value-3 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/compat/struct-by-value-4 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/compat/struct-by-value-5 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/20000906-1.c execution test
FAIL: gcc.dg/builtins-6.c execution test
FAIL: gcc.dg/const-elim-1.c scan-assembler-not LC
FAIL: gcc.dg/struct-by-value-1.c execution test

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]