Commit 2c4ed456 by Hosaka Yuji Committed by Andreas Tobler

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
parent c25d9caa
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
......
......@@ -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;
......
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