#if CPUFAM_X86
// Arguments come in on the stack, and will need to be collected. We
- // we can get away with just the scratch registers for integer work,
- // but we'll run out of XMM registers and will need some properly
- // aligned space which we'll steal from the stack. I don't trust the
- // stack pointer's alignment, so I'll have to mask the stack pointer,
- // which in turn means I'll need to keep track of the old value.
- // Hence I'm making a full i386-style stack frame here.
+ // can get away with just the scratch registers for integer work, but
+ // we'll run out of XMM registers and will need some properly aligned
+ // space which we'll steal from the stack. I don't trust the stack
+ // pointer's alignment, so I'll have to mask the stack pointer, which
+ // in turn means I'll need to keep track of the old value. Hence I'm
+ // making a full i386-style stack frame here.
//
// The Windows and SysV ABIs are sufficiently similar that we don't
// need to worry about the differences here.
# define SAVE2 xmm7
# define SAVE3 [esp]
- push ebp
- mov ebp, esp
+ pushreg ebp
+ setfp ebp
sub esp, 16
mov IN, [ebp + 12]
mov OUT, [ebp + 16]
# define SAVE2 [rsp + 16]
# define SAVE3 [rsp + 32]
- sub rsp, 48 + 8
- .seh_stackalloc 48 + 8
- .seh_endprologue
+ stalloc 48 + 8
#endif
+ endprologue
+
// First job is to slurp the matrix into XMM registers. Be careful:
// the input matrix isn't likely to be properly aligned.
//
// Tidy things up.
#if CPUFAM_X86
- mov esp, ebp
- pop ebp
+ dropfp
+ popreg ebp
#endif
#if CPUFAM_AMD64 && ABI_WIN
- add rsp, 48 + 8
+ stfree 48 + 8
#endif
// And with that, we're done.