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
d87bc2f0
Commit
d87bc2f0
authored
Jun 02, 2012
by
Shenghou Ma
Committed by
Russ Cox
Jun 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/5c, cmd/5g, cmd/5l: enable use of R12, F8-F15
R=dave, rsc CC=golang-dev
https://golang.org/cl/6248070
parent
b7c2ade6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
+21
-12
reg.c
src/cmd/5c/reg.c
+5
-4
reg.c
src/cmd/5g/reg.c
+15
-6
5.out.h
src/cmd/5l/5.out.h
+1
-2
No files found.
src/cmd/5c/reg.c
View file @
d87bc2f0
...
...
@@ -1150,12 +1150,13 @@ addreg(Adr *a, int rn)
* 1 R1
* ... ...
* 10 R10
* 12 R12
*/
int32
RtoB
(
int
r
)
{
if
(
r
<
2
||
r
>=
REGTMP
-
2
)
// excluded R9 and R10 for m and g
if
(
r
<
2
||
(
r
>=
REGTMP
-
2
&&
r
!=
12
))
// excluded R9 and R10 for m and g, but not R12
return
0
;
return
1L
<<
r
;
}
...
...
@@ -1163,7 +1164,7 @@ RtoB(int r)
int
BtoR
(
int32
b
)
{
b
&=
0x
01fcL
;
// excluded R9 and R10 for m and g
b
&=
0x
11fcL
;
// excluded R9 and R10 for m and g, but not R12
if
(
b
==
0
)
return
0
;
return
bitno
(
b
);
...
...
@@ -1174,7 +1175,7 @@ BtoR(int32 b)
* 18 F2
* 19 F3
* ... ...
*
23 F7
*
31 F15
*/
int32
FtoB
(
int
f
)
...
...
@@ -1189,7 +1190,7 @@ int
BtoF
(
int32
b
)
{
b
&=
0xfc0000L
;
b
&=
0xf
ff
c0000L
;
if
(
b
==
0
)
return
0
;
return
bitno
(
b
)
-
16
;
...
...
src/cmd/5g/reg.c
View file @
d87bc2f0
...
...
@@ -34,8 +34,8 @@
#include "gg.h"
#include "opt.h"
#define NREGVAR
24
#define REGBITS ((uint32)0xffffff)
#define NREGVAR
32
#define REGBITS ((uint32)0xffffff
ff
)
#define P2R(p) (Reg*)(p->reg)
void
addsplits
(
void
);
...
...
@@ -160,6 +160,14 @@ static char* regname[] = {
".F5"
,
".F6"
,
".F7"
,
".F8"
,
".F9"
,
".F10"
,
".F11"
,
".F12"
,
".F13"
,
".F14"
,
".F15"
,
};
void
...
...
@@ -1486,11 +1494,12 @@ addreg(Adr *a, int rn)
* 1 R1
* ... ...
* 10 R10
* 12 R12
*/
int32
RtoB
(
int
r
)
{
if
(
r
>=
REGTMP
-
2
)
// excluded R9 and R10 for m and g
if
(
r
>=
REGTMP
-
2
&&
r
!=
12
)
// excluded R9 and R10 for m and g, but not R12
return
0
;
return
1L
<<
r
;
}
...
...
@@ -1498,7 +1507,7 @@ RtoB(int r)
int
BtoR
(
int32
b
)
{
b
&=
0x
01fcL
;
// excluded R9 and R10 for m and g
b
&=
0x
11fcL
;
// excluded R9 and R10 for m and g, but not R12
if
(
b
==
0
)
return
0
;
return
bitno
(
b
);
...
...
@@ -1509,7 +1518,7 @@ BtoR(int32 b)
* 18 F2
* 19 F3
* ... ...
*
23 F7
*
31 F15
*/
int32
FtoB
(
int
f
)
...
...
@@ -1524,7 +1533,7 @@ int
BtoF
(
int32
b
)
{
b
&=
0xfc0000L
;
b
&=
0xf
ff
c0000L
;
if
(
b
==
0
)
return
0
;
return
bitno
(
b
)
-
16
;
...
...
src/cmd/5l/5.out.h
View file @
d87bc2f0
...
...
@@ -49,12 +49,11 @@
#define REGM (REGEXT-1)
/* compiler allocates external registers R10 down */
#define REGTMP 11
#define REGSB 12
#define REGSP 13
#define REGLINK 14
#define REGPC 15
#define NFREG
8
#define NFREG
16
#define FREGRET 0
#define FREGEXT 7
#define FREGTMP 15
...
...
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