[Bug target/36634] -msecure-plt combine gives invalid call insn
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.3.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
--- Comment #2 from amodra at gcc dot gnu dot org 2008-07-04 02:32 --- Subject: Bug 36634 Author: amodra Date: Fri Jul 4 02:32:01 2008 New Revision: 137447 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137447 Log: PR target/36634 * config/rs6000/rs6000.md (call, call_value): Don't arrange for pic_offset_table_rtx to be marked as used here. (call_nonlocal_sysv, call_value_nonlocal_sysv): Add split for TARGET_SECURE_PLT to use pic_offset_table_rtx. (call_nonlocal_sysv_secure, call_value_nonlocal_sysv_secure): New insn. (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Assert !TARGET_SECURE_PLT. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
--- Comment #3 from amodra at gcc dot gnu dot org 2008-07-04 02:33 --- Subject: Bug 36634 Author: amodra Date: Fri Jul 4 02:32:23 2008 New Revision: 137448 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137448 Log: PR target/36634 * config/rs6000/rs6000.md (call, call_value): Don't arrange for pic_offset_table_rtx to be marked as used here. (call_nonlocal_sysv, call_value_nonlocal_sysv): Add split for TARGET_SECURE_PLT to use pic_offset_table_rtx. (call_nonlocal_sysv_secure, call_value_nonlocal_sysv_secure): New insn. (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Assert !TARGET_SECURE_PLT. Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/config/rs6000/rs6000.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
--- Comment #4 from amodra at gcc dot gnu dot org 2008-07-04 02:34 --- Subject: Bug 36634 Author: amodra Date: Fri Jul 4 02:33:29 2008 New Revision: 137449 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=137449 Log: PR target/36634 * config/rs6000/rs6000.md (call, call_value): Don't arrange for pic_offset_table_rtx to be marked as used here. (call_nonlocal_sysv, call_value_nonlocal_sysv): Add split for TARGET_SECURE_PLT to use pic_offset_table_rtx. (call_nonlocal_sysv_secure, call_value_nonlocal_sysv_secure): New insn. (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Assert !TARGET_SECURE_PLT. Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/config/rs6000/rs6000.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
--- Comment #5 from amodra at bigpond dot net dot au 2008-07-04 02:53 --- Created an attachment (id=15850) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15850action=view) patch for 4.1 Since there will be no more releases from 4.1 branch, I won't be applying the patch to that branch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
--- Comment #6 from amodra at bigpond dot net dot au 2008-07-04 02:53 --- Fixed all active branches -- amodra at bigpond dot net dot au changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
--- Comment #1 from amodra at bigpond dot net dot au 2008-06-27 01:52 --- (insn 9 8 11 1 (set (reg/v/f:SI 119 [ p ]) (mem/u/c:SI (plus:SI (reg:SI 30 30) (const:SI (minus:SI (symbol_ref/u:SI (*.LC2) [flags 0x2]) (symbol_ref:SI (*.LCTOC1) [5 S4 A8])) -1 (nil) (expr_list:REG_EQUAL (symbol_ref:SI (myprint) [flags 0x1] function_decl 0x40164300 myprint) (nil))) [snip] (call_insn 12 11 13 1 (parallel [ (call (mem:SI (reg/v/f:SI 119 [ p ]) [0 S4 A8]) (const_int 0 [0x0])) (use (const_int 0 [0x0])) (clobber (scratch:SI)) ]) -1 (nil) (nil) (expr_list:REG_DEP_TRUE (use (reg:SI 3 3)) (nil))) The first instruction is a GOT load of the function address, the second an indirect call. No problem there. Indirect calls for -msecure-plt don't need the GOT pointer to be valid. The trouble occurrs when combine substitutes the first insn into the second to get: (call_insn 12 11 13 0 (parallel [ (call (mem:SI (symbol_ref:SI (myprint) [flags 0x1] function_decl 0x40164300 myprint) [0 S4 A8]) (const_int 0 [0x0])) (use (const_int 0 [0x0])) (clobber (scratch:SI)) ]) 402 {*call_nonlocal_sysv} (insn_list:REG_DEP_TRUE 11 (nil)) (expr_list:REG_UNUSED (scratch:SI) (expr_list:REG_DEAD (reg:SI 3 3) (nil))) (expr_list:REG_DEP_TRUE (use (reg:SI 3 3)) (nil))) Note that lack of anything marking r30 as used. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634
[Bug target/36634] -msecure-plt combine gives invalid call insn
-- amodra at bigpond dot net dot au changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |amodra at bigpond dot net |dot org |dot au Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Known to fail||4.1.3 4.2.5 Last reconfirmed|-00-00 00:00:00 |2008-06-25 21:30:58 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36634