本文整理匯總了Golang中cmd/internal/obj.Plist.Firstpc方法的典型用法代碼示例。如果您正苦於以下問題:Golang Plist.Firstpc方法的具體用法?Golang Plist.Firstpc怎麽用?Golang Plist.Firstpc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cmd/internal/obj.Plist
的用法示例。
在下文中一共展示了Plist.Firstpc方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: outgcode
func outgcode(a int, g1 *obj.Addr, reg int, g2, g3 *obj.Addr) {
var p *obj.Prog
var pl *obj.Plist
if asm.Pass == 1 {
goto out
}
p = asm.Ctxt.NewProg()
p.As = int16(a)
p.Lineno = stmtline
if nosched != 0 {
p.Mark |= ppc64.NOSCHED
}
p.From = *g1
p.Reg = int16(reg)
p.From3 = *g2
p.To = *g3
p.Pc = int64(asm.PC)
if lastpc == nil {
pl = obj.Linknewplist(asm.Ctxt)
pl.Firstpc = p
} else {
lastpc.Link = p
}
lastpc = p
out:
if a != obj.AGLOBL && a != obj.ADATA {
asm.PC++
}
}
示例2: outcode
func outcode(a int, g2 *Addr2) {
var p *obj.Prog
var pl *obj.Plist
if asm.Pass == 1 {
goto out
}
p = new(obj.Prog)
*p = obj.Prog{}
p.Ctxt = asm.Ctxt
p.As = int16(a)
p.Lineno = stmtline
p.From = g2.from
p.To = g2.to
p.Pc = int64(asm.PC)
if lastpc == nil {
pl = obj.Linknewplist(asm.Ctxt)
pl.Firstpc = p
} else {
lastpc.Link = p
}
lastpc = p
out:
if a != obj.AGLOBL && a != obj.ADATA {
asm.PC++
}
}
示例3: outcode
func outcode(a int, g1 *obj.Addr, reg int, g2 *obj.Addr) {
var p *obj.Prog
var pl *obj.Plist
if asm.Pass == 1 {
goto out
}
if g1.Scale != 0 {
if reg != 0 || g2.Scale != 0 {
yyerror("bad addressing modes")
}
reg = int(g1.Scale)
} else if g2.Scale != 0 {
if reg != 0 {
yyerror("bad addressing modes")
}
reg = int(g2.Scale)
}
p = asm.Ctxt.NewProg()
p.As = int16(a)
p.Lineno = stmtline
if nosched != 0 {
p.Mark |= ppc64.NOSCHED
}
p.From = *g1
p.Reg = int16(reg)
p.To = *g2
p.Pc = int64(asm.PC)
if lastpc == nil {
pl = obj.Linknewplist(asm.Ctxt)
pl.Firstpc = p
} else {
lastpc.Link = p
}
lastpc = p
out:
if a != obj.AGLOBL && a != obj.ADATA {
asm.PC++
}
}