Replicate static chain on the stack
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 17 Jul 2015 23:02:25 +0000 (23:02 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 17 Jul 2015 23:02:25 +0000 (16:02 -0700)
commitf6f6b749d69f22218545b95433579fdb2af285e6
tree4fd38423573f155ce3da3dba5c9c1a1a1661292e
parentde19301a86d2e3a71ffeb958239b3ec18a77b382
Replicate static chain on the stack

If we put static chain on the stack, we need to replicate it on the stack
when stack is realigned with DRAP so that static chain can be reached via
(argp - 2) slot.

gcc/

PR target/66906
* config/i386/i386.c (ix86_expand_prologue): Replicate static
chain on the stack.

gcc/testsuite/

PR target/66906
* gcc.target/i386/pr66906.c: New test.

From-SVN: r225974
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr66906.c [new file with mode: 0644]