Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(541)

Side by Side Diff: src/cmd/8l/span.c

Issue 4633043: code review 4633043: 8l/ld: Further adjustments for a port of Go to Plan 9 n... (Closed)
Patch Set: diff -r 61ed63d57306 https://go.googlecode.com/hg/ Created 13 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cmd/8l/pass.c ('k') | src/cmd/ld/data.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Inferno utils/8l/span.c 1 // Inferno utils/8l/span.c
2 // http://code.google.com/p/inferno-os/source/browse/utils/8l/span.c 2 // http://code.google.com/p/inferno-os/source/browse/utils/8l/span.c
3 // 3 //
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
6 // Portions Copyright © 1997-1999 Vita Nuova Limited 6 // Portions Copyright © 1997-1999 Vita Nuova Limited
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com) 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com)
8 // Portions Copyright © 2004,2006 Bruce Ellis 8 // Portions Copyright © 2004,2006 Bruce Ellis
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net)
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if(v > 127) { 82 if(v > 127) {
83 loop++; 83 loop++;
84 q->back ^= 2; 84 q->back ^= 2;
85 } 85 }
86 s->p[q->pc+1] = v; 86 s->p[q->pc+1] = v;
87 } else { 87 } else {
88 bp = s->p + q->pc + q->mark - 4; 88 bp = s->p + q->pc + q->mark - 4;
89 *bp++ = v; 89 *bp++ = v;
90 *bp++ = v>>8; 90 *bp++ = v>>8;
91 *bp++ = v>>16; 91 *bp++ = v>>16;
92 » » » » » *bp++ = v>>24; 92 » » » » » *bp = v>>24;
93 }······· 93 }·······
94 } 94 }
95 p->comefrom = P; 95 p->comefrom = P;
96 96
97 asmins(p); 97 asmins(p);
98 p->pc = c; 98 p->pc = c;
99 m = andptr-and; 99 m = andptr-and;
100 symgrow(s, p->pc+m); 100 symgrow(s, p->pc+m);
101 memmove(s->p+p->pc, and, m); 101 memmove(s->p+p->pc, and, m);
102 p->mark = m; 102 p->mark = m;
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 break; 1312 break;
1313 } 1313 }
1314 } 1314 }
1315 1315
1316 void 1316 void
1317 asmins(Prog *p) 1317 asmins(Prog *p)
1318 { 1318 {
1319 andptr = and; 1319 andptr = and;
1320 doasm(p); 1320 doasm(p);
1321 if(andptr > and+sizeof and) { 1321 if(andptr > and+sizeof and) {
1322 » » print("and[] is too short - %d byte instruction\n", andptr - and ); 1322 » » print("and[] is too short - %ld byte instruction\n", andptr - an d);
1323 errorexit(); 1323 errorexit();
1324 } 1324 }
1325 } 1325 }
OLDNEW
« no previous file with comments | « src/cmd/8l/pass.c ('k') | src/cmd/ld/data.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b