Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
73e0b984
Commit
73e0b984
authored
12 years ago
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime, testing/quick: libffi doesn't handle complex on Alpha.
From Uros Bizjak. From-SVN: r196389
parent
40bf31ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
libgo/go/testing/quick/quick_test.go
+5
-2
libgo/runtime/go-reflect-call.c
+11
-1
No files found.
libgo/go/testing/quick/quick_test.go
View file @
73e0b984
...
...
@@ -7,6 +7,7 @@ package quick
import
(
"math/rand"
"reflect"
"runtime"
"testing"
)
...
...
@@ -72,8 +73,10 @@ func TestCheckEqual(t *testing.T) {
reportError
(
"fBool"
,
CheckEqual
(
fBool
,
fBool
,
nil
),
t
)
reportError
(
"fFloat32"
,
CheckEqual
(
fFloat32
,
fFloat32
,
nil
),
t
)
reportError
(
"fFloat64"
,
CheckEqual
(
fFloat64
,
fFloat64
,
nil
),
t
)
reportError
(
"fComplex64"
,
CheckEqual
(
fComplex64
,
fComplex64
,
nil
),
t
)
reportError
(
"fComplex128"
,
CheckEqual
(
fComplex128
,
fComplex128
,
nil
),
t
)
if
runtime
.
GOARCH
!=
"alpha"
{
reportError
(
"fComplex64"
,
CheckEqual
(
fComplex64
,
fComplex64
,
nil
),
t
)
reportError
(
"fComplex128"
,
CheckEqual
(
fComplex128
,
fComplex128
,
nil
),
t
)
}
reportError
(
"fInt16"
,
CheckEqual
(
fInt16
,
fInt16
,
nil
),
t
)
reportError
(
"fInt32"
,
CheckEqual
(
fInt32
,
fInt32
,
nil
),
t
)
reportError
(
"fInt64"
,
CheckEqual
(
fInt64
,
fInt64
,
nil
),
t
)
...
...
This diff is collapsed.
Click to expand it.
libgo/runtime/go-reflect-call.c
View file @
73e0b984
...
...
@@ -30,7 +30,7 @@ static ffi_type *go_struct_to_ffi (const struct __go_struct_type *)
static
ffi_type
*
go_string_to_ffi
(
void
)
__attribute__
((
no_split_stack
));
static
ffi_type
*
go_interface_to_ffi
(
void
)
__attribute__
((
no_split_stack
));
static
ffi_type
*
go_complex_to_ffi
(
ffi_type
*
)
__attribute__
((
no_split_stack
));
__attribute__
((
no_split_stack
,
unused
));
static
ffi_type
*
go_type_to_ffi
(
const
struct
__go_type_descriptor
*
)
__attribute__
((
no_split_stack
));
static
ffi_type
*
go_func_return_ffi
(
const
struct
__go_func_type
*
)
...
...
@@ -185,13 +185,23 @@ go_type_to_ffi (const struct __go_type_descriptor *descriptor)
return
&
ffi_type_double
;
abort
();
case
GO_COMPLEX64
:
#ifdef __alpha__
runtime_throw
(
"the libffi library does not support Complex64 type with "
"reflect.Call or runtime.SetFinalizer"
);
#else
if
(
sizeof
(
float
)
==
4
)
return
go_complex_to_ffi
(
&
ffi_type_float
);
abort
();
#endif
case
GO_COMPLEX128
:
#ifdef __alpha__
runtime_throw
(
"the libffi library does not support Complex128 type with "
"reflect.Call or runtime.SetFinalizer"
);
#else
if
(
sizeof
(
double
)
==
8
)
return
go_complex_to_ffi
(
&
ffi_type_double
);
abort
();
#endif
case
GO_INT16
:
return
&
ffi_type_sint16
;
case
GO_INT32
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment