diff mbox

libffi: define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32

Message ID mvmr3fbhlj0.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab March 15, 2016, 2:18 p.m. UTC
Like x32, aarch64 ILP32 needs to define FFI_SIZEOF_JAVA_RAW.  This fixes
the java interpreter.

Andreas.

	* src/aarch64/ffitarget.h (FFI_SIZEOF_JAVA_RAW) [__ILP32__]:
	Define.
---
 libffi/src/aarch64/ffitarget.h | 1 +
 1 file changed, 1 insertion(+)

Comments

James Greenhalgh March 16, 2016, 10:50 a.m. UTC | #1
On Tue, Mar 15, 2016 at 03:18:43PM +0100, Andreas Schwab wrote:
> Like x32, aarch64 ILP32 needs to define FFI_SIZEOF_JAVA_RAW.  This fixes
> the java interpreter.

Should this go through upstream libffi first? I can't remember the right
order for these.

Anyway, this is OK in whatever order is needed.

Thanks,
James

> 
> Andreas.
> 
> 	* src/aarch64/ffitarget.h (FFI_SIZEOF_JAVA_RAW) [__ILP32__]:
> 	Define.
> ---
>  libffi/src/aarch64/ffitarget.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libffi/src/aarch64/ffitarget.h b/libffi/src/aarch64/ffitarget.h
> index 2862ec7..34200ad 100644
> --- a/libffi/src/aarch64/ffitarget.h
> +++ b/libffi/src/aarch64/ffitarget.h
> @@ -29,6 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
>  #ifndef LIBFFI_ASM
>  #ifdef __ILP32__
>  #define FFI_SIZEOF_ARG 8
> +#define FFI_SIZEOF_JAVA_RAW  4
>  typedef unsigned long long ffi_arg;
>  typedef signed long long ffi_sarg;
>  #else
> -- 
> 2.7.3
> 
> -- 
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>
Andreas Schwab March 16, 2016, 11:16 a.m. UTC | #2
James Greenhalgh <james.greenhalgh@arm.com> writes:

> On Tue, Mar 15, 2016 at 03:18:43PM +0100, Andreas Schwab wrote:
>> Like x32, aarch64 ILP32 needs to define FFI_SIZEOF_JAVA_RAW.  This fixes
>> the java interpreter.
>
> Should this go through upstream libffi first? I can't remember the right
> order for these.

Dunno, things have gone either way.

Andreas.
Jeff Law April 27, 2016, 4:13 a.m. UTC | #3
On 03/15/2016 08:18 AM, Andreas Schwab wrote:
> Like x32, aarch64 ILP32 needs to define FFI_SIZEOF_JAVA_RAW.  This fixes
> the java interpreter.
>
> Andreas.
>
> 	* src/aarch64/ffitarget.h (FFI_SIZEOF_JAVA_RAW) [__ILP32__]:
> 	Define.
Doesn't libffi come from an upstream project?  If so, shouldn't this 
patch be submitted there?

https://sourceware.org/libffi/

jeff
diff mbox

Patch

diff --git a/libffi/src/aarch64/ffitarget.h b/libffi/src/aarch64/ffitarget.h
index 2862ec7..34200ad 100644
--- a/libffi/src/aarch64/ffitarget.h
+++ b/libffi/src/aarch64/ffitarget.h
@@ -29,6 +29,7 @@  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 #ifndef LIBFFI_ASM
 #ifdef __ILP32__
 #define FFI_SIZEOF_ARG 8
+#define FFI_SIZEOF_JAVA_RAW  4
 typedef unsigned long long ffi_arg;
 typedef signed long long ffi_sarg;
 #else