Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
ae605268
Commit
ae605268
authored
Dec 09, 2010
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arm floating point simulation
R=rsc CC=golang-dev
https://golang.org/cl/3565041
parent
aa9c213e
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
431 additions
and
338 deletions
+431
-338
src/cmd/5l/softfloat.c
src/cmd/5l/softfloat.c
+15
-2
src/pkg/runtime/arm/softfloat.c
src/pkg/runtime/arm/softfloat.c
+413
-335
src/pkg/runtime/runtime.h
src/pkg/runtime/runtime.h
+3
-1
No files found.
src/cmd/5l/softfloat.c
View file @
ae605268
...
...
@@ -29,6 +29,11 @@ softfloat(void)
p
->
cond
->
mark
|=
LABEL
;
for
(
p
=
cursym
->
text
;
p
!=
P
;
p
=
p
->
link
)
{
switch
(
p
->
as
)
{
case
AMOVW
:
if
(
p
->
to
.
type
==
D_FREG
||
p
->
from
.
type
==
D_FREG
)
goto
soft
;
goto
notsoft
;
case
AMOVWD
:
case
AMOVWF
:
case
AMOVDW
:
...
...
@@ -37,6 +42,7 @@ softfloat(void)
case
AMOVDF
:
case
AMOVF
:
case
AMOVD
:
case
ACMPF
:
case
ACMPD
:
case
AADDF
:
...
...
@@ -47,6 +53,12 @@ softfloat(void)
case
AMULD
:
case
ADIVF
:
case
ADIVD
:
goto
soft
;
default:
goto
notsoft
;
soft:
if
(
psfloat
==
P
)
diag
(
"floats used with _sfloat not defined"
);
if
(
!
wasfloat
||
(
p
->
mark
&
LABEL
))
{
...
...
@@ -65,7 +77,8 @@ softfloat(void)
wasfloat
=
1
;
}
break
;
default:
notsoft:
wasfloat
=
0
;
}
}
...
...
src/pkg/runtime/arm/softfloat.c
View file @
ae605268
This diff is collapsed.
Click to expand it.
src/pkg/runtime/runtime.h
View file @
ae605268
...
...
@@ -230,7 +230,9 @@ struct M
uint32
machport
;
// Return address for Mach IPC (OS X)
MCache
*
mcache
;
G
*
lockedg
;
uint64
freg
[
8
];
// Floating point register storage used by ARM software fp routines
uint32
freglo
[
16
];
// D[i] lsb and F[i]
uint32
freghi
[
16
];
// D[i] msb and F[i+16]
uint32
fflag
;
// floating point compare flags
#ifdef __WINDOWS__
void
*
gostack
;
// bookmark to keep track of go stack during stdcall
#endif
...
...
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