mirror of
https://github.com/golang/go
synced 2024-11-17 14:04:48 -07:00
cmd/compile, cmd/internal/obj: ignore AUSEFIELD
When using GOEXPERIMENT=fieldtrack, we can see AUSEFIELD instructions. We generally want to ignore them. No tests because as far as I can tell there are no tests for GOEXPERIMENT=fieldtrack. Change-Id: Iee26f25592158e5db691a36cf8d77fc54d051314 Reviewed-on: https://go-review.googlesource.com/17610 Reviewed-by: David Symonds <dsymonds@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
371e44e5a1
commit
0b37a6f47b
@ -1365,7 +1365,8 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
|
||||
case obj.APCDATA,
|
||||
obj.AFUNCDATA,
|
||||
obj.AVARDEF,
|
||||
obj.AVARKILL:
|
||||
obj.AVARKILL,
|
||||
obj.AUSEFIELD:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
@ -710,7 +710,8 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
|
||||
obj.APCDATA,
|
||||
obj.AFUNCDATA,
|
||||
obj.AVARDEF,
|
||||
obj.AVARKILL:
|
||||
obj.AVARKILL,
|
||||
obj.AUSEFIELD:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
@ -687,7 +687,8 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
|
||||
case obj.APCDATA,
|
||||
obj.AFUNCDATA,
|
||||
obj.AVARDEF,
|
||||
obj.AVARKILL:
|
||||
obj.AVARKILL,
|
||||
obj.AUSEFIELD:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
@ -952,7 +952,8 @@ func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
|
||||
case obj.APCDATA,
|
||||
obj.AFUNCDATA,
|
||||
obj.AVARDEF,
|
||||
obj.AVARKILL:
|
||||
obj.AVARKILL,
|
||||
obj.AUSEFIELD:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ func span5(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
}
|
||||
}
|
||||
|
||||
if m == 0 && (p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != ADATABUNDLEEND && p.As != obj.ANOP) {
|
||||
if m == 0 && (p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != ADATABUNDLEEND && p.As != obj.ANOP && p.As != obj.AUSEFIELD) {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
continue
|
||||
}
|
||||
@ -710,7 +710,7 @@ func span5(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
if m/4 > len(out) {
|
||||
ctxt.Diag("instruction size too large: %d > %d", m/4, len(out))
|
||||
}
|
||||
if m == 0 && (p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != ADATABUNDLEEND && p.As != obj.ANOP) {
|
||||
if m == 0 && (p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != ADATABUNDLEEND && p.As != obj.ANOP && p.As != obj.AUSEFIELD) {
|
||||
if p.As == obj.ATEXT {
|
||||
ctxt.Autosize = int32(p.To.Offset + 4)
|
||||
continue
|
||||
|
@ -550,7 +550,7 @@ func span7(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
o = oplook(ctxt, p)
|
||||
m = int(o.size)
|
||||
if m == 0 {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != obj.AUSEFIELD {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
}
|
||||
continue
|
||||
@ -618,7 +618,7 @@ func span7(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
m = int(o.size)
|
||||
|
||||
if m == 0 {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != obj.AUSEFIELD {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
}
|
||||
continue
|
||||
|
@ -342,7 +342,7 @@ func span0(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
o = oplook(ctxt, p)
|
||||
m = int(o.size)
|
||||
if m == 0 {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != obj.AUSEFIELD {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
}
|
||||
continue
|
||||
@ -401,7 +401,7 @@ func span0(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
|
||||
m = int(o.size)
|
||||
if m == 0 {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != obj.AUSEFIELD {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
}
|
||||
continue
|
||||
|
@ -435,7 +435,7 @@ func span9(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
o = oplook(ctxt, p)
|
||||
m = int(o.size)
|
||||
if m == 0 {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != obj.AUSEFIELD {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
}
|
||||
continue
|
||||
@ -492,7 +492,7 @@ func span9(ctxt *obj.Link, cursym *obj.LSym) {
|
||||
|
||||
m = int(o.size)
|
||||
if m == 0 {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
|
||||
if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != obj.AUSEFIELD {
|
||||
ctxt.Diag("zero-width instruction\n%v", p)
|
||||
}
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user