summaryrefslogtreecommitdiff
path: root/ext/ffi_c/libffi/src/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi_c/libffi/src/alpha')
-rw-r--r--ext/ffi_c/libffi/src/alpha/ffi.c6
-rw-r--r--ext/ffi_c/libffi/src/alpha/ffitarget.h7
2 files changed, 11 insertions, 2 deletions
diff --git a/ext/ffi_c/libffi/src/alpha/ffi.c b/ext/ffi_c/libffi/src/alpha/ffi.c
index 8d6b2ba..192f691 100644
--- a/ext/ffi_c/libffi/src/alpha/ffi.c
+++ b/ext/ffi_c/libffi/src/alpha/ffi.c
@@ -1,5 +1,6 @@
/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 1998, 2001, 2007, 2008 Red Hat, Inc.
+ ffi.c - Copyright (c) 2012 Anthony Green
+ Copyright (c) 1998, 2001, 2007, 2008 Red Hat, Inc.
Alpha Foreign Function Interface
@@ -178,6 +179,9 @@ ffi_prep_closure_loc (ffi_closure* closure,
{
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) */
diff --git a/ext/ffi_c/libffi/src/alpha/ffitarget.h b/ext/ffi_c/libffi/src/alpha/ffitarget.h
index 7d06eb0..af145bc 100644
--- a/ext/ffi_c/libffi/src/alpha/ffitarget.h
+++ b/ext/ffi_c/libffi/src/alpha/ffitarget.h
@@ -1,5 +1,6 @@
/* -----------------------------------------------------------------*-C-*-
- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc.
+ ffitarget.h - Copyright (c) 2012 Anthony Green
+ Copyright (c) 1996-2003 Red Hat, Inc.
Target configuration macros for Alpha.
Permission is hereby granted, free of charge, to any person obtaining
@@ -27,6 +28,10 @@
#ifndef LIBFFI_TARGET_H
#define LIBFFI_TARGET_H
+#ifndef LIBFFI_H
+#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
+#endif
+
#ifndef LIBFFI_ASM
typedef unsigned long ffi_arg;
typedef signed long ffi_sarg;