mirror of
https://github.com/golang/go
synced 2024-11-13 16:00:21 -07:00
cmd/internal/obj: move Nocache helper to arm back end
The obj.Nocache helper was only used by the arm back end, move it there. Change-Id: I5c9faf995499991ead1f3d8c8ffc3b6af7346876 Reviewed-on: https://go-review.googlesource.com/20868 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
a4dce12803
commit
ca0f5c9740
@ -419,8 +419,8 @@ func asmoutnacl(ctxt *obj.Link, origPC int32, p *obj.Prog, o *Optab, out []uint3
|
|||||||
} else {
|
} else {
|
||||||
a2 = &q.From
|
a2 = &q.From
|
||||||
}
|
}
|
||||||
obj.Nocache(q)
|
nocache(q)
|
||||||
obj.Nocache(p)
|
nocache(p)
|
||||||
|
|
||||||
// insert q after p
|
// insert q after p
|
||||||
q.Link = p.Link
|
q.Link = p.Link
|
||||||
@ -496,8 +496,8 @@ func asmoutnacl(ctxt *obj.Link, origPC int32, p *obj.Prog, o *Optab, out []uint3
|
|||||||
} else {
|
} else {
|
||||||
a2 = &q.From
|
a2 = &q.From
|
||||||
}
|
}
|
||||||
obj.Nocache(q)
|
nocache(q)
|
||||||
obj.Nocache(p)
|
nocache(p)
|
||||||
|
|
||||||
// insert q after p
|
// insert q after p
|
||||||
q.Link = p.Link
|
q.Link = p.Link
|
||||||
@ -2829,3 +2829,12 @@ func chipfloat5(ctxt *obj.Link, e float64) int {
|
|||||||
//print("match %.8lux %.8lux %d\n", l, h, n);
|
//print("match %.8lux %.8lux %d\n", l, h, n);
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func nocache(p *obj.Prog) {
|
||||||
|
p.Optab = 0
|
||||||
|
p.From.Class = 0
|
||||||
|
if p.From3 != nil {
|
||||||
|
p.From3.Class = 0
|
||||||
|
}
|
||||||
|
p.To.Class = 0
|
||||||
|
}
|
||||||
|
@ -478,7 +478,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case obj.ARET:
|
case obj.ARET:
|
||||||
obj.Nocache(p)
|
nocache(p)
|
||||||
if cursym.Text.Mark&LEAF != 0 {
|
if cursym.Text.Mark&LEAF != 0 {
|
||||||
if autosize == 0 {
|
if autosize == 0 {
|
||||||
p.As = AB
|
p.As = AB
|
||||||
|
@ -60,15 +60,6 @@ func Nopout(p *Prog) {
|
|||||||
p.To = Addr{}
|
p.To = Addr{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func Nocache(p *Prog) {
|
|
||||||
p.Optab = 0
|
|
||||||
p.From.Class = 0
|
|
||||||
if p.From3 != nil {
|
|
||||||
p.From3.Class = 0
|
|
||||||
}
|
|
||||||
p.To.Class = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func Expstring() string {
|
func Expstring() string {
|
||||||
buf := "X"
|
buf := "X"
|
||||||
for i := range exper {
|
for i := range exper {
|
||||||
|
Loading…
Reference in New Issue
Block a user