mirror of
https://github.com/golang/go
synced 2024-11-19 09:34:52 -07:00
[dev.cc] cmd/asm: fix dev.cc 386 build: implement CALL *x(SB)
Also clean up the branch code a bit TBR=rsc Change-Id: I209dea750db3a6769e7ccd79bb65c4d809aba152 Reviewed-on: https://go-review.googlesource.com/4530 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
7c604b0b7d
commit
e90a91eac4
@ -309,16 +309,11 @@ func (p *Parser) asmJump(op int, a []obj.Addr) {
|
||||
prog.To = *target
|
||||
case target.Type == obj.TYPE_MEM && (target.Name == obj.NAME_EXTERN || target.Name == obj.NAME_STATIC):
|
||||
// JMP main·morestack(SB)
|
||||
isStatic := 0
|
||||
if target.Name == obj.NAME_STATIC {
|
||||
isStatic = 1
|
||||
}
|
||||
prog.To = obj.Addr{
|
||||
Type: obj.TYPE_BRANCH,
|
||||
Sym: obj.Linklookup(p.linkCtxt, target.Sym.Name, isStatic),
|
||||
Index: 0,
|
||||
Offset: target.Offset,
|
||||
}
|
||||
prog.To = *target
|
||||
case target.Type == obj.TYPE_INDIR && (target.Name == obj.NAME_EXTERN || target.Name == obj.NAME_STATIC):
|
||||
// JMP *main·morestack(SB)
|
||||
prog.To = *target
|
||||
prog.To.Type = obj.TYPE_INDIR
|
||||
case target.Type == obj.TYPE_MEM && target.Reg == 0 && target.Offset == 0:
|
||||
// JMP exit
|
||||
targetProg := p.labels[target.Sym.Name]
|
||||
|
Loading…
Reference in New Issue
Block a user