diff options
author | Hosaka Yuji <hos@tamanegi.org> | 2003-12-02 05:39:06 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2003-12-02 06:39:06 +0100 |
commit | 2c4ed4565a5bc1cc785dc95d36df2414c06c709b (patch) | |
tree | 6e68cc307e392203998ed80c0370307d4906a49a /libffi | |
parent | c25d9caa3ba2ed27a6d5d0284af2bb576a584c28 (diff) | |
download | gcc-2c4ed4565a5bc1cc785dc95d36df2414c06c709b.zip gcc-2c4ed4565a5bc1cc785dc95d36df2414c06c709b.tar.gz gcc-2c4ed4565a5bc1cc785dc95d36df2414c06c709b.tar.bz2 |
re PR libffi/13221 (libffi's closure couldn't pass sequence of char and/or short arguments.)
2003-12-02 Hosaka Yuji <hos@tamanegi.org>
PR other/13221
* src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV):
Align arguments to 32 bits.
From-SVN: r74161
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ChangeLog | 6 | ||||
-rw-r--r-- | libffi/src/x86/ffi.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 8d0fa81..557cf7f 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2003-12-02 Hosaka Yuji <hos@tamanegi.org> + + PR other/13221 + * src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV): + Align arguments to 32 bits. + 2003-12-01 Andreas Tobler <a.tobler@schweiz.ch> PR other/13221 diff --git a/libffi/src/x86/ffi.c b/libffi/src/x86/ffi.c index bd0874f..14b0295 100644 --- a/libffi/src/x86/ffi.c +++ b/libffi/src/x86/ffi.c @@ -62,8 +62,8 @@ void ffi_prep_args(char *stack, extended_cif *ecif) size_t z; /* Align if necessary */ - if (((*p_arg)->alignment - 1) & (unsigned) argp) - argp = (char *) ALIGN(argp, (*p_arg)->alignment); + if ((sizeof(int) - 1) & (unsigned) argp) + argp = (char *) ALIGN(argp, sizeof(int)); z = (*p_arg)->size; if (z < sizeof(int)) @@ -301,8 +301,8 @@ ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, size_t z; /* Align if necessary */ - if (((*p_arg)->alignment - 1) & (unsigned) argp) { - argp = (char *) ALIGN(argp, (*p_arg)->alignment); + if ((sizeof(int) - 1) & (unsigned) argp) { + argp = (char *) ALIGN(argp, sizeof(int)); } z = (*p_arg)->size; |