Richard Henderson
12cf89ee04
aarch64: Move return value handling into ffi_closure_SYSV
...
As with the change to ffi_call_SYSV, this avoids copying data
into a temporary buffer.
2014-11-12 09:28:44 +01:00
Richard Henderson
4fe1aea121
aarch64: Move return value handling into ffi_call_SYSV
...
This lets us pass return data directly to the caller of ffi_call
in most cases, rather than storing it into temporary storage first.
2014-11-12 09:28:44 +01:00
Richard Henderson
325471ea6a
aarch64: Merge prep_args with ffi_call
...
Use the trick to allocate the stack frame for ffi_call_SYSV
within ffi_call itself.
2014-11-12 09:28:44 +01:00
Richard Henderson
8c8161cb62
aarch64: Tidy up abi manipulation
...
Avoid false abstraction, like get_x_addr. Avoid recomputing data
about the type being manipulated. Use NEON insns for HFA manipulation.
Note that some of the inline assembly will go away in a subsequent patch.
2014-11-12 09:28:44 +01:00
Richard Henderson
b55e03665d
aarch64: Treat void return as not passed in registers
...
This lets us do less post-processing when there's no return value.
2014-11-12 09:28:44 +01:00
Richard Henderson
2e32f9bf6f
aarch64: Use correct return registers
...
There are fewer return registers than argument registers.
2014-11-12 09:28:44 +01:00
Richard Henderson
95a04af134
aarch64: Reduce the size of register_context
...
We don't need to store 32 general and vector registers.
Only 8 of each are used for parameter passing.
2014-11-12 09:28:44 +01:00
Richard Henderson
77c4cddca6
aarch64: Simplify AARCH64_STACK_ALIGN
...
The iOS abi doesn't require padding between arguments, but
that's not what AARCH64_STACK_ALIGN meant. The hardware will
in fact trap if the SP register is not 16 byte aligned.
2014-11-12 09:28:44 +01:00
Richard Henderson
b5f147d847
aarch64: Always distinguish LONGDOUBLE
...
Avoid if-deffery by forcing FFI_TYPE_LONGDOUBLE different
from FFI_TYPE_DOUBLE. This will simply be unused on hosts
that define them identically.
2014-11-12 09:28:44 +01:00
Richard Henderson
38b54b9c18
aarch64: Improve is_hfa
...
The set of functions get_homogeneous_type, element_count, and is_hfa
are all intertwined and recompute data. Return a compound quantity
from is_hfa that contains all the data and avoids the recomputation.
2014-11-12 09:28:44 +01:00
Richard Henderson
18b74ce54a
aarch64: Fix non-apple compilation
2014-11-12 09:28:44 +01:00