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
f47346c5
Commit
f47346c5
authored
May 15, 2012
by
Jan Ziak
Committed by
Russ Cox
May 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8l,5l: 2% faster
R=golang-dev, for.go.yong CC=golang-dev
https://golang.org/cl/6197080
parent
fcc1f2ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
obj.c
src/cmd/5l/obj.c
+10
-10
obj.c
src/cmd/8l/obj.c
+9
-9
No files found.
src/cmd/5l/obj.c
View file @
f47346c5
...
...
@@ -296,16 +296,16 @@ zaddr(Biobuf *f, Adr *a, Sym *h[])
Sym
*
s
;
Auto
*
u
;
a
->
type
=
B
getc
(
f
);
a
->
reg
=
B
getc
(
f
);
c
=
B
getc
(
f
);
a
->
type
=
B
GETC
(
f
);
a
->
reg
=
B
GETC
(
f
);
c
=
B
GETC
(
f
);
if
(
c
<
0
||
c
>
NSYM
){
print
(
"sym out of range: %d
\n
"
,
c
);
Bputc
(
f
,
ALAST
+
1
);
return
;
}
a
->
sym
=
h
[
c
];
a
->
name
=
B
getc
(
f
);
a
->
name
=
B
GETC
(
f
);
if
((
schar
)
a
->
reg
<
0
||
a
->
reg
>
NREG
)
{
print
(
"register out of range %d
\n
"
,
a
->
reg
);
...
...
@@ -338,7 +338,7 @@ zaddr(Biobuf *f, Adr *a, Sym *h[])
break
;
case
D_REGREG
:
a
->
offset
=
B
getc
(
f
);
a
->
offset
=
B
GETC
(
f
);
break
;
case
D_CONST2
:
...
...
@@ -422,7 +422,7 @@ newloop:
loop:
if
(
f
->
state
==
Bracteof
||
Boffset
(
f
)
>=
eof
)
goto
eof
;
o
=
B
getc
(
f
);
o
=
B
GETC
(
f
);
if
(
o
==
Beof
)
goto
eof
;
...
...
@@ -435,8 +435,8 @@ loop:
sig
=
0
;
if
(
o
==
ASIGNAME
)
sig
=
Bget4
(
f
);
v
=
B
getc
(
f
);
/* type */
o
=
B
getc
(
f
);
/* sym */
v
=
B
GETC
(
f
);
/* type */
o
=
B
GETC
(
f
);
/* sym */
r
=
0
;
if
(
v
==
D_STATIC
)
r
=
version
;
...
...
@@ -486,8 +486,8 @@ loop:
p
=
mal
(
sizeof
(
Prog
));
p
->
as
=
o
;
p
->
scond
=
B
getc
(
f
);
p
->
reg
=
B
getc
(
f
);
p
->
scond
=
B
GETC
(
f
);
p
->
reg
=
B
GETC
(
f
);
p
->
line
=
Bget4
(
f
);
zaddr
(
f
,
&
p
->
from
,
h
);
...
...
src/cmd/8l/obj.c
View file @
f47346c5
...
...
@@ -333,7 +333,7 @@ zsym(char *pn, Biobuf *f, Sym *h[])
{
int
o
;
o
=
B
getc
(
f
);
o
=
B
GETC
(
f
);
if
(
o
<
0
||
o
>=
NSYM
||
h
[
o
]
==
nil
)
mangle
(
pn
);
return
h
[
o
];
...
...
@@ -347,12 +347,12 @@ zaddr(char *pn, Biobuf *f, Adr *a, Sym *h[])
Sym
*
s
;
Auto
*
u
;
t
=
B
getc
(
f
);
t
=
B
GETC
(
f
);
a
->
index
=
D_NONE
;
a
->
scale
=
0
;
if
(
t
&
T_INDEX
)
{
a
->
index
=
B
getc
(
f
);
a
->
scale
=
B
getc
(
f
);
a
->
index
=
B
GETC
(
f
);
a
->
scale
=
B
GETC
(
f
);
}
a
->
type
=
D_NONE
;
a
->
offset
=
0
;
...
...
@@ -376,7 +376,7 @@ zaddr(char *pn, Biobuf *f, Adr *a, Sym *h[])
a
->
type
=
D_SCONST
;
}
if
(
t
&
T_TYPE
)
a
->
type
=
B
getc
(
f
);
a
->
type
=
B
GETC
(
f
);
adrgotype
=
S
;
if
(
t
&
T_GOTYPE
)
adrgotype
=
zsym
(
pn
,
f
,
h
);
...
...
@@ -452,10 +452,10 @@ newloop:
loop:
if
(
f
->
state
==
Bracteof
||
Boffset
(
f
)
>=
eof
)
goto
eof
;
o
=
B
getc
(
f
);
o
=
B
GETC
(
f
);
if
(
o
==
Beof
)
goto
eof
;
o
|=
B
getc
(
f
)
<<
8
;
o
|=
B
GETC
(
f
)
<<
8
;
if
(
o
<=
AXXX
||
o
>=
ALAST
)
{
if
(
o
<
0
)
goto
eof
;
...
...
@@ -468,8 +468,8 @@ loop:
sig
=
0
;
if
(
o
==
ASIGNAME
)
sig
=
Bget4
(
f
);
v
=
B
getc
(
f
);
/* type */
o
=
B
getc
(
f
);
/* sym */
v
=
B
GETC
(
f
);
/* type */
o
=
B
GETC
(
f
);
/* sym */
r
=
0
;
if
(
v
==
D_STATIC
)
r
=
version
;
...
...
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