Commit Graph

53 Commits

Author SHA1 Message Date
Anthony Green
2f450822a8 Clean up code to appease modern GCC compiler. 2013-11-18 06:52:29 -05:00
David Schneider
77f823e31f stop trying to assing vfp regs once we are done with the registers 2013-11-13 14:26:57 +01:00
David Schneider
37067ec503 mark all vfp registers as used when done.
To avoid assigning registers the would fit, once arguments have been on
the stack, we mark all registers as used once we do not find a free
register for the first time.
2013-11-12 19:49:01 +01:00
Anthony Green
c2422174b3 Merge pull request #45 from foss-for-synopsys-dwc-arc-processors/arc_support
arc: Fix build error
2013-11-02 17:11:08 -04:00
Anthony Green
128cd1d2f3 Fix spelling errors 2013-10-08 06:45:51 -04:00
David Schneider
9708e7cf09 folow the ARM hard-float ABI in ffi_prep_incoming_args_VFP 2013-03-28 16:40:40 +01:00
David Schneider
b41120981e create separated versions of ffi_prep_incoming_args_* for SYSV and VFP ABIs.
The different versions will be called depending on the value of cif->abi
2013-03-28 16:40:40 +01:00
David Schneider
3c1608613a extend ffi_prepare_args for FFI_VFP (hard-float ABI), fixing an issue with passing VFP arguments in VFP registers and the stack, while at the same time not using all core registers. 2013-03-28 16:38:28 +01:00
David Schneider
0f2ff2d4c9 separate ARM ffi_prepare_args in a version implementing the simple SYSV calling convention and one for the hard-float calling convention 2013-03-28 16:38:25 +01:00
David Schneider
3a352b8a82 move the hardfloat specific argument copying code to the helper function 2013-03-28 16:38:21 +01:00
David Schneider
5df6b7944a extract setting of arguments to be passed to a helper function 2013-03-28 16:38:15 +01:00
David Schneider
7d1048c471 extract code to align the argument storage pointer to a helper function 2013-03-28 16:38:10 +01:00
Zachary Waldowski
39e6a58604 More mac/ios build improvements 2012-04-11 22:39:46 -04:00
Zachary Waldowski
39dccddb60 Fix building with Clang for Darwin (OS X 10.6+ and iOS
4.0+)
2012-04-05 12:32:41 -04:00
Anthony Green
e1539266e6 ARM VFP fix for old toolchains 2012-03-30 00:40:18 -04:00
Anthony Green
8360bf1cd0 Ensure that users don't include ffitarget.h directly 2012-02-23 07:01:13 -05:00
Anthony Green
ff9454da44 Add David Gilbert's variadic function call support 2011-11-12 17:18:51 -05:00
Anthony Green
322052ce65 Fix arm wince alignment issue 2011-11-12 16:11:49 -05:00
Anthony Green
3d56106b07 Rebase 2011-11-12 07:20:24 -05:00
Anthony Green
d992ac54a2 Refresh from GCC 2011-07-29 17:32:53 -04:00
Anthony Green
09f8f310f4 More AIX fixes. rc9. 2011-02-28 15:36:07 -05:00
Landon Fuller
3000dc237f Merge remote branch 'upstream/master' 2011-02-13 08:55:53 -05:00
Anthony Green
1fbf9dc44f Fix bad_abi test. rc5. 2011-02-13 08:06:39 -05:00
Landon Fuller
8195e0e11d Fix symbol prefixes on Darwin. 2011-02-12 11:27:00 -05:00
Landon Fuller
28a00f61ff Apple assembler support; fixed most gas/ELF-isms. 2011-02-12 11:01:48 -05:00
Landon Fuller
7f2ea33a80 Replace RETLDM macro.
The macro is incompatible with Apple's assembler; switch to
a simple inline version.
2011-02-12 10:39:18 -05:00
Anthony Green
0cad4386fa Add ChangeLog entry. Fix copyright headers. 2011-02-09 06:11:46 -05:00
Anthony Green
1106229a57 Add iOS support 2011-02-08 19:20:09 -05:00
Anthony Green
0e5843995f Refresh from GCC 2011-02-08 07:52:40 -05:00
Anthony Green
2db72615b5 Rebase 2010-11-21 10:50:56 -05:00
Landon Fuller
f6ab3edc23 Include the license header in the generated output. 2010-10-27 19:34:51 -04:00
Landon Fuller
cef6194628 Add missing copyright/license header. 2010-10-27 14:01:01 -04:00
Landon Fuller
83038cf24a Implement FFI_EXEC_TRAMPOLINE_TABLE allocator for iOS/ARM.
This provides working closure support on iOS/ARM devices where
PROT_WRITE|PROT_EXEC is not permitted. The code passes basic
smoke tests, but requires further review.
2010-09-19 14:36:45 -07:00
Landon Fuller
b00ff3e98f Rename the generated symbol 2010-09-19 14:22:26 -07:00
Landon Fuller
9e1196444e Add a hard-coded FFI_EXEC_TRAMPOLINE_TABLE arm implementation.
This implements support for re-mapping a shared table of executable
trampolines directly in front of a writable configuration page, working
around PROT_WRITE restrictions for sandboxed applications on Apple's
iOS.

This implementation is for testing purposes; a proper allocator is still
necessary, and ARM-specific code needs to be moved out of
src/closures.c.
2010-09-19 10:43:06 -07:00
Landon Fuller
f38364b399 Fix symbol prefix for ffi_closure_SYSV_inner on Darwin. 2010-09-19 10:42:36 -07:00
Landon Fuller
36849e7716 Whitespace/comment fixes. 2010-09-19 09:35:04 -07:00
Landon Fuller
9af9291b73 Add the trampoline table generated by gentramp.sh 2010-09-19 08:52:33 -07:00
Landon Fuller
68ce0c383e Add a shell script that generates the ARM trampoline page.
This generates a page of 340 trampolines, aligned within one page. The
trampolines use pc-relative addressing to reference config data
(context, jump address) from a page placed directly prior to the
trampoline page. This can be used on systems -- such as iOS -- that do not
support writable, executable memory by remapping the executable page
containing the trampolines directly above a newly allocated writable
config page.
2010-09-19 08:38:19 -07:00
Landon Fuller
70150bdf45 Add missing UNWIND entry; disables .pad on non-EABI targets. 2010-09-18 16:38:03 -07:00
Landon Fuller
6b452bafae Apple assembler support; fixed most gas/ELF-isms. 2010-09-18 16:21:32 -07:00
Landon Fuller
8ddac835b6 Fix placement of the __APPLE__ macro. 2010-09-18 15:38:06 -07:00
Landon Fuller
69043d0293 Work-around libffi's FP ABI detection.
On iOS, we must use the AAPCS floating point return value calling
conventions. libffi's ARM implementation will only use these conventions
if __SOFTFP__ is defined, which is not the case when GCC's
-mfloat-abi defaults to 'softfp' instead of 'soft'. To work around this
we manually define __SOFTFP__ for Apple platforms in the ARM-specific
sysv.S.

See also:
  http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iPhoneOSABIReference/Introduction/Introduction.html
  http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
2010-09-18 15:32:08 -07:00
Anthony Green
d14178be4c FFI_LAST_ABI fix 2010-07-23 09:14:00 -04:00
Anthony Green
3f5b1375ab rebase 2010-07-12 14:39:18 -04:00
Anthony Green
9dc9a293f3 Rebase to latest GCC sources 2010-04-13 10:33:52 -04:00
Anthony Green
7b7a42f221 Rebase from GCC 2010-01-12 09:14:14 -05:00
Anthony Green
c3042afaf3 Reset quilt patches post 3.0.9 merge with GCC 2010-01-01 08:08:02 -05:00
Anthony Green
0cfe60e9d1 3.0.9rc12 2009-12-29 10:06:04 -05:00
Anthony Green
9458d88f67 Rebase from GCC 2009-12-26 07:02:27 -05:00