mirror of
https://github.com/golang/go
synced 2024-11-19 13:04:45 -07:00
[dev.cc] cmd/9a, cmd/new9a: fix line numbers
Fixed for the other assemblers in CL 2297042 in 2010. Change-Id: I6cf41c569e884d98d295369e60e550ff8c0884e6 Reviewed-on: https://go-review.googlesource.com/5173 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
09d7db3bbb
commit
d0c21af7d3
@ -118,6 +118,7 @@ EXTERN char* outfile;
|
||||
EXTERN int pass;
|
||||
EXTERN int32 pc;
|
||||
EXTERN int peekc;
|
||||
EXTERN int32 stmtline;
|
||||
EXTERN int sym;
|
||||
EXTERN char* symb;
|
||||
EXTERN int thechar;
|
||||
|
@ -64,7 +64,11 @@
|
||||
%type <addr> imm ximm fimm rel psr lcr cbit fpscr msr mask
|
||||
%%
|
||||
prog:
|
||||
| prog line
|
||||
| prog
|
||||
{
|
||||
stmtline = lineno;
|
||||
}
|
||||
line
|
||||
|
||||
line:
|
||||
LNAME ':'
|
||||
|
@ -672,7 +672,7 @@ outcode(int a, Addr *g1, int reg, Addr *g2)
|
||||
|
||||
p = emallocz(sizeof(Prog));
|
||||
p->as = a;
|
||||
p->lineno = lineno;
|
||||
p->lineno = stmtline;
|
||||
if(nosched)
|
||||
p->mark |= NOSCHED;
|
||||
p->from = *g1;
|
||||
@ -702,7 +702,7 @@ outgcode(int a, Addr *g1, int reg, Addr *g2, Addr *g3)
|
||||
|
||||
p = emallocz(sizeof(Prog));
|
||||
p->as = a;
|
||||
p->lineno = lineno;
|
||||
p->lineno = stmtline;
|
||||
if(nosched)
|
||||
p->mark |= NOSCHED;
|
||||
p->from = *g1;
|
||||
|
1455
src/cmd/9a/y.tab.c
1455
src/cmd/9a/y.tab.c
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,11 @@ import (
|
||||
%type <addr> imm ximm fimm rel psr lcr cbit fpscr msr mask
|
||||
%%
|
||||
prog:
|
||||
| prog line
|
||||
| prog
|
||||
{
|
||||
stmtline = asm.Lineno
|
||||
}
|
||||
line
|
||||
|
||||
line:
|
||||
LNAME ':'
|
||||
|
@ -40,6 +40,7 @@ import (
|
||||
var (
|
||||
yyerror = asm.Yyerror
|
||||
nullgen obj.Addr
|
||||
stmtline int32
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -496,7 +497,7 @@ func outcode(a int, g1 *obj.Addr, reg int, g2 *obj.Addr) {
|
||||
|
||||
p = asm.Ctxt.NewProg()
|
||||
p.As = int16(a)
|
||||
p.Lineno = asm.Lineno
|
||||
p.Lineno = stmtline
|
||||
if nosched != 0 {
|
||||
p.Mark |= ppc64.NOSCHED
|
||||
}
|
||||
@ -529,7 +530,7 @@ func outgcode(a int, g1 *obj.Addr, reg int, g2, g3 *obj.Addr) {
|
||||
|
||||
p = asm.Ctxt.NewProg()
|
||||
p.As = int16(a)
|
||||
p.Lineno = asm.Lineno
|
||||
p.Lineno = stmtline
|
||||
if nosched != 0 {
|
||||
p.Mark |= ppc64.NOSCHED
|
||||
}
|
||||
|
1466
src/cmd/new9a/y.go
1466
src/cmd/new9a/y.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user