aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-ffi.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-01-20 04:18:12 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-01-20 04:18:12 +0000
commitcea526b81c147fe1170f72cbcb3d795e8bd09293 (patch)
tree9e23286cabfbef3477b1c28bad1e9482f4b6efb2 /libgo/runtime/go-ffi.c
parentfdce7209c23212b50f08604f242e9bbb5281818b (diff)
downloadgcc-cea526b81c147fe1170f72cbcb3d795e8bd09293.zip
gcc-cea526b81c147fe1170f72cbcb3d795e8bd09293.tar.gz
gcc-cea526b81c147fe1170f72cbcb3d795e8bd09293.tar.bz2
runtime: No special case for 386 complex in FFI support.
All supported libgo 386 targets now have complex support in libffi. From Uros Bizjak. From-SVN: r219877
Diffstat (limited to 'libgo/runtime/go-ffi.c')
-rw-r--r--libgo/runtime/go-ffi.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/libgo/runtime/go-ffi.c b/libgo/runtime/go-ffi.c
index 89da23d..aafc7b2 100644
--- a/libgo/runtime/go-ffi.c
+++ b/libgo/runtime/go-ffi.c
@@ -289,21 +289,7 @@ go_func_return_ffi (const struct __go_func_type *func)
types = (const struct __go_type_descriptor **) func->__out.__values;
if (count == 1)
- {
-
-#if defined (__i386__) && !defined (__x86_64__)
- /* FFI does not support complex types. On 32-bit x86, a
- complex64 will be returned in %eax/%edx. We normally tell
- FFI that a complex64 is a struct of two floats. On 32-bit
- x86 a struct of two floats is returned via a hidden first
- pointer parameter. Fortunately we can make everything work
- by pretending that complex64 is int64. */
- if ((types[0]->__code & GO_CODE_MASK) == GO_COMPLEX64)
- return &ffi_type_sint64;
-#endif
-
- return go_type_to_ffi (types[0]);
- }
+ return go_type_to_ffi (types[0]);
ret = (ffi_type *) __go_alloc (sizeof (ffi_type));
ret->type = FFI_TYPE_STRUCT;