Commit Graph

883 Commits

Author SHA1 Message Date
Anthony Green
06747d3187 Merge pull request #176 from 0-wiz-0/master
Handle NetBSD/powerpc the same as FreeBSD and OpenBSD.
2015-01-29 07:22:23 -05:00
Thomas Klausner
6c5357757f Handle NetBSD/powerpc the same as FreeBSD and OpenBSD.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2015-01-29 12:32:28 +01:00
Anthony Green
db1b34b7e1 Remove incomplete sentence 2015-01-28 18:08:06 -05:00
Anthony Green
56036a6b58 Merge pull request #175 from rth7680/sparc
sparc: Re-introduce hand-written unwind info
2015-01-28 18:03:57 -05:00
Anthony Green
035715b333 Merge pull request #174 from rth7680/fbsd
configure: Run HAVE_AS_X86_PCREL for all X86 targets
2015-01-28 18:03:06 -05:00
Richard Henderson
2104b2a4fc sparc: Re-introduce hand-written unwind info
Fixes the build with the Solaris assembler.
2015-01-28 09:41:07 -08:00
Richard Henderson
b0e9796344 configure: Run HAVE_AS_X86_PCREL for all X86 targets 2015-01-27 22:10:12 -08:00
Anthony Green
31a6185307 Merge pull request #170 from fealebenpae/aarch64-trampoline-table
Support closures on ARM64 iOS
2015-01-21 05:55:47 -05:00
Anthony Green
d6675c16cc Merge pull request #172 from rth7680/fixes
x86: Fix cygwin32 build
2015-01-21 05:53:21 -05:00
Richard Henderson
3ac1610aa3 x86: Fix cygwin32 build
The section syntax is just that little bit different.
2015-01-19 20:48:40 +01:00
Anthony Green
a25a46a7fe Merge pull request #171 from rth7680/fixes
Fixes from mainline gcc
2015-01-16 17:32:07 -05:00
Richard Henderson
1ad0b17177 sparc: Also mark the return address in unwind info 2015-01-16 13:30:05 -08:00
Richard Henderson
d68c8aed19 sparc: Solaris fixes, part 2
/bin/as seems to only understand single-digit labels
/bin/as knows nothing about .rept/.endr
2015-01-16 11:40:33 -08:00
Rainer Orth
b740ab7cc9 sparc: Solaris fixes
* /bin/as requires .type fn,#function instead of @function.
* /bin/as doesn't support .macro/.endm.  I'm using preprocessor macros
  instead to implement E in src/sparc/v[89].S.
2015-01-16 11:32:23 -08:00
Rainer Orth
f1560b7bbe x86: Solaris fixes
* Solaris/x86 /bin/as doesn't support .org, so I've just disabled the
  uses in src/x86/{sysv, unix64}.S, as on Darwin.
* Solaris/x86 needs to use EH_FRAME_FLAGS so manually and compiler
  generated .eh_frame sections match, otherwise libffi.so fails to link:
* Solaris/x86 /bin/as has different COMDAT syntax; I've disabled it for
  the moment.
2015-01-16 11:32:11 -08:00
Yavor Georgiev
536366349c aarch64: implement the trampoline table workaround for ffi closures on Apple systems
This is a direct copy/paste port of the ARM code, with changes because of Aarch64 pc-relative addressing restrictions.
2015-01-16 15:31:55 +02:00
Yavor Georgiev
05e65b4e20 aarch64: rewrite range syntax into list to appease Clang
Clang's assembler in Xcode 6 appears to choke when the operand of st4 is a range, but is happy with a list.
2015-01-16 15:31:02 +02:00
Anthony Green
5cd411ad5d New test case for old aarch64 bug 2015-01-13 15:44:03 -05:00
Richard Henderson
e46842b414 Remove extra brackets in configure.host
This table is no longer in configure.ac, needing
protection from m4.
2015-01-13 07:23:48 -08:00
Richard Henderson
f27c4e4673 x86: Fix thinko in ffi_raw_call
Missed structure initialization for raw path.
Apparently there are no tests for this outside gcc.
2015-01-13 07:22:07 -08:00
Anthony Green
c82cc15942 Merge pull request #166 from chevah/master
Fix expr error in Solaris 10 when using gcc.
2015-01-10 09:25:26 -05:00
Anthony Green
1c61e73ad8 Merge pull request #165 from rth7680/pcc
Support PCC as producer and consumer
2015-01-10 09:23:30 -05:00
Anthony Green
dd0b59a5cf Merge pull request #164 from rth7680/darwin
Fix build on darwin
2015-01-10 09:22:55 -05:00
Anthony Green
9131039c93 Merge pull request #160 from nobu/msvc-no-complex
x86: MSVC does not support Complex type
2015-01-10 09:22:42 -05:00
Anthony Green
4ca2262ad6 Merge pull request #159 from nobu/fix-void-arith
x86: Fix void pointer arithmetic
2015-01-10 09:21:37 -05:00
Mișu Moldovan
e1a5ddb306 Fix expr error in Solaris 10 when using gcc. 2015-01-07 17:51:07 +02:00
Richard Henderson
3fa5d70cbb x86: Avoid fastcall when building with pcc
Apparently, PCC doesn't support the fastcall calling convention.
Nor does it issue a warning or error for the attribute that it
does not understand.
2015-01-05 13:03:06 -08:00
Richard Henderson
a03d2310ed x86: Load structure return address into eax 2015-01-05 12:24:51 -08:00
Richard Henderson
b7f6d7aa9b x86: Reinstate hand-written unwind info for sysv.S 2015-01-05 10:01:38 -08:00
Richard Henderson
6cedf81ca7 x86: Expand FFI_GO_CLOSURE
If we're going to have to hand-write unwind info for darwin,
these macros make the job harder.
2015-01-05 10:01:38 -08:00
Iain Sandoe
ae842a515b x86: More Darwin unwind fixups
EHFrame{N} IIRC is a special cue to ld64 that it should treat the unwind
in the object as "special/legacy" .. [these days everything is .cfi_xxxx
(except, cctools-as, as you noted)] .. without that much confusion arises
with ld64's atom-isation of the eh_frame section.

xxxx.eh labels are not needed for darwin ld64 >= 85.2.1 (i.e. darwin9,
xcode 3.1.4) to all intents and purposes, that's all that matters now,
since I think that anyone trying to build on 10.4/darwin8/xcode2.5 would
have to use a later ld64 (from odcctools) for other reasons.
2015-01-05 10:01:38 -08:00
Richard Henderson
8fa3c9f24b x86: Reinstate hand-written unwind info for unix64.S
One more try to get default Darwin to work.
2015-01-05 10:01:37 -08:00
Richard Henderson
5f35e0ffcc x86: Avoid using gas local labels
Which are unsupported by Darwin cctools as.
Thankfully this doesn't uglify the source too much.
2015-01-05 10:01:37 -08:00
Richard Henderson
ed1ca2777c x86: Remove use of .cfi_escape
The unwind info isn't 100% correct at all points during the epilogue,
and not annotating is just as incorrect as the annotation.  This works
better on systems that do not support DW_OP_call_frame_cfa.
2015-01-05 10:01:37 -08:00
Richard Henderson
1b12593d7e x86: Honor alignment of arguments
Darwin aligns long-double to 16, and thus all of the long double
tests were failing due to not honoring that.  We ought to be able
to devise a test case for GCC using __attribute__((aligned)) that
would have failed too.
2015-01-05 10:01:37 -08:00
Richard Henderson
042b8dafee x86: Use .balign not .align
The Apple assembler defaults to power of two alignment, rather than
byte alignment like everyone else.  Force byte alignment by using
the proper directive.
2015-01-05 10:01:37 -08:00
Richard Henderson
0172bc029c x86: Disable .org for Darwin 2015-01-05 10:01:37 -08:00
Richard Henderson
9f112619c1 x86: Best guess at update for Darwin 2015-01-05 10:01:37 -08:00
Nobuyoshi Nakada
7282d3289c x86: MSVC does not support Complex type 2014-12-22 17:14:40 +09:00
Nobuyoshi Nakada
5f8881a591 x86: Fix void pointer arithmetic 2014-12-22 17:08:08 +09:00
Anthony Green
58bf7d65d8 Merge pull request #158 from rth7680/s390
S390
2014-12-20 10:20:40 -05:00
Richard Henderson
7ba30b1906 s390: Inline and tidy ffi_prep_args
As per discussion with Ulrich Weigand, document the restrictions
on the code within ffi_call_int as we simultaneously prepare
stack frames for ffi_call_SYSV and the target function.
2014-12-19 11:38:17 -05:00
Richard Henderson
f69ec6f35d s390: Use pc-relative insns in 31-bit mode
It's silly to stick to esa/390 features when the compiler won't.
Detect when brasl and larl are used by the compiler and then use
them in the assembly.
2014-12-18 16:21:07 -05:00
Richard Henderson
2f530de168 s390: Reorganize assembly
Avoid using ffi_prep_args as a callback; do all the work setting
up the frame within ffi_call_int directly.  Save fewer registers
in ffi_closure_SYSV.
2014-12-18 16:01:59 -05:00
Richard Henderson
97512ded05 s390: Avoid aliasing warnings 2014-12-18 16:01:15 -05:00
Richard Henderson
c860ca9ac0 s390: Kill trailing whitespace 2014-12-17 13:24:03 -05:00
Dominik Vogt
02b7c89967 s390: Go closure support 2014-12-17 13:20:51 -05:00
Anthony Green
75b2199f26 Merge pull request #157 from rth7680/x86
Two fixes for x86
2014-12-12 10:13:56 -05:00
Anthony Green
8a3a2723aa Merge pull request #156 from rth7680/sparc
sparc: Define FFI_TARGET_SPECIFIC_VARIADIC for v9
2014-12-12 10:13:27 -05:00
Richard Henderson
2f65246968 x86: Handle void arguments as if an empty structure
Since libffi currently doesn't allow empty structures, libgo
currently maps them to ffi_type_void.  Given that we'll abort
on this case, handle it gracefully.
2014-12-11 14:16:00 -08:00