Rebase post GCC merge
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* -----------------------------------------------------------------*-C-*-
|
||||
ffitarget.h - Copyright (c) 2012, 2009 Anthony Green
|
||||
ffitarget.h - Copyright (c) 2009 Anthony Green
|
||||
Target configuration macros for Moxie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@@ -27,10 +27,6 @@
|
||||
#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
|
||||
|
||||
/* ---- System specific configurations ----------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
@@ -39,9 +35,13 @@ typedef signed long ffi_sarg;
|
||||
|
||||
typedef enum ffi_abi {
|
||||
FFI_FIRST_ABI = 0,
|
||||
|
||||
#ifdef MOXIE
|
||||
FFI_EABI,
|
||||
FFI_LAST_ABI,
|
||||
FFI_DEFAULT_ABI = FFI_EABI
|
||||
FFI_DEFAULT_ABI = FFI_EABI,
|
||||
#endif
|
||||
|
||||
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
|
||||
} ffi_abi;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ ffi_closure_ASM:
|
||||
|
||||
/* look up the proper starting point in table */
|
||||
/* by using return type as offset */
|
||||
lhz r3, 10(r3) /* load type from return type */
|
||||
ld r4, LC..60(2) /* get address of jump table */
|
||||
sldi r3, r3, 4 /* now multiply return type by 16 */
|
||||
ld r0, 240+16(r1) /* load return address */
|
||||
@@ -339,8 +340,9 @@ L..finish:
|
||||
|
||||
/* look up the proper starting point in table */
|
||||
/* by using return type as offset */
|
||||
lhz r3, 6(r3) /* load type from return type */
|
||||
lwz r4, LC..60(2) /* get address of jump table */
|
||||
slwi r3, r3, 4 /* now multiply return type by 4 */
|
||||
slwi r3, r3, 4 /* now multiply return type by 16 */
|
||||
lwz r0, 176+8(r1) /* load return address */
|
||||
add r3, r3, r4 /* add contents of table to table address */
|
||||
mtctr r3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Kaz Kojima
|
||||
ffi.c - Copyright (c) 2002-2008, 2012 Kaz Kojima
|
||||
Copyright (c) 2008 Red Hat, Inc.
|
||||
|
||||
SuperH Foreign Function Interface
|
||||
@@ -463,7 +463,8 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
||||
unsigned int *tramp;
|
||||
unsigned int insn;
|
||||
|
||||
FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
|
||||
if (cif->abi != FFI_SYSV)
|
||||
return FFI_BAD_ABI;
|
||||
|
||||
tramp = (unsigned int *) &closure->tramp[0];
|
||||
/* Set T bit if the function returns a struct pointed with R2. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
ffi.c - Copyright (c) 2003, 2004, 2006, 2007 Kaz Kojima
|
||||
ffi.c - Copyright (c) 2003, 2004, 2006, 2007, 2012 Kaz Kojima
|
||||
Copyright (c) 2008 Anthony Green
|
||||
|
||||
SuperH SHmedia Foreign Function Interface
|
||||
@@ -302,7 +302,8 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
||||
{
|
||||
unsigned int *tramp;
|
||||
|
||||
FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
|
||||
if (cif->abi != FFI_SYSV)
|
||||
return FFI_BAD_ABI;
|
||||
|
||||
tramp = (unsigned int *) &closure->tramp[0];
|
||||
/* Since ffi_closure is an aligned object, the ffi trampoline is
|
||||
|
||||
Reference in New Issue
Block a user