aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/8l
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-08-30 15:46:12 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-08-30 15:46:12 +0400
commit79dca0327ed8a7f65f3680e72cb1dcf4caaed457 (patch)
tree450091598b2acded10db1c416e9190de5949ebec /src/cmd/8l
parent2df3d800378fda123395609189fabdd403634d80 (diff)
downloadgo-79dca0327ed8a7f65f3680e72cb1dcf4caaed457.tar.xz
libbio, all cmd: consistently use BGETC/BPUTC instead of Bgetc/Bputc
Also introduce BGET2/4, BPUT2/4 as they are widely used. Slightly improve BGETC/BPUTC implementation. This gives ~5% CPU time improvement on go install -a -p1 std. Before: real user sys 0m23.561s 0m16.625s 0m5.848s 0m23.766s 0m16.624s 0m5.846s 0m23.742s 0m16.621s 0m5.868s after: 0m22.999s 0m15.841s 0m5.889s 0m22.845s 0m15.808s 0m5.850s 0m22.889s 0m15.832s 0m5.848s R=golang-dev, r CC=golang-dev https://golang.org/cl/12745047
Diffstat (limited to 'src/cmd/8l')
-rw-r--r--src/cmd/8l/obj.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/8l/obj.c b/src/cmd/8l/obj.c
index 853abc0b65..316d79f451 100644
--- a/src/cmd/8l/obj.c
+++ b/src/cmd/8l/obj.c
@@ -365,18 +365,18 @@ zaddr(char *pn, Biobuf *f, Adr *a, Sym *h[])
a->type = D_NONE;
a->offset = 0;
if(t & T_OFFSET)
- a->offset = Bget4(f);
+ a->offset = BGETLE4(f);
a->offset2 = 0;
if(t & T_OFFSET2) {
- a->offset2 = Bget4(f);
+ a->offset2 = BGETLE4(f);
a->type = D_CONST2;
}
a->sym = S;
if(t & T_SYM)
a->sym = zsym(pn, f, h);
if(t & T_FCONST) {
- a->ieee.l = Bget4(f);
- a->ieee.h = Bget4(f);
+ a->ieee.l = BGETLE4(f);
+ a->ieee.h = BGETLE4(f);
a->type = D_FCONST;
} else
if(t & T_SCONST) {
@@ -475,7 +475,7 @@ loop:
if(o == ANAME || o == ASIGNAME) {
sig = 0;
if(o == ASIGNAME)
- sig = Bget4(f);
+ sig = BGETLE4(f);
v = BGETC(f); /* type */
o = BGETC(f); /* sym */
r = 0;
@@ -530,7 +530,7 @@ loop:
p = mal(sizeof(*p));
p->as = o;
- p->line = Bget4(f);
+ p->line = BGETLE4(f);
p->back = 2;
zaddr(pn, f, &p->from, h);
fromgotype = adrgotype;