This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, alpha]: Fix libffi.call/err_bad_abi.c testsuite failure


Hello!

Attached patch fixes following testsuite failures on alpha-linux-gnu:

FAIL: libffi.call/err_bad_abi.c -O0 -W -Wall execution test
FAIL: libffi.call/err_bad_abi.c -O2 execution test
FAIL: libffi.call/err_bad_abi.c -O3 execution test
FAIL: libffi.call/err_bad_abi.c -Os execution test
FAIL: libffi.call/err_bad_abi.c -O2 -fomit-frame-pointer execution test

Patched libffi passes testsuite with:

		=== libffi Summary ===

# of expected passes		1634
# of unsupported tests		15


2011-03-04  Uros Bizjak  <ubizjak@gmail.com>

	* src/alpha/ffi.c (ffi_prep_closure_loc): Check for bad ABI.

Uros.

--- ffi.c	2011-03-04 21:42:30.000000000 +0100
+++ ffi.c.ub	2011-03-04 21:42:09.000000000 +0100
@@ -178,6 +178,9 @@ ffi_prep_closure_loc (ffi_closure* closu
 {
   unsigned int *tramp;

+  if (cif->abi != FFI_OSF)
+    return FFI_BAD_ABI;
+
   tramp = (unsigned int *) &closure->tramp[0];
   tramp[0] = 0x47fb0401;	/* mov $27,$1		*/
   tramp[1] = 0xa77b0010;	/* ldq $27,16($27)	*/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]