[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-05 Thread hjl at gcc dot gnu dot org
--- Comment #16 from hjl at gcc dot gnu dot org 2008-08-05 15:43 --- Subject: Bug 37010 Author: hjl Date: Tue Aug 5 15:41:59 2008 New Revision: 138730 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=138730 Log: gcc/ 2008-08-05 H.J. Lu [EMAIL PROTECTED] PR

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread Joey dot ye at intel dot com
--- Comment #6 from Joey dot ye at intel dot com 2008-08-04 08:28 --- (In reply to comment #3) Joey, when we compute frame layout, we don't count the duplicated return address pushed onto stack when DRAP is used. Also when we push return address, shouldn't we use -UNITS_PER_WORD,

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread Joey dot ye at intel dot com
--- Comment #7 from Joey dot ye at intel dot com 2008-08-04 09:03 --- This problem is associated with -mpreferred-stack-boundary=2, rather than with stack alignment. Following case fails on trunk before merging with stack branch: $ cat y1.c /* PR middle-end/37010 */ /* { dg-do run {

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread Joey dot ye at intel dot com
--- Comment #8 from Joey dot ye at intel dot com 2008-08-04 09:11 --- Root cause is that outgoing parameter frame is aligned based on stack pointer. Namely, address_of_stack_param = SP + offset + fixed_padding. With -mpreferred-stack-boundary=2, alignment of SP is only 4 bytes.

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread hjl dot tools at gmail dot com
--- Comment #9 from hjl dot tools at gmail dot com 2008-08-04 12:24 --- (In reply to comment #7) This problem is associated with -mpreferred-stack-boundary=2, rather than with stack alignment. Following case fails on trunk before merging with stack branch: Of course, before stack

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread hjl dot tools at gmail dot com
--- Comment #10 from hjl dot tools at gmail dot com 2008-08-04 12:26 --- (In reply to comment #8) Root cause is that outgoing parameter frame is aligned based on stack pointer. Namely, address_of_stack_param = SP + offset + fixed_padding. With -mpreferred-stack-boundary=2,

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread Joey dot ye at intel dot com
--- Comment #11 from Joey dot ye at intel dot com 2008-08-04 14:11 --- (In reply to comment #10) Did you mean we needed 2 additional 'and $-16, sp insns to align the stack? I don't think so. Definitely not. Solution 1: Just ignore it. __m128 parameter shouldn't be passed with

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread hjl dot tools at gmail dot com
--- Comment #12 from hjl dot tools at gmail dot com 2008-08-04 19:38 --- (In reply to comment #11) (In reply to comment #10) Did you mean we needed 2 additional 'and $-16, sp insns to align the stack? I don't think so. Definitely not. Solution 1: Just ignore it. __m128

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread hjl dot tools at gmail dot com
--- Comment #13 from hjl dot tools at gmail dot com 2008-08-04 21:29 --- The previous ix86_compute_frame_layout uses /* Align start of frame for local function. */ frame-padding1 = ((offset + stack_alignment_needed - 1) -stack_alignment_needed) - offset; to

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread hjl dot tools at gmail dot com
--- Comment #14 from hjl dot tools at gmail dot com 2008-08-04 21:43 --- With stack alignment, we have different stack frame layouts. We need to handle them properly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37010

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-04 Thread Joey dot ye at intel dot com
--- Comment #15 from Joey dot ye at intel dot com 2008-08-05 01:01 --- (In reply to comment #12) I think the problem is in /* Set offset to aligned because the realigned frame tarts from here. */ if (stack_realign_fp) offset = (offset + stack_alignment_needed -1)

[Bug target/37010] -mno-accumulate-outgoing-args doesn't work with stack alignment

2008-08-03 Thread hjl dot tools at gmail dot com
--- Comment #5 from hjl dot tools at gmail dot com 2008-08-04 05:52 --- It is the problem with -mno-accumulate-outgoing-args: bash-3.2$ /export/build/gnu/gcc-avx/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-avx/build-x86_64-linux/gcc/ -m32 -msse2 -DDEBUG