Anthony Green
7d2478568e
Merge pull request #110 from joshtriplett/w64
...
Fix 64-bit Windows support
2014-03-25 16:12:17 -04:00
Josh Triplett
be50b87a49
Always use configure to detect whether global symbols need underscores
...
64-bit Windows already used this check; make it universal, and use it in
place of an ifdef on X86_WIN32, to handle non-Windows platforms that use
the underscore, such as Darwin.
2014-03-24 21:45:47 -07:00
Josh Triplett
56be47f876
Fix a warning on 64-bit Windows
...
When sizeof(size_t) != sizeof(unsigned), adding a size_t to cif->bytes
produces a "possible loss of data" warning. However, the size_t in
question refers to the size of a single parameter. Use a cast to avoid
the warning.
2014-03-24 21:24:53 -07:00
Josh Triplett
48a8eda74a
Avoid referencing undefined ABIs on 64-bit Windows builds
...
64-bit Windows does not have FFI_STDCALL, FFI_THISCALL, or FFI_FASTCALL.
2014-03-24 21:21:12 -07:00
Josh Triplett
f0f4138f90
win32.S: Add handling for position-independent code on Darwin
...
Newer versions of Darwin generate the necessary stub functions
automatically and just need a call instruction, but accomodating older
versions as well requires adding the stub.
2014-03-22 10:04:11 -07:00
Josh Triplett
ef5890ebaf
win32.S: Use shifting for multiplication rather than repeated addition
...
The jump table code added a register to itself twice to multiply by 4;
shift the register left by 2 instead.
2014-03-21 11:02:50 -07:00
Josh Triplett
4fca48901e
win32.S: Make the jump tables position-independent
...
Now that non-Windows platforms include win32.S, it needs to support
building as position-independent code. This fixes build failures on
target platforms that do not allow text relocations.
2014-03-21 11:00:41 -07:00
Josh Triplett
2087dcf736
win32.S: Make calls to ffi_closure_SYSV_inner position-independent
...
Now that non-Windows platforms include win32.S, it needs to support
building as position-independent code. This fixes one source of build
failures on target platforms that do not allow text relocations.
2014-03-21 10:57:06 -07:00
Josh Triplett
e1911f78df
Add support for stdcall, thiscall, and fastcall on non-Windows x86-32
...
Linux supports the stdcall calling convention, either via functions
explicitly declared with the stdcall attribute, or via code compiled
with -mrtd which effectively makes stdcall the default.
This introduces FFI_STDCALL, FFI_THISCALL, and FFI_FASTCALL on
non-Windows x86-32 platforms, as non-default calling conventions.
2014-03-16 05:05:06 -07:00
Anthony Green
edf29c5169
Merge pull request #75 from joshtriplett/longdouble
...
Fix build error on x86 without distinct long double
2014-02-28 00:50:25 -05:00
Josh Triplett
3998d2604b
Fix build error on x86 without distinct long double
...
src/x86/ffi64.c: In function 'classify_argument':
src/x86/ffi64.c:205:5: error: duplicate case value
case FFI_TYPE_LONGDOUBLE:
^
src/x86/ffi64.c:202:5: error: previously used here
case FFI_TYPE_DOUBLE:
^
2014-02-17 11:20:33 -08:00
Zachary Waldowski
9da28b4427
Darwin/x86_64: Fix 64-bit type shortening warnings
2014-02-05 14:28:58 -05:00
Zachary Waldowski
1367534158
Darwin/i386: Inhibit Clang previous prototype warnings
2014-02-05 14:28:53 -05:00
Anthony Green
3dc3f32c35
Undo iOS ARM64 changes.
2013-12-05 16:23:25 -05:00
Zachary Waldowski
33c46ce568
Darwin/Mac: Fix 64/32 shortening warnings
2013-11-30 04:14:10 -05:00
Zachary Waldowski
16ba1b8002
Darwin: Silence Clang warnings.
2013-11-30 03:47:58 -05:00
Mark Kettenis
becd754434
Align the stack pointer to 16-bytes.
2013-11-06 06:43:49 -05:00
Konstantin Belousov
05c3109340
Mark executable as not requiring executable stack.
2013-11-06 06:40:58 -05:00
Vitaly Budovski
6aa15900ac
Don't use 16 byte aligned stack for WIN32
...
This fixes a crash when accessing __stdcall functions in Python ctypes.
2013-09-05 12:05:06 +10:00
Jens Timmerman
b8a91d81be
added include for xmmintrin.h
2013-07-02 10:57:37 +02:00
Alex Gaynor
ee18766b16
Fix for a crasher due to misaligned stack on x86-32.
...
Full information on reproduction (using Python's ctypes available here: http://bugs.python.org/issue17423 )
2013-03-14 15:00:33 -07:00
Anthony Green
fd07c9e404
Add cache flushing routine for sun compiler on sparc solaris 2.8
2013-02-07 18:00:36 -05:00
Anthony Green
6a79012942
Work around LLVM ABI problem on x86-64
2013-02-06 17:37:15 -05:00
Anthony Green
8bf987d4df
Fix for sunpro compiler on Solaris
2013-01-10 17:24:51 -05:00
Anthony Green
2d9b393975
Fix for closures with sunpro compiler
2013-01-09 21:14:54 -05:00
Anthony Green
35ddb69c2b
Only emit DWARF unwind info when building with GCC
2013-01-08 07:53:37 -05:00
Anthony Green
048d2f41c3
Rebase
2012-10-11 10:55:25 -04:00
Anthony Green
a044a56b1c
Linux/x32 libtool fix
2012-04-06 10:39:10 -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
Peter Rosin
3afaa9a34a
Fix return_uc.c test case on windows.
2012-04-03 07:40:31 -04:00
Peter Rosin
0a1ab12a8d
Various MSVC-related changes.
2012-03-30 08:14:08 -04:00
Anthony Green
7c5e60b5f4
Rebase on fixed GCC sources
2012-03-29 08:48:22 -04:00
Anthony Green
bd78c9c331
More cygwin fixes
2012-03-21 08:09:30 -04:00
Anthony Green
964c5b93f8
abi check fixes and Linux/x32 support
2012-03-03 14:46:20 -05:00
Anthony Green
8360bf1cd0
Ensure that users don't include ffitarget.h directly
2012-02-23 07:01:13 -05:00
Anthony Green
dee20f8e45
Rebased from gcc
2012-02-10 13:06:46 -05:00
Anthony Green
1ff9c604bb
Rebase from GCC
2012-02-01 16:34:30 -06:00
Anthony Green
1fbf9dc44f
Fix bad_abi test. rc5.
2011-02-13 08:06:39 -05:00
Anthony Green
69dbe845f4
Fix xfails
2011-02-09 07:38:43 -05:00
Anthony Green
0e5843995f
Refresh from GCC
2011-02-08 07:52:40 -05:00
Anthony Green
5b9cd52784
win64-underscore patch
2010-11-22 15:19:57 -05:00
Anthony Green
2db72615b5
Rebase
2010-11-21 10:50:56 -05:00
Anthony Green
c1d28ba8d5
stdcall-x86-closure-fix
2010-08-05 08:48:16 -04:00
Anthony Green
10ea848900
don't copy win64 struct args
2010-08-05 08:24:27 -04: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
f2c2a4fce9
Remove warnings and add OS/2 support
2010-04-13 10:19:28 -04:00
Anthony Green
59a259f4d3
Remove junk file
2010-03-15 05:57:51 -04:00
Anthony Green
3de1eb36d3
fix-comments patch
2010-03-15 05:57:24 -04:00