Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
90d8c8a0
Commit
90d8c8a0
authored
Apr 17, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: fix arm5 softfloat
R=dfc, ken2, rsc CC=golang-dev
https://golang.org/cl/4446043
parent
0c6df25d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
softfloat.c
src/pkg/runtime/arm/softfloat.c
+18
-2
No files found.
src/pkg/runtime/arm/softfloat.c
View file @
90d8c8a0
...
@@ -91,6 +91,7 @@ static uint32
...
@@ -91,6 +91,7 @@ static uint32
stepflt
(
uint32
*
pc
,
uint32
*
regs
)
stepflt
(
uint32
*
pc
,
uint32
*
regs
)
{
{
uint32
i
,
regd
,
regm
,
regn
;
uint32
i
,
regd
,
regm
,
regn
;
int32
delta
;
uint32
*
addr
;
uint32
*
addr
;
uint64
uval
;
uint64
uval
;
int64
sval
;
int64
sval
;
...
@@ -117,7 +118,7 @@ stepflt(uint32 *pc, uint32 *regs)
...
@@ -117,7 +118,7 @@ stepflt(uint32 *pc, uint32 *regs)
return
1
;
return
1
;
}
}
if
(
i
==
0xe08bb00d
)
{
if
(
i
==
0xe08bb00d
)
{
// add sp to 11.
// add sp to
r
11.
// might be part of a large stack offset address
// might be part of a large stack offset address
// (or might not, but again no harm done).
// (or might not, but again no harm done).
regs
[
11
]
+=
regs
[
13
];
regs
[
11
]
+=
regs
[
13
];
...
@@ -134,6 +135,19 @@ stepflt(uint32 *pc, uint32 *regs)
...
@@ -134,6 +135,19 @@ stepflt(uint32 *pc, uint32 *regs)
runtime
·
printf
(
"*** fpsr R[CPSR] = F[CPSR] %x
\n
"
,
regs
[
CPSR
]);
runtime
·
printf
(
"*** fpsr R[CPSR] = F[CPSR] %x
\n
"
,
regs
[
CPSR
]);
return
1
;
return
1
;
}
}
if
((
i
&
0xff000000
)
==
0xea000000
)
{
// unconditional branch
// can happen in the middle of floating point
// if the linker decides it is time to lay down
// a sequence of instruction stream constants.
delta
=
i
&
0xffffff
;
delta
=
(
delta
<<
8
)
>>
8
;
// sign extend
if
(
trace
)
runtime
·
printf
(
"*** cpu PC += %x
\n
"
,
(
delta
+
2
)
*
4
);
return
delta
+
2
;
}
goto
stage1
;
goto
stage1
;
stage1:
// load/store regn is cpureg, regm is 8bit offset
stage1:
// load/store regn is cpureg, regm is 8bit offset
...
@@ -489,8 +503,10 @@ runtime·_sfloat2(uint32 *lr, uint32 r0)
...
@@ -489,8 +503,10 @@ runtime·_sfloat2(uint32 *lr, uint32 r0)
uint32
skip
;
uint32
skip
;
skip
=
stepflt
(
lr
,
&
r0
);
skip
=
stepflt
(
lr
,
&
r0
);
if
(
skip
==
0
)
if
(
skip
==
0
)
{
runtime
·
printf
(
"sfloat2 %p %x
\n
"
,
lr
,
*
lr
);
fabort
();
// not ok to fail first instruction
fabort
();
// not ok to fail first instruction
}
lr
+=
skip
;
lr
+=
skip
;
while
(
skip
=
stepflt
(
lr
,
&
r0
))
while
(
skip
=
stepflt
(
lr
,
&
r0
))
...
...
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