summaryrefslogtreecommitdiff
path: root/src/alpha
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2012-01-23 14:24:01 -0500
committerAnthony Green <green@moxielogic.com>2012-01-23 14:24:01 -0500
commit211060eb8f714af0e935430efa6bb45e8e3ffc5d (patch)
tree3547f0d00d137e8a54d75ce32c55bb0c3c9a0785 /src/alpha
parent78d9c638ba0de6edfbc603fd65d19c6562663248 (diff)
downloadlibffi-211060eb8f714af0e935430efa6bb45e8e3ffc5d.tar.gz
Alpha fix
Diffstat (limited to 'src/alpha')
-rw-r--r--src/alpha/ffi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/alpha/ffi.c b/src/alpha/ffi.c
index 8d6b2ba..192f691 100644
--- a/src/alpha/ffi.c
+++ b/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) */