|
dd5bd030
|
2021-04-07T05:42:10
|
|
Fix building for arm windows with mingw toolchains (#631)
* arm: Check _WIN32 instead of _M_ARM or _MSC_VER for detecting windows
This matches what was done for ARM64 in
c06468fa6674d3783a0edb1d0fae9afc8bc28513.
* arm: Only use armasm source when building with MSVC
When building for windows/arm with clang, the normal gas style .S
source works fine (if fixed up to support thumb and other windows
specifics).
This matches what was done for ARM64 in
c06468fa6674d3783a0edb1d0fae9afc8bc28513.
* arm: Fix sysv.S to work in thumb mode
Align cases in jump tables (adding nop padding to make sure each
case starts where expected).
Rewrite instructions that add directly to the pc register.
For ffi_closure_ret, factor out a call_epilogue subroutine that
restores both sp and pc from the stack; the thumb version of ldm
can't load into the sp register. To avoid excessive ifdeffing, keep
using call_epilogue in arm mode, but keep the shorter "ldm sp, {sp, pc}"
epilogue in that case.
* arm: Add win32 version of trampoline to sysv.S
This matches the version of it in sysv_msvc_arm32.S. The calling
C code expects a specific form of the trampoline on windows; make
sure these work the same on windows regardless of the form of
assembly used.
* arm: Avoid optimizing out clearing the thumb bit of ffi_arm_trampoline
We clear the thumb bit of ffi_arm_trampoline with a bitmask before
memcpying its instructions into closure->tramp.
If the bit isn't cleared, the memcpy of the trampoline function
copies the wrong instructions.
If the ffi_arm_trampoline symbol is declared as an array of int,
the compiler can assume that it is aligned to a 4 byte boundary
and the bitmask operation is a no-op, and optimize it out.
See https://godbolt.org/z/dE3jE1WTz; both Clang and GCC optimize
out the bitmask as it is, while MSVC doesn't. By declaring the
trampoline as an array of unsigned char, the bitmask works as
intended.
|
|
db5706ff
|
2019-04-26T04:58:58
|
|
add support for 32-bit ARM on Windows (#477)
* add support for 32-bit ARM on Windows
* fix mismatched brace in appveyor.yml
* remove arm platform from appveyor.yml for now
* fix arm build
* fix typo
* fix assembler names
* try Visual Studio 2017
* add windows arm32 to .appveyor.yml
* update README.md
|
|
bc4fc07a
|
2015-12-21T00:37:06
|
|
Fixed #181 -- Corrected problems with ARMv7 build under iOS.
Based on a patch from @fealebenpae, with input from @SolaWing and @rth7680,
and testing from @superdump.
|
|
ab83cbb9
|
2014-10-29T14:38:42
|
|
arm: Add support for Go closures
|
|
a529bec2
|
2014-10-21T11:26:59
|
|
arm: Add support for complex types
|
|
5e88ebe6
|
2014-10-20T15:10:43
|
|
arm: Remove internal FFI_TYPE constants
These have been replaced by the contents of internal.h.
|
|
a4b785ea
|
2014-10-17T02:07:32
|
|
arm: Rewrite ffi_closure
Move the push of the argument registers into ffi_closure_SYSV,
reducing the size of the trampoline.
|
|
e7f15f60
|
2014-10-17T01:27:16
|
|
arm: Rewrite ffi_call
Use the trick to allocate the stack frame for ffi_call_SYSV
within ffi_call itself.
|
|
8360bf1c
|
2012-02-23T07:01:13
|
|
Ensure that users don't include ffitarget.h directly
|
|
ff9454da
|
2011-11-12T17:18:51
|
|
Add David Gilbert's variadic function call support
|
|
2db72615
|
2010-11-21T10:50:56
|
|
Rebase
|
|
d14178be
|
2010-07-23T09:14:00
|
|
FFI_LAST_ABI fix
|
|
c6dddbd0
|
2009-10-04T08:11:33
|
|
Initial commit
|