This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: libffi on IA64 HP-UX
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org,hans dot boehm at hp dot com, rth at redhat dot com
- Date: Wed, 30 Mar 2005 09:35:51 -0800 (PST)
- Subject: Re: Patch: libffi on IA64 HP-UX
Here is a resend of my earlier patch with the change that Richard
suggested. Is it OK for checkin on the main line? I tested on IA64
HP-UX and Linux and there are no failures in the libffi testsuite.
Steve Ellcey
sje@cup.hp.com
2005-03-30 Steve Ellcey <sje@cup.hp.com>
* src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.
(ffi_sarg) Ditto.
* src/ia64/unix.S (ffi_closure_unix): Extend gp
to 64 bits in ILP32 mode.
Load 64 bits even for short data.
*** gcc.orig/libffi/src/ia64/ffitarget.h Wed Mar 9 11:25:12 2005
--- gcc/libffi/src/ia64/ffitarget.h Fri Mar 18 15:32:57 2005
***************
*** 27,34 ****
#define LIBFFI_TARGET_H
#ifndef LIBFFI_ASM
! typedef unsigned long ffi_arg;
! typedef signed long ffi_sarg;
typedef enum ffi_abi {
FFI_FIRST_ABI = 0,
--- 27,34 ----
#define LIBFFI_TARGET_H
#ifndef LIBFFI_ASM
! typedef unsigned long ffi_arg __attribute__ ((mode (DI)));
! typedef signed long ffi_sarg __attribute__ ((mode (DI)));
typedef enum ffi_abi {
FFI_FIRST_ABI = 0,
*** gcc.orig/libffi/src/ia64/unix.S Wed Mar 9 11:24:59 2005
--- gcc/libffi/src/ia64/unix.S Wed Mar 30 09:24:41 2005
*************** ffi_closure_unix:
*** 290,297 ****
--- 290,302 ----
.body
/* Retrieve closure pointer and real gp. */
+ #ifdef _ILP32
+ addp4 out0 = 0, gp
+ addp4 gp = 16, gp
+ #else
mov out0 = gp
add gp = 16, gp
+ #endif
;;
ld8 gp = [gp]
*************** ffi_closure_unix:
*** 368,398 ****
add sp = FRAME_SIZE, sp
br.ret.sptk.many b0
;;
! .Lld_int8:
! .body
! .copy_state 1
! ld1 r8 = [r16]
! .restore sp
! add sp = FRAME_SIZE, sp
! br.ret.sptk.many b0
! ;;
! .Lld_int16:
! .body
! .copy_state 1
! ld2 r8 = [r16]
! .restore sp
! add sp = FRAME_SIZE, sp
! br.ret.sptk.many b0
! ;;
! .Lld_int32:
! .body
! .copy_state 1
! ld4 r8 = [r16]
! .restore sp
! add sp = FRAME_SIZE, sp
! br.ret.sptk.many b0
! ;;
! .Lld_int64:
.body
.copy_state 1
ld8 r8 = [r16]
--- 373,379 ----
add sp = FRAME_SIZE, sp
br.ret.sptk.many b0
;;
! .Lld_int:
.body
.copy_state 1
ld8 r8 = [r16]
*************** ffi_closure_unix:
*** 554,573 ****
.Lld_table:
data8 @pcrel(.Lld_void) // FFI_TYPE_VOID
! data8 @pcrel(.Lld_int32) // FFI_TYPE_INT
data8 @pcrel(.Lld_float) // FFI_TYPE_FLOAT
data8 @pcrel(.Lld_double) // FFI_TYPE_DOUBLE
data8 @pcrel(.Lld_ldouble) // FFI_TYPE_LONGDOUBLE
! data8 @pcrel(.Lld_int8) // FFI_TYPE_UINT8
! data8 @pcrel(.Lld_int8) // FFI_TYPE_SINT8
! data8 @pcrel(.Lld_int16) // FFI_TYPE_UINT16
! data8 @pcrel(.Lld_int16) // FFI_TYPE_SINT16
! data8 @pcrel(.Lld_int32) // FFI_TYPE_UINT32
! data8 @pcrel(.Lld_int32) // FFI_TYPE_SINT32
! data8 @pcrel(.Lld_int64) // FFI_TYPE_UINT64
! data8 @pcrel(.Lld_int64) // FFI_TYPE_SINT64
data8 @pcrel(.Lld_void) // FFI_TYPE_STRUCT
! data8 @pcrel(.Lld_int64) // FFI_TYPE_POINTER
data8 @pcrel(.Lld_small_struct) // FFI_IA64_TYPE_SMALL_STRUCT
data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT
data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE
--- 535,554 ----
.Lld_table:
data8 @pcrel(.Lld_void) // FFI_TYPE_VOID
! data8 @pcrel(.Lld_int) // FFI_TYPE_INT
data8 @pcrel(.Lld_float) // FFI_TYPE_FLOAT
data8 @pcrel(.Lld_double) // FFI_TYPE_DOUBLE
data8 @pcrel(.Lld_ldouble) // FFI_TYPE_LONGDOUBLE
! data8 @pcrel(.Lld_int) // FFI_TYPE_UINT8
! data8 @pcrel(.Lld_int) // FFI_TYPE_SINT8
! data8 @pcrel(.Lld_int) // FFI_TYPE_UINT16
! data8 @pcrel(.Lld_int) // FFI_TYPE_SINT16
! data8 @pcrel(.Lld_int) // FFI_TYPE_UINT32
! data8 @pcrel(.Lld_int) // FFI_TYPE_SINT32
! data8 @pcrel(.Lld_int) // FFI_TYPE_UINT64
! data8 @pcrel(.Lld_int) // FFI_TYPE_SINT64
data8 @pcrel(.Lld_void) // FFI_TYPE_STRUCT
! data8 @pcrel(.Lld_int) // FFI_TYPE_POINTER
data8 @pcrel(.Lld_small_struct) // FFI_IA64_TYPE_SMALL_STRUCT
data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT
data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE