Commit 5027395e by Uros Bizjak Committed by Uros Bizjak

re PR target/69140 (stack alignment + O1 breaks with Microsoft ABI)

	PR target/69140
	* config/i386/i386.c (ix86_expand_prologue): Declare fs.sp_valid
	depending on frame_pointer_needed before remaining integer and SSE
	registers are saved.

testsuite/ChangeLog:

	PR target/69140
	* gcc.target/i386/pr69140.c: New test

From-SVN: r232111
parent 7443cf13
2016-01-06 Uros Bizjak <ubizjak@gmail.com>
PR target/69140
* config/i386/i386.c (ix86_expand_prologue): Declare fs.sp_valid
depending on frame_pointer_needed before remaining integer and SSE
registers are saved.
2015-01-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vsx.md (*p9_vecload_<mode>): Replace VSX_M
......
......@@ -13065,6 +13065,8 @@ ix86_expand_prologue (void)
m->fs.fp_valid = true;
}
m->fs.sp_valid = !frame_pointer_needed;
if (!int_registers_saved)
ix86_emit_save_regs_using_mov (frame.reg_save_offset);
if (!sse_registers_saved)
2016-01-06 Uros Bizjak <ubizjak@gmail.com>
PR target/69140
* gcc.target/i386/pr69140.c: New test
2016-01-06 David Malcolm <dmalcolm@redhat.com>
* gcc.dg/bad-dereference.c: New test case.
......
/* { dg-do compile { target lp64 } } */
/* { dg-options "-O2 -mincoming-stack-boundary=3" } */
typedef struct {
unsigned int buf[4];
unsigned char in[64];
} MD4_CTX;
static void
MD4Transform (unsigned int buf[4], const unsigned int in[16])
{
unsigned int a, b, c, d;
(b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]);
(a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]);
(d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]);
buf[3] += d;
}
void __attribute__((ms_abi))
MD4Update (MD4_CTX *ctx, const unsigned char *buf)
{
MD4Transform( ctx->buf, (unsigned int *)ctx->in);
MD4Transform( ctx->buf, (unsigned int *)ctx->in);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment