Commit Graph

35 Commits

Author SHA1 Message Date
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
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
Richard Henderson
542e004710 sparc: Define FFI_TARGET_SPECIFIC_VARIADIC for v9
This is a port of

  http://gcc.gnu.org/viewcvs?rev=207763&root=gcc&view=rev

aka GCC PR libffi/60073, to the rewritten Sparc codebase.
Supposedly, we should have seen failures with the existing
libffi.call/cls_double_va.c testcase, but I hadn't.
Perhaps a gcc newer than 4.6.3 is required to see that...
2014-11-18 05:07:00 -08:00
Richard Henderson
6eec410f15 sparc: Re-add abi compliant structure support
The original code, removed in the "rewrite" patch, was incorrect for
large structures, and required dynamic allocation of a trampoline on
every ffi_call.

Instead, allocate a 4k entry table of all possible structure returns.
The table is 80k, but is read-only and dynamically paged, which ought
to be better than allocating the trampoline.

This is difficult to test with gcc.  One can only use -O0 at present.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63668.
2014-11-12 09:36:11 +01:00
Richard Henderson
92022496ef sparc: Add support for Go closures 2014-11-12 09:36:11 +01:00
Richard Henderson
ad89c2d9e9 sparc: Add support for complex types 2014-11-12 09:36:09 +01:00
Richard Henderson
20da5b4132 sparc: Handle more cases of structure return directly 2014-11-12 09:35:24 +01:00
Richard Henderson
0686c2e71c sparc: Preprocess float point struct return
We can eliminate recursion and speed structure return
by flattening a nested structure tree into a bitmask.
2014-11-12 09:35:24 +01:00
Richard Henderson
2b27890ba7 sparc: Rewrite everything
It's impossible to call between v8 and v9 ABIs, because of the stack bias
in the v9 ABI.  So let's not pretend it's just not implemented yet.  Split
the v9 code out to a separate file.

The register windows prevent ffi_call from setting up the entire stack
frame the assembly, but we needn't make an indirect call back to prep_args.
2014-11-12 09:35:21 +01:00
Richard Henderson
5d7b544505 sparc: Tidy up symbols
Assembly to use local labels, .type annotation, hidden annotation.
I do retain the _prefix for the symbols, but given that it wasn't
done consistently across all symbols, I doubt it's actually needed.
2014-11-12 09:34:24 +01:00
Richard Henderson
fd4f7cc0ca sparc: Eliminate long double ifdefs 2014-11-12 09:34:24 +01:00
Anthony Green
a9521411a5 sparc v8 and testsuite fixes 2013-02-09 06:54:40 -05:00
Anthony Green
70b11b47ee Fix small struct passing on ppc 2013-02-08 16:12:19 -05:00
Anthony Green
cb03ea8f4e sparc v9 fixes for sun tools 2013-02-08 12:25:18 -05:00
Anthony Green
9db7e1a958 Fix botched sparc patch. Update version. 2013-02-07 21:06:08 -05: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
7c5e60b5f4 Rebase on fixed GCC sources 2012-03-29 08:48:22 -04:00
Anthony Green
8360bf1cd0 Ensure that users don't include ffitarget.h directly 2012-02-23 07:01:13 -05:00
Anthony Green
049d8386ff Many new patches 2011-08-22 14:50:10 -04:00
Anthony Green
1833aa0fb9 sparc ABI test fix. 2011-02-11 07:11:04 -05:00
Anthony Green
404585d134 Fix sparc v8 aggregate type returns for sun's compiler 2011-02-08 10:44:36 -05:00
Anthony Green
2db72615b5 Rebase 2010-11-21 10:50:56 -05:00
Anthony Green
5feacad4a5 define generic symbols carefully 2010-08-05 08:30:04 -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
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
Anthony Green
da11bece0f Release 3.0.9rc5 2009-12-24 05:34:46 -05:00
Anthony Green
115ab36fce Update missing changes for 3.0.9r4. 2009-12-24 00:22:00 -05:00
Anthony Green
c6dddbd02b Initial commit 2009-10-04 08:11:33 -04:00