Fix xfails

This commit is contained in:
Anthony Green
2011-02-09 07:38:43 -05:00
parent f498318c07
commit 69dbe845f4
16 changed files with 5508 additions and 12 deletions

View File

@@ -28,6 +28,12 @@
#include <ffi.h>
#include <ffi_common.h>
#ifndef __GNUC__
#define __builtin_expect(x, expected_value) (x)
#endif
#define LIKELY(x) __builtin_expect((x),1)
#define UNLIKELY(x) __builtin_expect((x),1)
#include <stdlib.h>
#include <stdarg.h>
@@ -498,6 +504,13 @@ ffi_prep_closure_loc (ffi_closure* closure,
{
volatile unsigned short *tramp;
/* Sanity check on the cif ABI. */
{
int abi = cif->abi;
if (UNLIKELY (! (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI)))
return FFI_BAD_ABI;
}
tramp = (volatile unsigned short *) &closure->tramp[0];
tramp[0] = 0xbb49; /* mov <code>, %r11 */