You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
830 B
29 lines
830 B
https://github.com/libffi/libffi/issues/778
|
|
https://bugs.gentoo.org/882071
|
|
|
|
Fix incorrect type for passing floats. Thanks to Petr Sumbera and Richard Henderson
|
|
for figuring it out on the upstream bug.
|
|
--- a/src/sparc/ffi64.c
|
|
+++ b/src/sparc/ffi64.c
|
|
@@ -382,13 +382,19 @@ ffi_prep_args_v9(ffi_cif *cif, unsigned long *argp, void *rvalue, void **avalue)
|
|
*argp++ = *(SINT32 *)a;
|
|
break;
|
|
case FFI_TYPE_UINT32:
|
|
- case FFI_TYPE_FLOAT:
|
|
*argp++ = *(UINT32 *)a;
|
|
break;
|
|
case FFI_TYPE_SINT64:
|
|
case FFI_TYPE_UINT64:
|
|
case FFI_TYPE_POINTER:
|
|
+ *argp++ = *(UINT64 *)a;
|
|
+ break;
|
|
+ case FFI_TYPE_FLOAT:
|
|
+ flags |= SPARC_FLAG_FP_ARGS;
|
|
+ *argp++ = *(UINT32 *)a;
|
|
+ break;
|
|
case FFI_TYPE_DOUBLE:
|
|
+ flags |= SPARC_FLAG_FP_ARGS;
|
|
*argp++ = *(UINT64 *)a;
|
|
break;
|
|
|