diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2003-12-05 01:36:44 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2003-12-05 01:36:44 +0000 |
| commit | 04cb6b3aa6b5510707e141f00c75103c16f16744 (patch) | |
| tree | ead4c3d249a6ae029feb046a2af69191e974848f /lib/libc | |
| parent | 21cbd69b1968c6b231e919efe46d35068e0b2161 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/amd64/gen/makecontext.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/amd64/gen/makecontext.c b/lib/libc/amd64/gen/makecontext.c index 87cf7bfe3db1..74eb68a88a14 100644 --- a/lib/libc/amd64/gen/makecontext.c +++ b/lib/libc/amd64/gen/makecontext.c @@ -70,8 +70,12 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) /* Allocate space for a maximum of 6 arguments on the stack. */ args = sp - 6; - /* Account for arguments on stack and align to 16 bytes. */ - sp -= 8; + /* + * Account for arguments on stack and do the funky C entry alignment. + * This means that we need an 8-byte-odd alignment since the ABI expects + * the return address to be pushed, thus breaking the 16 byte alignment. + */ + sp -= 7; /* Add the arguments: */ va_start(ap, argc); |
