mirror of
https://github.com/partic2/libffi
synced 2026-11-11 02:27:19 +00:00
sparc: Re-add abi compliant structure support
The original code, removed in the "rewrite" patch, was incorrect for large structures, and required dynamic allocation of a trampoline on every ffi_call. Instead, allocate a 4k entry table of all possible structure returns. The table is 80k, but is read-only and dynamically paged, which ought to be better than allocating the trampoline. This is difficult to test with gcc. One can only use -O0 at present. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63668.
This commit is contained in:
+1
-1
@@ -188,7 +188,7 @@ E SPARC_RET_F_1
|
||||
std %f6, [%l2+56]
|
||||
|
||||
! Copy the structure into place.
|
||||
srl %l0, SPARC_FLTMASK_SHIFT, %o0 ! load size_mask
|
||||
srl %l0, SPARC_SIZEMASK_SHIFT, %o0 ! load size_mask
|
||||
mov %i2, %o1 ! load dst
|
||||
mov %l2, %o2 ! load src_gp
|
||||
call C(ffi_struct_float_copy)
|
||||
|
||||
Reference in New Issue
Block a user