fmt.Printf("genhash %v %v\n", sym, t)
}
- lineno = 1 // less confusing than end of input
+ lineno = MakePos(nil, 1, 0) // less confusing than end of input
dclcontext = PEXTERN
markdcl()
typecheckslice(fn.Nbody.Slice(), Etop)
Curfn = nil
popdcl()
- testdclstack()
+ if debug_dclstack != 0 {
+ testdclstack()
+ }
// Disable safemode while compiling this code: the code we
// generate internally can refer to unsafe.Pointer.
fmt.Printf("geneq %v %v\n", sym, t)
}
- lineno = 1 // less confusing than end of input
+ lineno = MakePos(nil, 1, 0) // less confusing than end of input
dclcontext = PEXTERN
markdcl()
typecheckslice(fn.Nbody.Slice(), Etop)
Curfn = nil
popdcl()
- testdclstack()
+ if debug_dclstack != 0 {
+ testdclstack()
+ }
// Disable safemode while compiling this code: the code we
// generate internally can refer to unsafe.Pointer.
lastzero = o
}
o += w
- if o >= Thearch.MAXWIDTH {
+ maxwidth := Thearch.MAXWIDTH
+ // On 32-bit systems, reflect tables impose an additional constraint
+ // that each field start offset must fit in 31 bits.
+ if maxwidth < 1<<32 {
+ maxwidth = 1<<31 - 1
+ }
+ if o >= maxwidth {
yyerror("type %L too large", errtype)
o = 8 // small but nonzero
}
if t.Width == -2 {
if !t.Broke {
t.Broke = true
- yyerrorl(t.Lineno, "invalid recursive type %v", t)
+ yyerrorl(t.Pos, "invalid recursive type %v", t)
}
t.Width = 0
defercalc++
lno := lineno
- lineno = t.Lineno
+ lineno = t.Pos
t.Width = -2
t.Align = 0
},
{"amd64", "linux", `
import "encoding/binary"
+func f(b []byte, v uint64) {
+ binary.BigEndian.PutUint64(b, v)
+}
+`,
+ []string{"\tBSWAPQ\t"},
+ },
+ {"amd64", "linux", `
+import "encoding/binary"
func f(b []byte) uint32 {
return binary.BigEndian.Uint32(b)
}
func f(b []byte, i int) uint32 {
return binary.BigEndian.Uint32(b[i:])
}
+`,
+ []string{"\tBSWAPL\t"},
+ },
+ {"amd64", "linux", `
+import "encoding/binary"
+func f(b []byte, v uint32) {
+ binary.BigEndian.PutUint32(b, v)
+}
`,
[]string{"\tBSWAPL\t"},
},
`,
[]string{"\tMOVL\t\\(.*\\)\\(.*\\*1\\),"},
},
+
+ // Structure zeroing. See issue #18370.
+ {"amd64", "linux", `
+type T struct {
+ a, b, c int
+}
+func f(t *T) {
+ *t = T{}
+}
+`,
+ []string{"\tMOVQ\t\\$0, \\(.*\\)", "\tMOVQ\t\\$0, 8\\(.*\\)", "\tMOVQ\t\\$0, 16\\(.*\\)"},
+ },
+ // TODO: add a test for *t = T{3,4,5} when we fix that.
}
// mergeEnvLists merges the two environment lists such that
package main
func Mod32(x uint32) uint32 {
- return x % 3 // frontend rewrites it as HMUL with 2863311531, the LITERAL node has Lineno 0
+ return x % 3 // frontend rewrites it as HMUL with 2863311531, the LITERAL node has unknown Pos
}
`
const forceObjFileStability = true
// Current export format version. Increase with each format change.
-// 3: added aliasTag and export of aliases
-// 2: removed unused bool in ODCL export
+// 4: type name objects support type aliases, uses aliasTag
+// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used)
+// 2: removed unused bool in ODCL export (compiler only)
// 1: header format change (more regular), export package for _ struct fields
// 0: Go1.7 encoding
-const exportVersion = 3
+const exportVersion = 4
// exportInlined enables the export of inlined function bodies and related
// dependencies. The compiler should work w/o any loss of functionality with
p.tracef("\n")
}
- if sym.Flags&SymAlias != 0 {
- Fatalf("exporter: unexpected alias %v in inlined function body", sym)
+ if sym.isAlias() {
+ Fatalf("exporter: unexpected type alias %v in inlined function body", sym)
}
p.obj(sym)
}
func (p *exporter) obj(sym *Sym) {
- if sym.Flags&SymAlias != 0 {
- p.tag(aliasTag)
- p.pos(nil) // TODO(gri) fix position information
- // Aliases can only be exported from the package that
- // declares them (aliases to aliases are resolved to the
- // original object, and so are uses of aliases in inlined
- // exported function bodies). Thus, we only need the alias
- // name without package qualification.
- if sym.Pkg != localpkg {
- Fatalf("exporter: export of non-local alias: %v", sym)
- }
- p.string(sym.Name)
- orig := sym.Def.Sym
- if orig.Flags&SymAlias != 0 {
- Fatalf("exporter: original object %v marked as alias", sym)
- }
- p.qualifiedName(orig)
- return
- }
-
- if sym != sym.Def.Sym {
- Fatalf("exporter: exported object %v is not original %v", sym, sym.Def.Sym)
- }
-
// Exported objects may be from different packages because they
// may be re-exported via an exported alias or as dependencies in
// exported inlined function bodies. Thus, exported object names
Fatalf("exporter: export of incomplete type %v", sym)
}
- p.tag(typeTag)
+ if sym.isAlias() {
+ p.tag(aliasTag)
+ p.pos(n)
+ p.qualifiedName(sym)
+ } else {
+ p.tag(typeTag)
+ }
p.typ(t)
case ONAME:
func fileLine(n *Node) (file string, line int) {
if n != nil {
- file, line = Ctxt.LineHist.AbsFileLine(int(n.Lineno))
+ pos := Ctxt.PosTable.Pos(n.Pos)
+ file = pos.AbsFilename()
+ line = int(pos.Line())
}
return
}
// for the issue.
if p.nesting > 100 {
p.int(0) // 0 methods to indicate empty interface
- yyerrorl(t.Lineno, "cannot export unnamed recursive interface")
+ yyerrorl(t.Pos, "cannot export unnamed recursive interface")
break
}
func (p *exporter) method(m *Field) {
p.pos(m.Nname)
- p.fieldName(m)
+ p.methodName(m.Sym)
p.paramList(m.Type.Params(), false)
p.paramList(m.Type.Results(), false)
}
-// fieldName is like qualifiedName but it doesn't record the package for exported names.
func (p *exporter) fieldName(t *Field) {
name := t.Sym.Name
if t.Embedded != 0 {
- name = "" // anonymous field
- if bname := basetypeName(t.Type); bname != "" && !exportname(bname) {
- // anonymous field with unexported base type name
- name = "?" // unexported name to force export of package
+ // anonymous field - we distinguish between 3 cases:
+ // 1) field name matches base type name and is exported
+ // 2) field name matches base type name and is not exported
+ // 3) field name doesn't match base type name (alias name)
+ bname := basetypeName(t.Type)
+ if name == bname {
+ if exportname(name) {
+ name = "" // 1) we don't need to know the field name or package
+ } else {
+ name = "?" // 2) use unexported name "?" to force package export
+ }
+ } else {
+ // 3) indicate alias and export name as is
+ // (this requires an extra "@" but this is a rare case)
+ p.string("@")
}
}
p.string(name)
}
}
+// methodName is like qualifiedName but it doesn't record the package for exported names.
+func (p *exporter) methodName(sym *Sym) {
+ p.string(sym.Name)
+ if !exportname(sym.Name) {
+ p.pkg(sym.Pkg)
+ }
+}
+
func basetypeName(t *Type) string {
s := t.Sym
if s == nil && t.IsPtr() {
s = t.Elem().Sym // deref
}
- // s should exist, but be conservative
if s != nil {
return s.Name
}
- return ""
+ return "" // unnamed type
}
func (p *exporter) paramList(params *Type, numbered bool) {
Fatalf("invalid symbol name: %s", name)
}
- // Functions that can be inlined use numbered parameters so we can distingish them
+ // Functions that can be inlined use numbered parameters so we can distinguish them
// from other names in their context after inlining (i.e., the parameter numbering
// is a form of parameter rewriting). See issue 4326 for an example and test case.
if forceObjFileStability || numbered {
nilTag
unknownTag // not used by gc (only appears in packages with errors)
- // Aliases
+ // Type aliases
aliasTag
)
-nilTag: "nil",
-unknownTag: "unknown",
- // Aliases
+ // Type aliases
-aliasTag: "alias",
}
Types[TCOMPLEX128],
Types[TSTRING],
- // aliases
+ // basic type aliases
bytetype,
runetype,
package gc
import (
++ "cmd/compile/internal/syntax"
"cmd/internal/obj"
+ "cmd/internal/src"
"fmt"
"sort"
"strings"
// redeclare emits a diagnostic about symbol s being redeclared somewhere.
func redeclare(s *Sym, where string) {
- if s.Lastlineno == 0 {
+ if !s.Lastlineno.IsKnown() {
var tmp string
if s.Origpkg != nil {
tmp = s.Origpkg.Path
// named OLITERAL needs Name; most OLITERALs don't.
n.Name = new(Name)
}
- n.Lineno = lineno
+ n.Pos = lineno
s := n.Sym
// kludgy: typecheckok means we're past parsing. Eg genwrapper may declare out of package names later.
// declare constants from grammar
// new_name_list [[type] = expr_list]
func constiter(vl []*Node, t *Node, cl []*Node) []*Node {
- lno := int32(0) // default is to leave line number alone in listtreecopy
+ var lno src.XPos // default is to leave line number alone in listtreecopy
if len(cl) == 0 {
if t != nil {
yyerror("const declaration cannot have type without expression")
}
cl = lastconst
t = lasttype
- lno = vl[0].Lineno
+ lno = vl[0].Pos
} else {
lastconst = cl
lasttype = t
continue
}
if !colasname(n) {
- yyerrorl(defn.Lineno, "non-name %v on left side of :=", n)
+ yyerrorl(defn.Pos, "non-name %v on left side of :=", n)
nerr++
continue
}
if n.Sym.Flags&SymUniq == 0 {
- yyerrorl(defn.Lineno, "%v repeated on left side of :=", n.Sym)
+ yyerrorl(defn.Pos, "%v repeated on left side of :=", n.Sym)
n.Diag = true
nerr++
continue
}
if nnew == 0 && nerr == 0 {
- yyerrorl(defn.Lineno, "no new variables on left side of :=")
+ yyerrorl(defn.Pos, "no new variables on left side of :=")
}
}
Fatalf("funchdr: dclcontext = %d", dclcontext)
}
- if Ctxt.Flag_dynlink && importpkg == nil && n.Func.Nname != nil {
- makefuncsym(n.Func.Nname.Sym)
- }
-
dclcontext = PAUTO
funcstart(n)
// node n, which was returned by typedcl0
// is being declared to have uncompiled type t.
-// return the ODCLTYPE node to use.
-func typedcl1(n *Node, t *Node, local bool) *Node {
- n.Name.Param.Ntype = t
- n.Local = local
+// returns the ODCLTYPE node to use.
- func typedcl1(n *Node, t *Node, pragma Pragma, alias bool) *Node {
++func typedcl1(n *Node, t *Node, pragma syntax.Pragma, alias bool) *Node {
+ if pragma != 0 && alias {
+ yyerror("cannot specify directive with type alias")
+ pragma = 0
+ }
+
+ n.Local = true
+
+ p := n.Name.Param
+ p.Ntype = t
+ p.Pragma = pragma
+ p.Alias = alias
+
return nod(ODCLTYPE, n, nil)
}
if t.IsPtr() || t.IsUnsafePtr() {
yyerror("embedded type cannot be a pointer")
- } else if t.Etype == TFORW && t.ForwardType().Embedlineno == 0 {
+ } else if t.Etype == TFORW && !t.ForwardType().Embedlineno.IsKnown() {
t.ForwardType().Embedlineno = lineno
}
}
func structfield(n *Node) *Field {
lno := lineno
- lineno = n.Lineno
+ lineno = n.Pos
if n.Op != ODCLFIELD {
Fatalf("structfield: oops %v\n", n)
continue
}
if seen[f.Sym] {
- lineno = f.Nname.Lineno
+ lineno = f.Nname.Pos
yyerror("duplicate %s %s", what, f.Sym.Name)
continue
}
func interfacefield(n *Node) *Field {
lno := lineno
- lineno = n.Lineno
+ lineno = n.Pos
if n.Op != ODCLFIELD {
Fatalf("interfacefield: oops %v\n", n)
return nil
}
-func methodname(n *Node, t *Node) *Node {
+// methodname is a misnomer because this now returns a Sym, rather
+// than an ONAME.
+// TODO(mdempsky): Reconcile with methodsym.
+func methodname(s *Sym, recv *Type) *Sym {
star := false
- if t.Op == OIND {
+ if recv.IsPtr() {
star = true
- t = t.Left
+ recv = recv.Elem()
}
- return methodname0(n.Sym, star, t.Sym)
-}
-
-func methodname0(s *Sym, star bool, tsym *Sym) *Node {
+ tsym := recv.Sym
if tsym == nil || isblanksym(s) {
- return newfuncname(s)
+ return s
}
var p string
s = Pkglookup(p, tsym.Pkg)
}
- return newfuncname(s)
+ return s
}
// Add a method, declared as a function.
// - msym is the method symbol
// - t is function type (with receiver)
func addmethod(msym *Sym, t *Type, local, nointerface bool) {
- // get field sym
if msym == nil {
Fatalf("no method symbol")
}
s1 := Pkglookup(s.Name+"·f", s.Pkg)
if !Ctxt.Flag_dynlink && s1.Def == nil {
s1.Def = newfuncname(s1)
- s1.Def.Func.Shortname = newname(s)
+ s1.Def.Func.Shortname = s
funcsyms = append(funcsyms, s1.Def)
}
s.Fsym = s1
return
}
s1 := funcsym(s)
+ if s1.Def != nil {
+ return
+ }
s1.Def = newfuncname(s1)
- s1.Def.Func.Shortname = newname(s)
+ s1.Def.Func.Shortname = s
funcsyms = append(funcsyms, s1.Def)
}
type nowritebarrierrecCall struct {
target *Node
depth int
- lineno int32
+ lineno src.XPos
}
func checknowritebarrierrec() {
visitBottomUp(xtop, func(list []*Node, recursive bool) {
// Functions with write barriers have depth 0.
for _, n := range list {
- if n.Func.WBLineno != 0 && n.Func.Pragma&Yeswritebarrierrec == 0 {
- c.best[n] = nowritebarrierrecCall{target: nil, depth: 0, lineno: n.Func.WBLineno}
+ if n.Func.WBPos.IsKnown() && n.Func.Pragma&Yeswritebarrierrec == 0 {
+ c.best[n] = nowritebarrierrecCall{target: nil, depth: 0, lineno: n.Func.WBPos}
}
}
// yeswritebarrierrec function.
continue
}
- if n.Func.WBLineno == 0 {
+ if !n.Func.WBPos.IsKnown() {
c.curfn = n
c.visitcodelist(n.Nbody)
}
call = c.best[n]
}
err = fmt.Sprintf("write barrier prohibited by caller; %v%s", n.Func.Nname, err)
- yyerrorl(n.Func.WBLineno, err)
+ yyerrorl(n.Func.WBPos, err)
}
})
}
if ok && fnbest.depth+1 >= best.depth {
return
}
- c.best[c.curfn] = nowritebarrierrecCall{target: defn, depth: fnbest.depth + 1, lineno: n.Lineno}
+ c.best[c.curfn] = nowritebarrierrecCall{target: defn, depth: fnbest.depth + 1, lineno: n.Pos}
c.stable = false
}
fmt.Fprintf(s, " g(%d)", n.Name.Vargen)
}
- if n.Lineno != 0 {
- fmt.Fprintf(s, " l(%d)", n.Lineno)
+ if n.Pos.IsKnown() {
+ fmt.Fprintf(s, " l(%d)", n.Pos.Line())
}
if c == 0 && n.Xoffset != BADWIDTH {
OSEND: 3,
OANDAND: 2,
OOROR: 1,
+
// Statements handled by stmtfmt
OAS: -1,
OAS2: -1,
OSWITCH: -1,
OXCASE: -1,
OXFALL: -1,
- OEND: 0,
+
+ OEND: 0,
}
func (n *Node) exprfmt(s fmt.State, prec int) {
"cmd/compile/internal/ssa"
"cmd/internal/bio"
"cmd/internal/obj"
+ "cmd/internal/src"
)
const (
// saved and restored by dcopy
Pkg *Pkg
- Name string // object name
- Def *Node // definition: ONAME OTYPE OPACK or OLITERAL
- Block int32 // blocknumber to catch redeclaration
- Lastlineno int32 // last declaration for diagnostic
+ Name string // object name
+ Def *Node // definition: ONAME OTYPE OPACK or OLITERAL
+ Block int32 // blocknumber to catch redeclaration
+ Lastlineno src.XPos // last declaration for diagnostic
Label *Node // corresponding label (ephemeral)
Origpkg *Pkg // original package for . import
SymSiggen
SymAsm
SymAlgGen
- SymAlias // alias, original is Sym.Def.Sym
)
+func (sym *Sym) isAlias() bool {
+ return sym.Def != nil && sym.Def.Sym != sym
+}
+
// The Class of a variable/function describes the "storage class"
// of a variable or function. During parsing, storage classes are
// called declaration contexts.
// of the compilers arrays.
//
// typedef struct
-// { // must not move anything
+// { // must not move anything
// uchar array[8]; // pointer to data
// uchar nel[4]; // number of elements
// uchar cap[4]; // allocated number of elements
// of the compilers strings.
//
// typedef struct
-// { // must not move anything
+// { // must not move anything
// uchar array[8]; // pointer to data
// uchar nel[4]; // number of elements
// } String;
var pragcgobuf string
- var infile string
-
var outfile string
var linkobj string
"bytes"
"cmd/compile/internal/ssa"
"cmd/internal/obj"
+ "cmd/internal/src"
"cmd/internal/sys"
"flag"
"fmt"
)
var (
- Debug_append int
- Debug_closure int
- Debug_panic int
- Debug_slice int
- Debug_wb int
+ Debug_append int
+ Debug_closure int
+ debug_dclstack int
+ Debug_panic int
+ Debug_slice int
+ Debug_wb int
)
// Debug arguments.
{"append", &Debug_append}, // print information about append compilation
{"closure", &Debug_closure}, // print information about closure compilation
{"disablenil", &disable_checknil}, // disable nil checks
+ {"dclstack", &debug_dclstack}, // run internal dclstack checks
{"gcprog", &Debug_gcprog}, // print dump of GC programs
{"nil", &Debug_checknil}, // print information about nil checks
{"panic", &Debug_panic}, // do not hide any compiler panic
obj.Flagcount("r", "debug generated wrappers", &Debug['r'])
flag.BoolVar(&flag_race, "race", false, "enable race detector")
obj.Flagcount("s", "warn about composite literals that can be simplified", &Debug['s'])
- flag.StringVar(&Ctxt.LineHist.TrimPathPrefix, "trimpath", "", "remove `prefix` from recorded source file paths")
+ flag.StringVar(&pathPrefix, "trimpath", "", "remove `prefix` from recorded source file paths")
flag.BoolVar(&safemode, "u", false, "reject unsafe code")
obj.Flagcount("v", "increase debug verbosity", &Debug['v'])
obj.Flagcount("w", "debug type checking", &Debug['w'])
usage()
}
+ if outfile == "" {
+ p := flag.Arg(0)
+ if i := strings.LastIndex(p, "/"); i >= 0 {
+ p = p[i+1:]
+ }
+ if runtime.GOOS == "windows" {
+ if i := strings.LastIndex(p, `\`); i >= 0 {
+ p = p[i+1:]
+ }
+ }
+ if i := strings.LastIndex(p, "."); i >= 0 {
+ p = p[:i]
+ }
+ suffix := ".o"
+ if writearchive {
+ suffix = ".a"
+ }
+ outfile = p + suffix
+ }
+
startProfile()
if flag_race {
blockgen = 1
dclcontext = PEXTERN
nerrors = 0
- lexlineno = 1
timings.Start("fe", "loadsys")
loadsys()
timings.Start("fe", "parse")
- lexlineno0 := lexlineno
- for _, infile = range flag.Args() {
- linehistpush(infile)
- block = 1
- iota_ = -1000000
- imported_unsafe = false
- parseFile(infile)
- if nsyntaxerrors != 0 {
- errorexit()
- }
-
- // Instead of converting EOF into '\n' in getc and count it as an extra line
- // for the line history to work, and which then has to be corrected elsewhere,
- // just add a line here.
- lexlineno++
- linehistpop()
- }
+ lines := parseFiles(flag.Args())
timings.Stop()
- timings.AddEvent(int64(lexlineno-lexlineno0), "lines")
+ timings.AddEvent(int64(lines), "lines")
- mkpackage(localpkg.Name) // final import not used checks
- testdclstack()
finishUniverse()
typecheckok = true
// Phase 1: const, type, and names and types of funcs.
// This will gather all the information about types
// and methods but doesn't depend on any of it.
+ // We also defer type alias declarations until phase 2
+ // to avoid cycles like #18640.
defercheckwidth()
// Don't use range--typecheck can add closures to xtop.
timings.Start("fe", "typecheck", "top1")
for i := 0; i < len(xtop); i++ {
- if xtop[i].Op != ODCL && xtop[i].Op != OAS && xtop[i].Op != OAS2 {
- xtop[i] = typecheck(xtop[i], Etop)
+ n := xtop[i]
+ if op := n.Op; op != ODCL && op != OAS && op != OAS2 && (op != ODCLTYPE || !n.Left.Name.Param.Alias) {
+ xtop[i] = typecheck(n, Etop)
}
}
// Don't use range--typecheck can add closures to xtop.
timings.Start("fe", "typecheck", "top2")
for i := 0; i < len(xtop); i++ {
- if xtop[i].Op == ODCL || xtop[i].Op == OAS || xtop[i].Op == OAS2 {
- xtop[i] = typecheck(xtop[i], Etop)
+ n := xtop[i]
+ if op := n.Op; op == ODCL || op == OAS || op == OAS2 || op == ODCLTYPE && n.Left.Name.Param.Alias {
+ xtop[i] = typecheck(n, Etop)
}
}
resumecheckwidth()
timings.Start("fe", "typecheck", "func")
var fcount int64
for i := 0; i < len(xtop); i++ {
- if xtop[i].Op == ODCLFUNC || xtop[i].Op == OCLOSURE {
- Curfn = xtop[i]
+ n := xtop[i]
+ if op := n.Op; op == ODCLFUNC || op == OCLOSURE {
+ Curfn = n
decldepth = 1
saveerrors()
typecheckslice(Curfn.Nbody.Slice(), Etop)
timings.Start("be", "compilefuncs")
fcount = 0
for i := 0; i < len(xtop); i++ {
- if xtop[i].Op == ODCLFUNC {
- funccompile(xtop[i])
+ n := xtop[i]
+ if n.Op == ODCLFUNC {
+ funccompile(n)
fcount++
}
}
defer impf.Close()
imp := bufio.NewReader(impf)
- if strings.HasSuffix(file, ".a") {
+ const pkgSuffix = ".a"
+ if strings.HasSuffix(file, pkgSuffix) {
if !skiptopkgdef(imp) {
yyerror("import %s: not a package file", file)
errorexit()
yyerror("cannot import unsafe package %q", importpkg.Path)
}
- // assume files move (get installed)
- // so don't record the full path.
- linehistpragma(file[len(file)-len(path_)-2:]) // acts as #pragma lib
+ // assume files move (get installed) so don't record the full path
+ // (e.g., for file "/Users/foo/go/pkg/darwin_amd64/math.a" record "math.a")
+ Ctxt.AddImport(file[len(file)-len(path_)-len(pkgSuffix):])
// In the importfile, if we find:
// $$\n (textual format): not supported anymore
}
}
- func pkgnotused(lineno int32, path string, name string) {
+ func pkgnotused(lineno src.XPos, path string, name string) {
// If the package was imported with a name other than the final
// import path element, show it explicitly in the error message.
// Note that this handles both renamed imports and imports of
if pkgname != localpkg.Name {
yyerror("package %s; expected %s", pkgname, localpkg.Name)
}
- for _, s := range localpkg.Syms {
- if s.Def == nil {
- continue
- }
- if s.Def.Op == OPACK {
- // throw away top-level package name leftover
- // from previous file.
- // leave s->block set to cause redeclaration
- // errors if a conflicting top-level name is
- // introduced by a different file.
- if !s.Def.Used && nsyntaxerrors == 0 {
- pkgnotused(s.Def.Lineno, s.Def.Name.Pkg.Path, s.Name)
- }
- s.Def = nil
- continue
- }
-
- if s.isAlias() {
- // throw away top-level name left over
- // from previous import . "x"
- if s.Def.Name != nil && s.Def.Name.Pack != nil && !s.Def.Name.Pack.Used && nsyntaxerrors == 0 {
- pkgnotused(s.Def.Name.Pack.Lineno, s.Def.Name.Pack.Name.Pkg.Path, "")
- s.Def.Name.Pack.Used = true
- }
+ }
+ }
- s.Def = nil
- continue
+ func clearImports() {
+ for _, s := range localpkg.Syms {
+ if s.Def == nil {
+ continue
+ }
+ if s.Def.Op == OPACK {
+ // throw away top-level package name leftover
+ // from previous file.
+ // leave s->block set to cause redeclaration
+ // errors if a conflicting top-level name is
+ // introduced by a different file.
+ if !s.Def.Used && nsyntaxerrors == 0 {
+ pkgnotused(s.Def.Pos, s.Def.Name.Pkg.Path, s.Name)
}
+ s.Def = nil
+ continue
}
- }
- if outfile == "" {
- p := infile
- if i := strings.LastIndex(p, "/"); i >= 0 {
- p = p[i+1:]
- }
- if runtime.GOOS == "windows" {
- if i := strings.LastIndex(p, `\`); i >= 0 {
- p = p[i+1:]
- if s.Def.Sym != s && s.Flags&SymAlias == 0 {
++ if s.isAlias() {
+ // throw away top-level name left over
+ // from previous import . "x"
+ if s.Def.Name != nil && s.Def.Name.Pack != nil && !s.Def.Name.Pack.Used && nsyntaxerrors == 0 {
+ pkgnotused(s.Def.Name.Pack.Pos, s.Def.Name.Pack.Name.Pkg.Path, "")
+ s.Def.Name.Pack.Used = true
}
+
+ s.Def = nil
+ continue
}
- if i := strings.LastIndex(p, "."); i >= 0 {
- p = p[:i]
- }
- suffix := ".o"
- if writearchive {
- suffix = ".a"
- }
- outfile = p + suffix
}
}
"unicode/utf8"
"cmd/compile/internal/syntax"
+ "cmd/internal/obj"
+ "cmd/internal/src"
)
- func parseFile(filename string) {
- src, err := os.Open(filename)
- if err != nil {
- fmt.Println(err)
- errorexit()
- }
- defer src.Close()
+ func parseFiles(filenames []string) uint {
+ var lines uint
+ var noders []*noder
- p := noder{baseline: lexlineno}
- file, _ := syntax.Parse(src, p.error, p.pragma, 0) // errors are tracked via p.error
+ for _, filename := range filenames {
+ p := &noder{err: make(chan syntax.Error)}
+ noders = append(noders, p)
- p.file(file)
+ go func(filename string) {
+ defer close(p.err)
+ base := src.NewFileBase(filename, absFilename(filename))
- if !imported_unsafe {
- for _, x := range p.linknames {
- p.error(syntax.Error{Line: x, Msg: "//go:linkname only allowed in Go files that import \"unsafe\""})
- }
+ f, err := os.Open(filename)
+ if err != nil {
+ p.error(syntax.Error{Pos: src.MakePos(base, 0, 0), Msg: err.Error()})
+ return
+ }
+ defer f.Close()
+
+ p.file, _ = syntax.Parse(base, f, p.error, p.pragma, 0) // errors are tracked via p.error
+ }(filename)
}
- if nsyntaxerrors == 0 {
+ for _, p := range noders {
+ for e := range p.err {
+ yyerrorpos(e.Pos, "%s", e.Msg)
+ }
+
+ p.node()
+ lines += p.file.Lines
+ p.file = nil // release memory
+
+ if nsyntaxerrors != 0 {
+ errorexit()
+ }
+ // Always run testdclstack here, even when debug_dclstack is not set, as a sanity measure.
testdclstack()
}
+
+ return lines
+ }
+
+ func yyerrorpos(pos src.Pos, format string, args ...interface{}) {
+ yyerrorl(Ctxt.PosTable.XPos(pos), format, args...)
}
- // noder transforms package syntax's AST into a Nod tree.
+ var pathPrefix string
+
+ func absFilename(name string) string {
+ return obj.AbsFile(Ctxt.Pathname, name, pathPrefix)
+ }
+
+ // noder transforms package syntax's AST into a Node tree.
type noder struct {
- baseline int32
- linknames []int // tracks //go:linkname lines
+ file *syntax.File
+ linknames []linkname
+ pragcgobuf string
+ err chan syntax.Error
+ }
+
+ // linkname records a //go:linkname directive.
+ type linkname struct {
+ pos src.Pos
+ local string
+ remote string
}
- func (p *noder) file(file *syntax.File) {
- p.lineno(file.PkgName)
- mkpackage(file.PkgName.Value)
+ func (p *noder) node() {
+ block = 1
+ iota_ = -1000000
+ imported_unsafe = false
+
+ p.lineno(p.file.PkgName)
+ mkpackage(p.file.PkgName.Value)
- xtop = append(xtop, p.decls(file.DeclList)...)
+ xtop = append(xtop, p.decls(p.file.DeclList)...)
- lexlineno = p.baseline + int32(file.Lines) - 1
- lineno = lexlineno
+ for _, n := range p.linknames {
+ if imported_unsafe {
+ lookup(n.local).Linkname = n.remote
+ } else {
+ yyerrorpos(n.pos, "//go:linkname only allowed in Go files that import \"unsafe\"")
+ }
+ }
+
+ pragcgobuf += p.pragcgobuf
+
+ // For compatibility with old code only (comparisons w/ toolstash):
+ // The old line number tracking simply continued incrementing the
+ // virtual line number (lexlineno) and using it also for lineno.
+ // After processing the last function, the lineno was used for the
+ // line number information of the initialization code (fninit).
+ // It would be better to use an explicit "<autogenerated>" filename
+ // for fninit and set lineno to NoPos here.
+ // TODO(gri) fix this once we switched permanently to the new
+ // position information.
+ lineno = MakePos(p.file.Pos().Base(), uint(p.file.Lines), 0)
+
+ clearImports()
}
func (p *noder) decls(decls []syntax.Decl) (l []*Node) {
return
}
if my.Name == "init" {
- yyerrorl(pack.Lineno, "cannot import package as init - init must be a func")
+ yyerrorl(pack.Pos, "cannot import package as init - init must be a func")
return
}
if my.Name == "_" {
return
}
if my.Def != nil {
- lineno = pack.Lineno
+ lineno = pack.Pos
redeclare(my, "as imported package name")
}
my.Def = pack
- my.Lastlineno = pack.Lineno
+ my.Lastlineno = pack.Pos
my.Block = 1 // at top level
}
func (p *noder) varDecl(decl *syntax.VarDecl) []*Node {
names := p.declNames(decl.NameList)
-
- var typ *Node
- if decl.Type != nil {
- typ = p.typeExpr(decl.Type)
- }
+ typ := p.typeExprOrNil(decl.Type)
var exprs []*Node
if decl.Values != nil {
func (p *noder) constDecl(decl *syntax.ConstDecl) []*Node {
names := p.declNames(decl.NameList)
-
- var typ *Node
- if decl.Type != nil {
- typ = p.typeExpr(decl.Type)
- }
+ typ := p.typeExprOrNil(decl.Type)
var exprs []*Node
if decl.Values != nil {
func (p *noder) typeDecl(decl *syntax.TypeDecl) *Node {
name := typedcl0(p.name(decl.Name))
- name.Name.Param.Pragma = decl.Pragma
- var typ *Node
- if decl.Type != nil {
- typ = p.typeExpr(decl.Type)
- }
+ // decl.Type may be nil but in that case we got a syntax error during parsing
+ typ := p.typeExprOrNil(decl.Type)
- return typedcl1(name, typ, Pragma(decl.Pragma), decl.Alias)
- return typedcl1(name, typ, true)
++ return typedcl1(name, typ, syntax.Pragma(decl.Pragma), decl.Alias)
}
func (p *noder) declNames(names []*syntax.Name) []*Node {
}
}
- pragma := Pragma(fun.Pragma)
+ pragma := fun.Pragma
f.Nbody.Set(body)
f.Noescape = pragma&Noescape != 0
yyerror("can only use //go:noescape with external func implementations")
}
f.Func.Pragma = pragma
- lineno = p.baseline + int32(fun.EndLine) - 1
+ lineno = MakePos(fun.Pos().Base(), fun.EndLine, 0)
f.Func.Endlineno = lineno
funcbody(f)
yyerror("func main must have no arguments and no return values")
}
}
-
- f.Func.Nname = newfuncname(name)
} else {
- // Receiver MethodName Signature
-
- f.Func.Shortname = newfuncname(name)
- f.Func.Nname = methodname(f.Func.Shortname, t.Left.Right)
+ f.Func.Shortname = name
+ name = nblank.Sym // filled in by typecheckfunc
}
+ f.Func.Nname = newfuncname(name)
f.Func.Nname.Name.Defn = f
f.Func.Nname.Name.Param.Ntype = t // TODO: check if nname already has an ntype
- declare(f.Func.Nname, PFUNC)
+ if fun.Recv == nil {
+ declare(f.Func.Nname, PFUNC)
+ }
+
funchdr(f)
return f
}
l[i] = p.wrapname(expr.ElemList[i], e)
}
n.List.Set(l)
- lineno = p.baseline + int32(expr.EndLine) - 1
+ lineno = MakePos(expr.Pos().Base(), expr.EndLine, 0)
return n
case *syntax.KeyValueExpr:
return p.nod(expr, OKEY, p.expr(expr.Key), p.wrapname(expr.Value, p.expr(expr.Value)))
case *syntax.FuncLit:
closurehdr(p.typeExpr(expr.Type))
body := p.stmts(expr.Body)
- lineno = p.baseline + int32(expr.EndLine) - 1
+ lineno = MakePos(expr.Pos().Base(), expr.EndLine, 0)
return p.setlineno(expr, closurebody(body))
case *syntax.ParenExpr:
return p.nod(expr, OPAREN, p.expr(expr.X), nil)
return p.expr(typ)
}
+func (p *noder) typeExprOrNil(typ syntax.Expr) *Node {
+ if typ != nil {
+ return p.expr(typ)
+ }
+ return nil
+}
+
func (p *noder) chanDir(dir syntax.ChanDir) ChanDir {
switch dir {
case 0:
return p.setlineno(orig, nod(op, left, right))
}
- func (p *noder) setlineno(src syntax.Node, dst *Node) *Node {
- l := int32(src.Line())
- if l == 0 {
+ func (p *noder) setlineno(src_ syntax.Node, dst *Node) *Node {
+ pos := src_.Pos()
+ if !pos.IsKnown() {
// TODO(mdempsky): Shouldn't happen. Fix package syntax.
return dst
}
- dst.Lineno = p.baseline + l - 1
+ dst.Pos = Ctxt.PosTable.XPos(pos)
return dst
}
if n == nil {
return
}
- l := int32(n.Line())
- if l == 0 {
+ pos := n.Pos()
+ if !pos.IsKnown() {
// TODO(mdempsky): Shouldn't happen. Fix package syntax.
return
}
- lineno = p.baseline + l - 1
+ lineno = Ctxt.PosTable.XPos(pos)
}
func (p *noder) error(err error) {
- line := p.baseline
- var msg string
- if err, ok := err.(syntax.Error); ok {
- line += int32(err.Line) - 1
- msg = err.Msg
- } else {
- msg = err.Error()
- }
- yyerrorl(line, "%s", msg)
+ p.err <- err.(syntax.Error)
}
- func (p *noder) pragma(pos, line int, text string) syntax.Pragma {
+ func (p *noder) pragma(pos src.Pos, text string) syntax.Pragma {
switch {
case strings.HasPrefix(text, "line "):
- // Want to use LastIndexByte below but it's not defined in Go1.4 and bootstrap fails.
- i := strings.LastIndex(text, ":") // look from right (Windows filenames may contain ':')
- if i < 0 {
- break
- }
- n, err := strconv.Atoi(text[i+1:])
- if err != nil {
- // TODO: make this an error instead? it is almost certainly a bug.
- break
- }
- if n > 1e8 {
- p.error(syntax.Error{Pos: pos, Line: line, Msg: "line number out of range"})
- errorexit()
- }
- if n <= 0 {
- break
- }
- lexlineno = p.baseline + int32(line)
- linehistupdate(text[5:i], n)
+ // line directives are handled by syntax package
+ panic("unreachable")
case strings.HasPrefix(text, "go:linkname "):
- // Record line number so we can emit an error later if
- // the file doesn't import package unsafe.
- p.linknames = append(p.linknames, line)
-
f := strings.Fields(text)
if len(f) != 3 {
- p.error(syntax.Error{Pos: pos, Line: line, Msg: "usage: //go:linkname localname linkname"})
+ p.error(syntax.Error{Pos: pos, Msg: "usage: //go:linkname localname linkname"})
break
}
- lookup(f[1]).Linkname = f[2]
+ p.linknames = append(p.linknames, linkname{pos, f[1], f[2]})
case strings.HasPrefix(text, "go:cgo_"):
- lineno = p.baseline + int32(line) - 1 // pragcgo may call yyerror
- pragcgobuf += pragcgo(text)
++ // TODO(gri): lineno = p.baseline + int32(line) - 1 // pragcgo may call yyerror
+ p.pragcgobuf += pragcgo(text)
fallthrough // because of //go:cgo_unsafe_args
default:
verb := text
if i := strings.Index(text, " "); i >= 0 {
verb = verb[:i]
}
- lineno = p.baseline + int32(line) - 1 // pragmaValue may call yyerror
- return syntax.Pragma(pragmaValue(verb))
+ prag := pragmaValue(verb)
+ const runtimePragmas = Systemstack | Nowritebarrier | Nowritebarrierrec | Yeswritebarrierrec
+ if !compiling_runtime && prag&runtimePragmas != 0 {
+ p.error(syntax.Error{Pos: pos, Msg: fmt.Sprintf("//go:%s only allowed in runtime", verb)})
+ }
+ return prag
}
return 0
Fatalf("staticinit")
}
- lineno = n.Lineno
+ lineno = n.Pos
l := n.Name.Defn.Left
r := n.Name.Defn.Right
return staticassign(l, r, out)
case OCLOSURE:
if hasemptycvars(r) {
if Debug_closure > 0 {
- Warnl(r.Lineno, "closure converted to global")
+ Warnl(r.Pos, "closure converted to global")
}
// Closures with no captured variables are globals,
// so the assignment can be done at link time.
var r *Node
if n.Right != nil {
+ // n.Right is stack temporary used as backing store.
+ init.Append(nod(OAS, n.Right, nil)) // zero backing store, just in case (#18410)
r = nod(OADDR, n.Right, nil)
r = typecheck(r, Erv)
} else {
return -1
}
-// stataddr sets nam to the static address of n and reports whether it succeeeded.
+// stataddr sets nam to the static address of n and reports whether it succeeded.
func stataddr(nam *Node, n *Node) bool {
if n == nil {
return false
"cmd/compile/internal/ssa"
"cmd/internal/obj"
+ "cmd/internal/src"
"cmd/internal/sys"
)
}
var s state
- s.pushLine(fn.Lineno)
+ s.pushLine(fn.Pos)
defer s.popLine()
if fn.Func.Pragma&CgoUnsafeArgs != 0 {
s.noWB = true
}
defer func() {
- if s.WBLineno != 0 {
- fn.Func.WBLineno = s.WBLineno
+ if s.WBPos.IsKnown() {
+ fn.Func.WBPos = s.WBPos
}
}()
// TODO(khr): build config just once at the start of the compiler binary
s.config = initssa()
s.f = s.config.NewFunc()
s.f.Name = name
+ if fn.Func.Pragma&Nosplit != 0 {
+ s.f.NoSplit = true
+ }
s.exitCode = fn.Func.Exit
s.panics = map[funcLine]*ssa.Block{}
s.config.DebugTest = s.config.DebugHashMatch("GOSSAHASH", name)
// Check that we used all labels
for name, lab := range s.labels {
if !lab.used() && !lab.reported && !lab.defNode.Used {
- yyerrorl(lab.defNode.Lineno, "label %v defined and not used", name)
+ yyerrorl(lab.defNode.Pos, "label %v defined and not used", name)
lab.reported = true
}
if lab.used() && !lab.defined() && !lab.reported {
- yyerrorl(lab.useNode.Lineno, "label %v not defined", name)
+ yyerrorl(lab.useNode.Pos, "label %v not defined", name)
lab.reported = true
}
}
sb *ssa.Value
// line number stack. The current line number is top of stack
- line []int32
+ line []src.XPos
// list of panic calls by function name and line number.
// Used to deduplicate panic calls.
cgoUnsafeArgs bool
noWB bool
- WBLineno int32 // line number of first write barrier. 0=no write barriers
+ WBPos src.XPos // line number of first write barrier. 0=no write barriers
}
type funcLine struct {
f *Node
- line int32
+ line src.XPos
}
type ssaLabel struct {
return lab
}
- func (s *state) Logf(msg string, args ...interface{}) { s.config.Logf(msg, args...) }
- func (s *state) Log() bool { return s.config.Log() }
- func (s *state) Fatalf(msg string, args ...interface{}) { s.config.Fatalf(s.peekLine(), msg, args...) }
- func (s *state) Warnl(line int32, msg string, args ...interface{}) { s.config.Warnl(line, msg, args...) }
- func (s *state) Debug_checknil() bool { return s.config.Debug_checknil() }
+ func (s *state) Logf(msg string, args ...interface{}) { s.config.Logf(msg, args...) }
+ func (s *state) Log() bool { return s.config.Log() }
+ func (s *state) Fatalf(msg string, args ...interface{}) { s.config.Fatalf(s.peekPos(), msg, args...) }
+ func (s *state) Warnl(pos src.XPos, msg string, args ...interface{}) {
+ s.config.Warnl(pos, msg, args...)
+ }
+ func (s *state) Debug_checknil() bool { return s.config.Debug_checknil() }
var (
// dummy node for the memory variable
s.defvars[b.ID] = s.vars
s.curBlock = nil
s.vars = nil
- b.Line = s.peekLine()
+ b.Pos = s.peekPos()
return b
}
// pushLine pushes a line number on the line number stack.
- func (s *state) pushLine(line int32) {
- if line == 0 {
+ func (s *state) pushLine(line src.XPos) {
+ if !line.IsKnown() {
// the frontend may emit node with line number missing,
// use the parent line number in this case.
- line = s.peekLine()
+ line = s.peekPos()
if Debug['K'] != 0 {
- Warn("buildssa: line 0")
+ Warn("buildssa: unknown position (line 0)")
}
}
s.line = append(s.line, line)
s.line = s.line[:len(s.line)-1]
}
- // peekLine peek the top of the line number stack.
- func (s *state) peekLine() int32 {
+ // peekPos peeks the top of the line number stack.
+ func (s *state) peekPos() src.XPos {
return s.line[len(s.line)-1]
}
func (s *state) Error(msg string, args ...interface{}) {
- yyerrorl(s.peekLine(), msg, args...)
+ yyerrorl(s.peekPos(), msg, args...)
}
// newValue0 adds a new value with no arguments to the current block.
func (s *state) newValue0(op ssa.Op, t ssa.Type) *ssa.Value {
- return s.curBlock.NewValue0(s.peekLine(), op, t)
+ return s.curBlock.NewValue0(s.peekPos(), op, t)
}
// newValue0A adds a new value with no arguments and an aux value to the current block.
func (s *state) newValue0A(op ssa.Op, t ssa.Type, aux interface{}) *ssa.Value {
- return s.curBlock.NewValue0A(s.peekLine(), op, t, aux)
+ return s.curBlock.NewValue0A(s.peekPos(), op, t, aux)
}
// newValue0I adds a new value with no arguments and an auxint value to the current block.
func (s *state) newValue0I(op ssa.Op, t ssa.Type, auxint int64) *ssa.Value {
- return s.curBlock.NewValue0I(s.peekLine(), op, t, auxint)
+ return s.curBlock.NewValue0I(s.peekPos(), op, t, auxint)
}
// newValue1 adds a new value with one argument to the current block.
func (s *state) newValue1(op ssa.Op, t ssa.Type, arg *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue1(s.peekLine(), op, t, arg)
+ return s.curBlock.NewValue1(s.peekPos(), op, t, arg)
}
// newValue1A adds a new value with one argument and an aux value to the current block.
func (s *state) newValue1A(op ssa.Op, t ssa.Type, aux interface{}, arg *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue1A(s.peekLine(), op, t, aux, arg)
+ return s.curBlock.NewValue1A(s.peekPos(), op, t, aux, arg)
}
// newValue1I adds a new value with one argument and an auxint value to the current block.
func (s *state) newValue1I(op ssa.Op, t ssa.Type, aux int64, arg *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue1I(s.peekLine(), op, t, aux, arg)
+ return s.curBlock.NewValue1I(s.peekPos(), op, t, aux, arg)
}
// newValue2 adds a new value with two arguments to the current block.
func (s *state) newValue2(op ssa.Op, t ssa.Type, arg0, arg1 *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue2(s.peekLine(), op, t, arg0, arg1)
+ return s.curBlock.NewValue2(s.peekPos(), op, t, arg0, arg1)
}
// newValue2I adds a new value with two arguments and an auxint value to the current block.
func (s *state) newValue2I(op ssa.Op, t ssa.Type, aux int64, arg0, arg1 *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue2I(s.peekLine(), op, t, aux, arg0, arg1)
+ return s.curBlock.NewValue2I(s.peekPos(), op, t, aux, arg0, arg1)
}
// newValue3 adds a new value with three arguments to the current block.
func (s *state) newValue3(op ssa.Op, t ssa.Type, arg0, arg1, arg2 *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue3(s.peekLine(), op, t, arg0, arg1, arg2)
+ return s.curBlock.NewValue3(s.peekPos(), op, t, arg0, arg1, arg2)
}
// newValue3I adds a new value with three arguments and an auxint value to the current block.
func (s *state) newValue3I(op ssa.Op, t ssa.Type, aux int64, arg0, arg1, arg2 *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue3I(s.peekLine(), op, t, aux, arg0, arg1, arg2)
+ return s.curBlock.NewValue3I(s.peekPos(), op, t, aux, arg0, arg1, arg2)
}
// newValue4 adds a new value with four arguments to the current block.
func (s *state) newValue4(op ssa.Op, t ssa.Type, arg0, arg1, arg2, arg3 *ssa.Value) *ssa.Value {
- return s.curBlock.NewValue4(s.peekLine(), op, t, arg0, arg1, arg2, arg3)
+ return s.curBlock.NewValue4(s.peekPos(), op, t, arg0, arg1, arg2, arg3)
}
// entryNewValue0 adds a new value with no arguments to the entry block.
func (s *state) entryNewValue0(op ssa.Op, t ssa.Type) *ssa.Value {
- return s.f.Entry.NewValue0(s.peekLine(), op, t)
+ return s.f.Entry.NewValue0(s.peekPos(), op, t)
}
// entryNewValue0A adds a new value with no arguments and an aux value to the entry block.
func (s *state) entryNewValue0A(op ssa.Op, t ssa.Type, aux interface{}) *ssa.Value {
- return s.f.Entry.NewValue0A(s.peekLine(), op, t, aux)
+ return s.f.Entry.NewValue0A(s.peekPos(), op, t, aux)
}
// entryNewValue0I adds a new value with no arguments and an auxint value to the entry block.
func (s *state) entryNewValue0I(op ssa.Op, t ssa.Type, auxint int64) *ssa.Value {
- return s.f.Entry.NewValue0I(s.peekLine(), op, t, auxint)
+ return s.f.Entry.NewValue0I(s.peekPos(), op, t, auxint)
}
// entryNewValue1 adds a new value with one argument to the entry block.
func (s *state) entryNewValue1(op ssa.Op, t ssa.Type, arg *ssa.Value) *ssa.Value {
- return s.f.Entry.NewValue1(s.peekLine(), op, t, arg)
+ return s.f.Entry.NewValue1(s.peekPos(), op, t, arg)
}
// entryNewValue1 adds a new value with one argument and an auxint value to the entry block.
func (s *state) entryNewValue1I(op ssa.Op, t ssa.Type, auxint int64, arg *ssa.Value) *ssa.Value {
- return s.f.Entry.NewValue1I(s.peekLine(), op, t, auxint, arg)
+ return s.f.Entry.NewValue1I(s.peekPos(), op, t, auxint, arg)
}
// entryNewValue1A adds a new value with one argument and an aux value to the entry block.
func (s *state) entryNewValue1A(op ssa.Op, t ssa.Type, aux interface{}, arg *ssa.Value) *ssa.Value {
- return s.f.Entry.NewValue1A(s.peekLine(), op, t, aux, arg)
+ return s.f.Entry.NewValue1A(s.peekPos(), op, t, aux, arg)
}
// entryNewValue2 adds a new value with two arguments to the entry block.
func (s *state) entryNewValue2(op ssa.Op, t ssa.Type, arg0, arg1 *ssa.Value) *ssa.Value {
- return s.f.Entry.NewValue2(s.peekLine(), op, t, arg0, arg1)
+ return s.f.Entry.NewValue2(s.peekPos(), op, t, arg0, arg1)
}
// const* routines add a new const value to the entry block.
- func (s *state) constSlice(t ssa.Type) *ssa.Value { return s.f.ConstSlice(s.peekLine(), t) }
- func (s *state) constInterface(t ssa.Type) *ssa.Value { return s.f.ConstInterface(s.peekLine(), t) }
- func (s *state) constNil(t ssa.Type) *ssa.Value { return s.f.ConstNil(s.peekLine(), t) }
- func (s *state) constEmptyString(t ssa.Type) *ssa.Value { return s.f.ConstEmptyString(s.peekLine(), t) }
+ func (s *state) constSlice(t ssa.Type) *ssa.Value { return s.f.ConstSlice(s.peekPos(), t) }
+ func (s *state) constInterface(t ssa.Type) *ssa.Value { return s.f.ConstInterface(s.peekPos(), t) }
+ func (s *state) constNil(t ssa.Type) *ssa.Value { return s.f.ConstNil(s.peekPos(), t) }
+ func (s *state) constEmptyString(t ssa.Type) *ssa.Value { return s.f.ConstEmptyString(s.peekPos(), t) }
func (s *state) constBool(c bool) *ssa.Value {
- return s.f.ConstBool(s.peekLine(), Types[TBOOL], c)
+ return s.f.ConstBool(s.peekPos(), Types[TBOOL], c)
}
func (s *state) constInt8(t ssa.Type, c int8) *ssa.Value {
- return s.f.ConstInt8(s.peekLine(), t, c)
+ return s.f.ConstInt8(s.peekPos(), t, c)
}
func (s *state) constInt16(t ssa.Type, c int16) *ssa.Value {
- return s.f.ConstInt16(s.peekLine(), t, c)
+ return s.f.ConstInt16(s.peekPos(), t, c)
}
func (s *state) constInt32(t ssa.Type, c int32) *ssa.Value {
- return s.f.ConstInt32(s.peekLine(), t, c)
+ return s.f.ConstInt32(s.peekPos(), t, c)
}
func (s *state) constInt64(t ssa.Type, c int64) *ssa.Value {
- return s.f.ConstInt64(s.peekLine(), t, c)
+ return s.f.ConstInt64(s.peekPos(), t, c)
}
func (s *state) constFloat32(t ssa.Type, c float64) *ssa.Value {
- return s.f.ConstFloat32(s.peekLine(), t, c)
+ return s.f.ConstFloat32(s.peekPos(), t, c)
}
func (s *state) constFloat64(t ssa.Type, c float64) *ssa.Value {
- return s.f.ConstFloat64(s.peekLine(), t, c)
+ return s.f.ConstFloat64(s.peekPos(), t, c)
}
func (s *state) constInt(t ssa.Type, c int64) *ssa.Value {
if s.config.IntSize == 8 {
// stmt converts the statement n to SSA and adds it to s.
func (s *state) stmt(n *Node) {
- s.pushLine(n.Lineno)
+ s.pushLine(n.Pos)
defer s.popLine()
// If s.curBlock is nil, then we're about to generate dead code.
deref = true
res = res.Args[0]
}
- s.assign(n.List.First(), res, needwritebarrier(n.List.First(), n.Rlist.First()), deref, n.Lineno, 0, false)
- s.assign(n.List.Second(), resok, false, false, n.Lineno, 0, false)
+ s.assign(n.List.First(), res, needwritebarrier(n.List.First(), n.Rlist.First()), deref, n.Pos, 0, false)
+ s.assign(n.List.Second(), resok, false, false, n.Pos, 0, false)
return
case OAS2FUNC:
// This is future-proofing against non-scalar 2-result intrinsics.
// Currently we only have scalar ones, which result in no write barrier.
fakeret := &Node{Op: OINDREGSP}
- s.assign(n.List.First(), v1, needwritebarrier(n.List.First(), fakeret), false, n.Lineno, 0, false)
- s.assign(n.List.Second(), v2, needwritebarrier(n.List.Second(), fakeret), false, n.Lineno, 0, false)
+ s.assign(n.List.First(), v1, needwritebarrier(n.List.First(), fakeret), false, n.Pos, 0, false)
+ s.assign(n.List.Second(), v2, needwritebarrier(n.List.Second(), fakeret), false, n.Pos, 0, false)
return
case ODCL:
if !lab.defined() {
lab.defNode = n
} else {
- s.Error("label %v already defined at %v", sym, linestr(lab.defNode.Lineno))
+ s.Error("label %v already defined at %v", sym, linestr(lab.defNode.Pos))
lab.reported = true
}
// The label might already have a target block via a goto.
if samesafeexpr(n.Left, rhs.List.First()) {
if !s.canSSA(n.Left) {
if Debug_append > 0 {
- Warnl(n.Lineno, "append: len-only update")
+ Warnl(n.Pos, "append: len-only update")
}
s.append(rhs, true)
return
} else {
if Debug_append > 0 { // replicating old diagnostic message
- Warnl(n.Lineno, "append: len-only update (in local slice)")
+ Warnl(n.Pos, "append: len-only update (in local slice)")
}
}
}
}
}
- s.assign(n.Left, r, needwb, deref, n.Lineno, skip, isVolatile)
+ s.assign(n.Left, r, needwb, deref, n.Pos, skip, isVolatile)
case OIF:
bThen := s.f.NewBlock(ssa.BlockPlain)
if !(n.Op == ONAME || n.Op == OLITERAL && n.Sym != nil) {
// ONAMEs and named OLITERALs have the line number
// of the decl, not the use. See issue 14742.
- s.pushLine(n.Lineno)
+ s.pushLine(n.Pos)
defer s.popLine()
}
return s.newValue2(ssa.OpLoad, n.Type, addr, s.mem())
case OIND:
- p := s.exprPtr(n.Left, false, n.Lineno)
+ p := s.exprPtr(n.Left, false, n.Pos)
return s.newValue2(ssa.OpLoad, n.Type, p, s.mem())
case ODOT:
return s.newValue2(ssa.OpLoad, n.Type, p, s.mem())
case ODOTPTR:
- p := s.exprPtr(n.Left, false, n.Lineno)
+ p := s.exprPtr(n.Left, false, n.Pos)
p = s.newValue1I(ssa.OpOffPtr, p.Type, n.Xoffset, p)
return s.newValue2(ssa.OpLoad, n.Type, p, s.mem())
if ssa.IsStackAddr(addr) {
s.vars[&memVar] = s.newValue3I(ssa.OpStore, ssa.TypeMem, pt.Size(), addr, r[0], s.mem())
} else {
- s.insertWBstore(pt, addr, r[0], n.Lineno, 0)
+ s.insertWBstore(pt, addr, r[0], n.Pos, 0)
}
// load the value we just stored to avoid having to spill it
s.vars[&ptrVar] = s.newValue2(ssa.OpLoad, pt, addr, s.mem())
addr := s.newValue2(ssa.OpPtrIndex, pt, p2, s.constInt(Types[TINT], int64(i)))
if arg.store {
if haspointers(et) {
- s.insertWBstore(et, addr, arg.v, n.Lineno, 0)
+ s.insertWBstore(et, addr, arg.v, n.Pos, 0)
} else {
s.vars[&memVar] = s.newValue3I(ssa.OpStore, ssa.TypeMem, et.Size(), addr, arg.v, s.mem())
}
} else {
if haspointers(et) {
- s.insertWBmove(et, addr, arg.v, n.Lineno, arg.isVolatile)
+ s.insertWBmove(et, addr, arg.v, n.Pos, arg.isVolatile)
} else {
s.vars[&memVar] = s.newValue3I(ssa.OpMove, ssa.TypeMem, sizeAlignAuxInt(et), addr, arg.v, s.mem())
}
// If deref is true, rightIsVolatile reports whether right points to volatile (clobbered by a call) storage.
// Include a write barrier if wb is true.
// skip indicates assignments (at the top level) that can be avoided.
- func (s *state) assign(left *Node, right *ssa.Value, wb, deref bool, line int32, skip skipMask, rightIsVolatile bool) {
+ func (s *state) assign(left *Node, right *ssa.Value, wb, deref bool, line src.XPos, skip skipMask, rightIsVolatile bool) {
if left.Op == ONAME && isblank(left) {
return
}
if x.Op == ssa.OpSelect0 || x.Op == ssa.OpSelect1 {
x = x.Args[0]
}
- Warnl(n.Lineno, "intrinsic substitution for %v with %s", n.Left.Sym.Name, x.LongString())
+ Warnl(n.Pos, "intrinsic substitution for %v with %s", n.Left.Sym.Name, x.LongString())
}
return v
}
// We can then pass that to defer or go.
n2 := newname(fn.Sym)
n2.Class = PFUNC
- n2.Lineno = fn.Lineno
+ n2.Pos = fn.Pos
n2.Type = Types[TUINT8] // dummy type for a static closure. Could use runtime.funcval if we had it.
closure = s.expr(n2)
// Note: receiver is already assigned in n.List, so we don't
return s.newValue2(ssa.OpPtrIndex, ptrto(n.Left.Type.Elem()), a, i), isVolatile
}
case OIND:
- return s.exprPtr(n.Left, bounded, n.Lineno), false
+ return s.exprPtr(n.Left, bounded, n.Pos), false
case ODOT:
p, isVolatile := s.addr(n.Left, bounded)
return s.newValue1I(ssa.OpOffPtr, t, n.Xoffset, p), isVolatile
case ODOTPTR:
- p := s.exprPtr(n.Left, bounded, n.Lineno)
+ p := s.exprPtr(n.Left, bounded, n.Pos)
return s.newValue1I(ssa.OpOffPtr, t, n.Xoffset, p), false
case OCLOSUREVAR:
return s.newValue1I(ssa.OpOffPtr, t, n.Xoffset,
}
// exprPtr evaluates n to a pointer and nil-checks it.
- func (s *state) exprPtr(n *Node, bounded bool, lineno int32) *ssa.Value {
+ func (s *state) exprPtr(n *Node, bounded bool, lineno src.XPos) *ssa.Value {
p := s.expr(n)
if bounded || n.NonNil {
- if s.f.Config.Debug_checknil() && lineno > 1 {
+ if s.f.Config.Debug_checknil() && lineno.Line() > 1 {
s.f.Config.Warnl(lineno, "removed nil check")
}
return p
b.SetControl(cmp)
b.Likely = ssa.BranchLikely
bNext := s.f.NewBlock(ssa.BlockPlain)
- line := s.peekLine()
+ line := s.peekPos()
bPanic := s.panics[funcLine{fn, line}]
if bPanic == nil {
bPanic = s.f.NewBlock(ssa.BlockPlain)
// insertWBmove inserts the assignment *left = *right including a write barrier.
// t is the type being assigned.
// If right == nil, then we're zeroing *left.
- func (s *state) insertWBmove(t *Type, left, right *ssa.Value, line int32, rightIsVolatile bool) {
+ func (s *state) insertWBmove(t *Type, left, right *ssa.Value, line src.XPos, rightIsVolatile bool) {
// if writeBarrier.enabled {
// typedmemmove(&t, left, right)
// } else {
if s.noWB {
s.Error("write barrier prohibited")
}
- if s.WBLineno == 0 {
- s.WBLineno = left.Line
+ if !s.WBPos.IsKnown() {
+ s.WBPos = left.Pos
}
var val *ssa.Value
// insertWBstore inserts the assignment *left = right including a write barrier.
// t is the type being assigned.
- func (s *state) insertWBstore(t *Type, left, right *ssa.Value, line int32, skip skipMask) {
+ func (s *state) insertWBstore(t *Type, left, right *ssa.Value, line src.XPos, skip skipMask) {
// store scalar fields
// if writeBarrier.enabled {
// writebarrierptr for pointer fields
if s.noWB {
s.Error("write barrier prohibited")
}
- if s.WBLineno == 0 {
- s.WBLineno = left.Line
+ if !s.WBPos.IsKnown() {
+ s.WBPos = left.Pos
}
s.storeTypeScalars(t, left, right, skip)
s.storeTypePtrsWB(t, left, right)
// Converting to an empty interface.
// Input could be an empty or nonempty interface.
if Debug_typeassert > 0 {
- Warnl(n.Lineno, "type assertion inlined")
+ Warnl(n.Pos, "type assertion inlined")
}
// Get itab/type field from input.
}
// converting to a nonempty interface needs a runtime call.
if Debug_typeassert > 0 {
- Warnl(n.Lineno, "type assertion not inlined")
+ Warnl(n.Pos, "type assertion not inlined")
}
if n.Left.Type.IsEmptyInterface() {
if commaok {
}
if Debug_typeassert > 0 {
- Warnl(n.Lineno, "type assertion inlined")
+ Warnl(n.Pos, "type assertion inlined")
}
// Converting to a concrete type.
typ := s.ifaceType(n.Left.Type, iface) // actual concrete type of input interface
if Debug_typeassert > 0 {
- Warnl(n.Lineno, "type assertion inlined")
+ Warnl(n.Pos, "type assertion inlined")
}
var tmp *Node // temporary for use with large types
fs = fs.Link
}
- lno := from.Left.Lineno
+ lno := from.Left.Pos
if block != nil {
yyerrorl(lno, "goto %v jumps into block starting at %v", from.Left.Sym, linestr(block.Lastlineno))
} else {
return pc
}
- // SetLineno sets the current source line number.
- func (s *SSAGenState) SetLineno(l int32) {
- lineno = l
+ // SetPos sets the current source position.
+ func (s *SSAGenState) SetPos(pos src.XPos) {
+ lineno = pos
}
// genssa appends entries to ptxt for each instruction in f.
f.Logf("%s\t%s\n", s, p)
}
if f.Config.HTML != nil {
- saved := ptxt.Ctxt.LineHist.PrintFilenameOnly
- ptxt.Ctxt.LineHist.PrintFilenameOnly = true
+ // LineHist is defunct now - this code won't do
+ // anything.
+ // TODO: fix this (ideally without a global variable)
+ // saved := ptxt.Ctxt.LineHist.PrintFilenameOnly
+ // ptxt.Ctxt.LineHist.PrintFilenameOnly = true
var buf bytes.Buffer
buf.WriteString("<code>")
buf.WriteString("<dl class=\"ssa-gen\">")
buf.WriteString("</dl>")
buf.WriteString("</code>")
f.Config.HTML.WriteColumn("genssa", buf.String())
- ptxt.Ctxt.LineHist.PrintFilenameOnly = saved
+ // ptxt.Ctxt.LineHist.PrintFilenameOnly = saved
}
}
return canSSAType(t.(*Type))
}
- func (e *ssaExport) Line(line int32) string {
- return linestr(line)
+ func (e *ssaExport) Line(pos src.XPos) string {
+ return linestr(pos)
}
// Log logs a message from the compiler.
}
// Fatal reports a compiler error and exits.
- func (e *ssaExport) Fatalf(line int32, msg string, args ...interface{}) {
- lineno = line
+ func (e *ssaExport) Fatalf(pos src.XPos, msg string, args ...interface{}) {
+ lineno = pos
Fatalf(msg, args...)
}
// Warnl reports a "warning", which is usually flag-triggered
// logging output for the benefit of tests.
- func (e *ssaExport) Warnl(line int32, fmt_ string, args ...interface{}) {
- Warnl(line, fmt_, args...)
+ func (e *ssaExport) Warnl(pos src.XPos, fmt_ string, args ...interface{}) {
+ Warnl(pos, fmt_, args...)
}
func (e *ssaExport) Debug_checknil() bool {
import (
"bytes"
"cmd/internal/obj"
+ "cmd/internal/src"
"crypto/md5"
"encoding/binary"
"fmt"
)
type Error struct {
- lineno int32
- msg string
+ pos src.XPos
+ msg string
}
var errors []Error
return
}
old := fmt.Sprintf("%v: undefined: %v\n", n.Line(), n.Left)
- if len(errors) > 0 && errors[len(errors)-1].lineno == n.Lineno && errors[len(errors)-1].msg == old {
+ if len(errors) > 0 && errors[len(errors)-1].pos.Line() == n.Pos.Line() && errors[len(errors)-1].msg == old {
errors[len(errors)-1].msg = fmt.Sprintf("%v: undefined: %v in %v\n", n.Line(), n.Left, n)
}
}
- func adderr(line int32, format string, args ...interface{}) {
+ func adderr(pos src.XPos, format string, args ...interface{}) {
errors = append(errors, Error{
- lineno: line,
- msg: fmt.Sprintf("%v: %s\n", linestr(line), fmt.Sprintf(format, args...)),
+ pos: pos,
+ msg: fmt.Sprintf("%v: %s\n", linestr(pos), fmt.Sprintf(format, args...)),
})
}
- // byLineno sorts errors by lineno.
- type byLineno []Error
+ // byPos sorts errors by source position.
+ type byPos []Error
- func (x byLineno) Len() int { return len(x) }
- func (x byLineno) Less(i, j int) bool { return x[i].lineno < x[j].lineno }
- func (x byLineno) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+ func (x byPos) Len() int { return len(x) }
+ func (x byPos) Less(i, j int) bool { return x[i].pos.Before(x[j].pos) }
+ func (x byPos) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
// flusherrors sorts errors seen so far by line number, prints them to stdout,
// and empties the errors array.
if len(errors) == 0 {
return
}
- sort.Stable(byLineno(errors))
+ sort.Stable(byPos(errors))
for i := 0; i < len(errors); i++ {
if i == 0 || errors[i].msg != errors[i-1].msg {
fmt.Printf("%s", errors[i].msg)
}
}
- func linestr(line int32) string {
- return Ctxt.Line(int(line))
+ func linestr(pos src.XPos) string {
+ return Ctxt.PosTable.Pos(pos).String()
}
// lasterror keeps track of the most recently issued error.
// It is used to avoid multiple error messages on the same
// line.
var lasterror struct {
- syntax int32 // line of last syntax error
- other int32 // line of last non-syntax error
- msg string // error message of last non-syntax error
+ syntax src.XPos // source position of last syntax error
+ other src.XPos // source position of last non-syntax error
+ msg string // error message of last non-syntax error
}
- func yyerrorl(line int32, format string, args ...interface{}) {
+ // sameline reports whether two positions a, b are on the same line.
+ func sameline(a, b src.XPos) bool {
+ p := Ctxt.PosTable.Pos(a)
+ q := Ctxt.PosTable.Pos(b)
+ return p.Base() == q.Base() && p.Line() == q.Line()
+ }
+
+ func yyerrorl(pos src.XPos, format string, args ...interface{}) {
msg := fmt.Sprintf(format, args...)
if strings.HasPrefix(msg, "syntax error") {
nsyntaxerrors++
// only one syntax error per line, no matter what error
- if lasterror.syntax == line {
+ if sameline(lasterror.syntax, pos) {
return
}
- lasterror.syntax = line
+ lasterror.syntax = pos
} else {
// only one of multiple equal non-syntax errors per line
// (flusherrors shows only one of them, so we filter them
// here as best as we can (they may not appear in order)
// so that we don't count them here and exit early, and
// then have nothing to show for.)
- if lasterror.other == line && lasterror.msg == msg {
+ if sameline(lasterror.other, pos) && lasterror.msg == msg {
return
}
- lasterror.other = line
+ lasterror.other = pos
lasterror.msg = msg
}
- adderr(line, "%s", msg)
+ adderr(pos, "%s", msg)
hcrash()
nerrors++
if nsavederrors+nerrors >= 10 && Debug['e'] == 0 {
flusherrors()
- fmt.Printf("%v: too many errors\n", linestr(line))
+ fmt.Printf("%v: too many errors\n", linestr(pos))
errorexit()
}
}
hcrash()
}
- func Warnl(line int32, fmt_ string, args ...interface{}) {
+ func Warnl(line src.XPos, fmt_ string, args ...interface{}) {
adderr(line, fmt_, args...)
if Debug['m'] != 0 {
flusherrors()
errorexit()
}
- func linehistpragma(file string) {
- if Debug['i'] != 0 {
- fmt.Printf("pragma %s at line %v\n", file, linestr(lexlineno))
- }
- Ctxt.AddImport(file)
- }
-
- func linehistpush(file string) {
- if Debug['i'] != 0 {
- fmt.Printf("import %s at line %v\n", file, linestr(lexlineno))
- }
- Ctxt.LineHist.Push(int(lexlineno), file)
- }
-
- func linehistpop() {
- if Debug['i'] != 0 {
- fmt.Printf("end of import at line %v\n", linestr(lexlineno))
- }
- Ctxt.LineHist.Pop(int(lexlineno))
- }
-
- func linehistupdate(file string, off int) {
- if Debug['i'] != 0 {
- fmt.Printf("line %s at line %v\n", file, linestr(lexlineno))
- }
- Ctxt.LineHist.Update(int(lexlineno), file, off)
- }
-
- func setlineno(n *Node) int32 {
+ func setlineno(n *Node) src.XPos {
lno := lineno
if n != nil {
switch n.Op {
fallthrough
default:
- lineno = n.Lineno
- if lineno == 0 {
+ lineno = n.Pos
+ if !lineno.IsKnown() {
if Debug['K'] != 0 {
- Warn("setlineno: line 0")
+ Warn("setlineno: unknown position (line 0)")
}
lineno = lno
}
if n == 0 {
// can't possibly be used - there were no symbols
- yyerrorl(pack.Lineno, "imported and not used: %q", opkg.Path)
+ yyerrorl(pack.Pos, "imported and not used: %q", opkg.Path)
}
}
n.Op = op
n.Left = nleft
n.Right = nright
- n.Lineno = lineno
+ n.Pos = lineno
n.Xoffset = BADWIDTH
n.Orig = n
switch op {
// treecopy recursively copies n, with the exception of
// ONAME, OLITERAL, OTYPE, and non-iota ONONAME leaves.
// Copies of iota ONONAME nodes are assigned the current
- // value of iota_. If lineno != 0, it sets the line number
- // of newly allocated nodes to lineno.
- func treecopy(n *Node, lineno int32) *Node {
+ // value of iota_. If pos.IsKnown(), it sets the source
+ // position of newly allocated nodes to pos.
+ func treecopy(n *Node, pos src.XPos) *Node {
if n == nil {
return nil
}
default:
m := *n
m.Orig = &m
- m.Left = treecopy(n.Left, lineno)
- m.Right = treecopy(n.Right, lineno)
- m.List.Set(listtreecopy(n.List.Slice(), lineno))
- if lineno != 0 {
- m.Lineno = lineno
+ m.Left = treecopy(n.Left, pos)
+ m.Right = treecopy(n.Right, pos)
+ m.List.Set(listtreecopy(n.List.Slice(), pos))
+ if pos.IsKnown() {
+ m.Pos = pos
}
if m.Name != nil && n.Op != ODCLFIELD {
Dump("treecopy", n)
// so that all the copies of this const definition
// don't have the same iota value.
m := *n
- if lineno != 0 {
- m.Lineno = lineno
+ if pos.IsKnown() {
+ m.Pos = pos
}
m.SetIota(iota_)
return &m
// method - M func (t T)(), a TFIELD type struct
// newnam - the eventual mangled name of this function
- var genwrapper_linehistdone int = 0
-
func genwrapper(rcvr *Type, method *Field, newnam *Sym, iface int) {
if false && Debug['r'] != 0 {
fmt.Printf("genwrapper rcvrtype=%v method=%v newnam=%v\n", rcvr, method, newnam)
}
- lexlineno++
- lineno = lexlineno
- if genwrapper_linehistdone == 0 {
- // All the wrappers can share the same linehist entry.
- linehistpush("<autogenerated>")
-
- genwrapper_linehistdone = 1
- }
+ lineno = MakePos(src.NewFileBase("<autogenerated>", "<autogenerated>"), 1, 0)
dclcontext = PEXTERN
markdcl()
funcbody(fn)
Curfn = fn
popdcl()
- testdclstack()
+ if debug_dclstack != 0 {
+ testdclstack()
+ }
// wrappers where T is anonymous (struct or interface) can be duplicated.
if rcvr.IsStruct() || rcvr.IsInterface() || rcvr.IsPtr() && rcvr.Elem().IsStruct() {
return et
}
- func listtreecopy(l []*Node, lineno int32) []*Node {
+ func listtreecopy(l []*Node, pos src.XPos) []*Node {
var out []*Node
for _, n := range l {
- out = append(out, treecopy(n, lineno))
+ out = append(out, treecopy(n, pos))
}
return out
}
n := nod(OBLOCK, nil, nil)
n.List.Set(l)
if len(l) != 0 {
- n.Lineno = l[0].Lineno
+ n.Pos = l[0].Pos
}
return n
}
package gc
+ import (
+ "cmd/compile/internal/syntax"
+ "cmd/internal/src"
+ )
+
// A Node is a single node in the syntax tree.
// Actually the syntax tree is a syntax DAG, because there is only one
// node with Op=ONAME for a given instance of a variable x.
// func
Func *Func
- // ONAME
+ // ONAME, OTYPE, OPACK, OLABEL, some OLITERAL
Name *Name
Sym *Sym // various
// Possibly still more uses. If you find any, document them.
Xoffset int64
- Lineno int32
+ Pos src.XPos
Esc uint16 // EscXXX
Noescape bool // func arguments do not escape; TODO(rsc): move Noescape to Func struct (see CL 7360)
Walkdef uint8 // tracks state during typecheckdef; 2 == loop detected
Typecheck uint8 // tracks state during typechecking; 2 == loop detected
- Local bool
- IsStatic bool // whether this Node will be converted to purely static data
+ Local bool // type created in this file (see also Type.Local); TODO(gri): move this into flags
+ IsStatic bool // whether this Node will be converted to purely static data
Initorder uint8
Used bool // for variable/label declared and not used error
Isddd bool // is the argument variadic
n.Xoffset = x
}
-// Name holds Node fields used only by named nodes (ONAME, OPACK, OLABEL, some OLITERAL).
+// Name holds Node fields used only by named nodes (ONAME, OTYPE, OPACK, OLABEL, some OLITERAL).
type Name struct {
Pack *Node // real package for import . names
Pkg *Pkg // pkg for OPACK nodes
Heapaddr *Node // temp holding heap address of param (could move to Param?)
Defn *Node // initializing assignment
Curfn *Node // function for local variables
- Param *Param // additional fields for ONAME
+ Param *Param // additional fields for ONAME, OTYPE
Decldepth int32 // declaration loop depth, increased for every loop or label
Vargen int32 // unique name for ONAME within a function. Function outputs are numbered starting at one.
Funcdepth int32
Innermost *Node
Outer *Node
- // OTYPE pragmas
+ // OTYPE
//
// TODO: Should Func pragmas also be stored on the Name?
- Pragma Pragma
+ Pragma syntax.Pragma
+ Alias bool // node is alias for Ntype (only used when type-checking ODCLTYPE)
}
// Func holds Node fields used only with function-like nodes.
type Func struct {
- Shortname *Node
+ Shortname *Sym
Enter Nodes // for example, allocate and initialize memory for escaping parameters
Exit Nodes
Cvars Nodes // closure params
Label int32 // largest auto-generated label in this function
- Endlineno int32
- WBLineno int32 // line number of first write barrier
+ Endlineno src.XPos
+ WBPos src.XPos // position of first write barrier
- Pragma Pragma // go:xxx function annotations
- Dupok bool // duplicate definitions ok
- Wrapper bool // is method wrapper
- Needctxt bool // function uses context register (has closure variables)
- ReflectMethod bool // function calls reflect.Type.Method or MethodByName
+ Pragma syntax.Pragma // go:xxx function annotations
+ Dupok bool // duplicate definitions ok
+ Wrapper bool // is method wrapper
+ Needctxt bool // function uses context register (has closure variables)
+ ReflectMethod bool // function calls reflect.Type.Method or MethodByName
IsHiddenClosure bool
NoFramePointer bool // Must not use a frame pointer for this function
}
ODCLFUNC // func f() or func (r) f()
ODCLFIELD // struct field, interface field, or func/method argument/return value.
ODCLCONST // const pi = 3.14
- ODCLTYPE // type Int int
+ ODCLTYPE // type Int int or type Int = int
ODELETE // delete(Left, Right)
ODOT // Left.Sym (Left is of struct type)
import (
"cmd/compile/internal/ssa"
+ "cmd/internal/src"
"fmt"
)
sliceOf *Type
ptrTo *Type
- Sym *Sym // symbol containing name, for named types
- Vargen int32 // unique name for OTYPE/ONAME
- Lineno int32 // line at which this type was declared, implicitly or explicitly
+ Sym *Sym // symbol containing name, for named types
+ Vargen int32 // unique name for OTYPE/ONAME
+ Pos src.XPos // position at which this type was declared, implicitly or explicitly
Etype EType // kind of type
Noalg bool // suppress hash and eq algorithm generation
// ForwardType contains Type fields specific to forward types.
type ForwardType struct {
- Copyto []*Node // where to copy the eventual value to
- Embedlineno int32 // first use of this type as an embedded type
+ Copyto []*Node // where to copy the eventual value to
+ Embedlineno src.XPos // first use of this type as an embedded type
}
// ForwardType returns t's extra forward-type-specific fields.
return t.Extra.(*FuncType)
}
-// InterMethType contains Type fields specific to interface method psuedo-types.
+// InterMethType contains Type fields specific to interface method pseudo-types.
type InterMethType struct {
Nname *Node
}
// typ returns a new Type of the specified kind.
func typ(et EType) *Type {
t := &Type{
- Etype: et,
- Width: BADWIDTH,
- Lineno: lineno,
+ Etype: et,
+ Width: BADWIDTH,
+ Pos: lineno,
}
t.Orig = t
// TODO(josharian): lazily initialize some of these?
import (
"cmd/internal/obj"
+ "cmd/internal/src"
"fmt"
"math"
"strings"
return fmt.Sprintf("etype=%d", et)
}
-// sprint_depchain prints a dependency chain of nodes into fmt.
+// sprint_depchain prints a dependency chain of nodes into trace.
// It is used by typecheck in the case of OLITERAL nodes
// to print constant definition loops.
-func sprint_depchain(fmt_ *string, stack []*Node, cur *Node, first *Node) {
+func sprint_depchain(trace *string, stack []*Node, cur *Node, first *Node) {
for i := len(stack) - 1; i >= 0; i-- {
if n := stack[i]; n.Op == cur.Op {
if n != first {
- sprint_depchain(fmt_, stack[:i], n, first)
+ sprint_depchain(trace, stack[:i], n, first)
}
- *fmt_ += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur)
+ *trace += fmt.Sprintf("\n\t%v: %v uses %v", n.Line(), n, cur)
return
}
}
if n.Typecheck == 2 {
// Typechecking loop. Trying printing a meaningful message,
// otherwise a stack trace of typechecking.
- var fmt_ string
switch n.Op {
// We can already diagnose variables used as types.
case ONAME:
yyerror("%v is not a type", n)
}
- yyerrorl(n.Lineno, "invalid recursive type alias %v%s", n, trace)
+ case OTYPE:
+ if top&Etype == Etype {
+ var trace string
+ sprint_depchain(&trace, typecheck_tcstack, n, n)
++ yyerrorl(n.Pos, "invalid recursive type alias %v%s", n, trace)
+ }
+
case OLITERAL:
if top&(Erv|Etype) == Etype {
yyerror("%v is not a type", n)
break
}
- sprint_depchain(&fmt_, typecheck_tcstack, n, n)
- yyerrorl(n.Pos, "constant definition loop%s", fmt_)
+ var trace string
+ sprint_depchain(&trace, typecheck_tcstack, n, n)
- yyerrorl(n.Lineno, "constant definition loop%s", trace)
++ yyerrorl(n.Pos, "constant definition loop%s", trace)
}
if nsavederrors+nerrors == 0 {
- fmt_ = ""
+ var trace string
for i := len(typecheck_tcstack) - 1; i >= 0; i-- {
x := typecheck_tcstack[i]
- fmt_ += fmt.Sprintf("\n\t%v %v", x.Line(), x)
+ trace += fmt.Sprintf("\n\t%v %v", x.Line(), x)
}
- yyerror("typechecking loop involving %v%s", n, fmt_)
+ yyerror("typechecking loop involving %v%s", n, trace)
}
lineno = lno
if alg == ANOEQ {
if bad.Etype == TFORW {
// queue check for map until all the types are done settling.
- mapqueue = append(mapqueue, mapqueueval{l, n.Lineno})
+ mapqueue = append(mapqueue, mapqueueval{l, n.Pos})
} else if bad.Etype != TANY {
// no need to queue, key is already bad
yyerror("invalid map key type %v", l.Type)
}
if n.Type.Etype != TFUNC || !n.IsMethod() {
- yyerror("type %v has no method %S", n.Left.Type, n.Right.Sym)
+ yyerror("type %v has no method %S", n.Left.Type, n.Sym)
n.Type = nil
return n
}
t.SetNname(n.Func.Nname)
rcvr := t.Recv()
if rcvr != nil && n.Func.Shortname != nil {
- addmethod(n.Func.Shortname.Sym, t, true, n.Func.Pragma&Nointerface != 0)
+ n.Func.Nname.Sym = methodname(n.Func.Shortname, rcvr.Type)
+ declare(n.Func.Nname, PFUNC)
+
+ addmethod(n.Func.Shortname, t, true, n.Func.Pragma&Nointerface != 0)
+ }
+
+ if Ctxt.Flag_dynlink && importpkg == nil && n.Func.Nname != nil {
+ makefuncsym(n.Func.Nname.Sym)
}
}
type mapqueueval struct {
n *Node
- lno int32
+ lno src.XPos
}
// tracks the line numbers at which forward types are first used as map keys
// Double-check use of type as embedded type.
lno := lineno
- if embedlineno != 0 {
+ if embedlineno.IsKnown() {
lineno = embedlineno
if t.IsPtr() || t.IsUnsafePtr() {
yyerror("embedded type cannot be a pointer")
// copy new type and clear fields
// that don't come along.
- // anything zeroed here must be zeroed in
- // typedcl2 too.
copytype(n, t)
ret:
if n.Op == ONONAME {
if !n.Diag {
n.Diag = true
- if n.Lineno != 0 {
- lineno = n.Lineno
+ if n.Pos.IsKnown() {
+ lineno = n.Pos
}
// Note: adderrorname looks for this string and
e := n.Name.Defn
n.Name.Defn = nil
if e == nil {
- lineno = n.Lineno
+ lineno = n.Pos
Dump("typecheckdef nil defn", n)
yyerror("xxx")
}
n.Name.Defn = typecheck(n.Name.Defn, Etop) // fills in n->type
case OTYPE:
+ if p := n.Name.Param; p.Alias {
+ // Type alias declaration: Simply use the rhs type - no need
+ // to create a new type.
+ // If we have a syntax error, p.Ntype may be nil.
+ if p.Ntype != nil {
+ p.Ntype = typecheck(p.Ntype, Etype)
+ n.Type = p.Ntype.Type
+ if n.Type == nil {
+ n.Diag = true
+ goto ret
+ }
+ n.Sym.Def = p.Ntype
+ }
+ break
+ }
+
+ // regular type declaration
if Curfn != nil {
defercheckwidth()
}
n.Walkdef = 1
n.Type = typ(TFORW)
- n.Type.Sym = n.Sym
+ n.Type.Sym = n.Sym // TODO(gri) this also happens in typecheckdeftype(n) - where should it happen?
nerrors0 := nerrors
typecheckdeftype(n)
if n.Type.Etype == TFORW && nerrors > nerrors0 {
// but it was reported. Silence future errors.
n.Type.Broke = true
}
-
if Curfn != nil {
resumecheckwidth()
}
)
func (n *Node) Line() string {
- return Ctxt.LineHist.LineString(int(n.Lineno))
+ return linestr(n.Pos)
}
var atExitFuncs []func()
Fatalf("%v", err)
}
atExit(func() {
- runtime.GC() // profile all outstanding allocations
- if err := pprof.WriteHeapProfile(f); err != nil {
+ // Profile all outstanding allocations.
+ runtime.GC()
+ // compilebench parses the memory profile to extract memstats,
+ // which are only written in the legacy pprof format.
+ // See golang.org/issue/18641 and runtime/pprof/pprof.go:writeHeap.
+ const writeLegacyFormat = 1
+ if err := pprof.Lookup("heap").WriteTo(f, writeLegacyFormat); err != nil {
Fatalf("%v", err)
}
})
if defn.Left.Used {
continue
}
- lineno = defn.Left.Lineno
+ lineno = defn.Left.Pos
yyerror("%v declared and not used", ln.Sym)
defn.Left.Used = true // suppress repeats
} else {
- lineno = ln.Lineno
+ lineno = ln.Pos
yyerror("%v declared and not used", ln.Sym)
}
}
break
}
+ if !instrumenting && iszero(n.Right) && !needwritebarrier(n.Left, n.Right) {
+ break
+ }
+
switch n.Right.Op {
default:
n.Right = walkexpr(n.Right, init)
func applywritebarrier(n *Node) *Node {
if n.Left != nil && n.Right != nil && needwritebarrier(n.Left, n.Right) {
if Debug_wb > 1 {
- Warnl(n.Lineno, "marking %v for barrier", n.Left)
+ Warnl(n.Pos, "marking %v for barrier", n.Left)
}
n.Op = OASWB
return n
// Enter and Exit lists.
func heapmoves() {
lno := lineno
- lineno = Curfn.Lineno
+ lineno = Curfn.Pos
nn := paramstoheap(Curfn.Type.Recvs())
nn = append(nn, paramstoheap(Curfn.Type.Params())...)
nn = append(nn, paramstoheap(Curfn.Type.Results())...)
cmpr = cmpr.Left
}
- if !islvalue(cmpl) || !islvalue(cmpr) {
- Fatalf("arguments of comparison must be lvalues - %v %v", cmpl, cmpr)
- }
-
// Chose not to inline. Call equality function directly.
if !inline {
+ if !islvalue(cmpl) || !islvalue(cmpr) {
+ Fatalf("arguments of comparison must be lvalues - %v %v", cmpl, cmpr)
+ }
+
// eq algs take pointers
pl := temp(ptrto(t))
al := nod(OAS, pl, nod(OADDR, cmpl, nil))
opr = brcom(opr)
}
cmp := nod(opr, lhs, rhs)
- cmp.Lineno = n.Lineno
+ cmp.Pos = n.Pos
cmp = addinit(cmp, l.Ninit.Slice())
cmp = addinit(cmp, r.Ninit.Slice())
// Typecheck the AST rooted at cmp...
// checkbce prints all bounds checks that are present in the function.
// Useful to find regressions. checkbce is only activated when with
-// corresponsing debug options, so it's off by default.
+// corresponding debug options, so it's off by default.
// See test/checkbce.go
func checkbce(f *Func) {
if f.pass.debug <= 0 {
for _, b := range f.Blocks {
for _, v := range b.Values {
if v.Op == OpIsInBounds || v.Op == OpIsSliceInBounds {
- f.Config.Warnl(v.Line, "Found %v", v.Op)
+ f.Config.Warnl(v.Pos, "Found %v", v.Op)
}
}
}
package ssa
import (
+ "cmd/internal/obj"
+ "cmd/internal/src"
"fmt"
"log"
"os"
fi, err := os.Create(fname)
if err != nil {
- f.Config.Warnl(0, "Unable to create after-phase dump file %s", fname)
+ f.Config.Warnl(src.NoXPos, "Unable to create after-phase dump file %s", fname)
return
}
{name: "writebarrier", fn: writebarrier, required: true}, // expand write barrier ops
{name: "fuse", fn: fuse},
{name: "dse", fn: dse},
+ {name: "insert resched checks", fn: insertLoopReschedChecks,
+ disabled: obj.Preemptibleloops_enabled == 0}, // insert resched checks in loops.
{name: "tighten", fn: tighten}, // move values closer to their uses
{name: "lower", fn: lower, required: true},
{name: "lowered cse", fn: cse},
}
var passOrder = [...]constraint{
- // prove reliese on common-subexpression elimination for maximum benefits.
+ // "insert resched checks" uses mem, better to clean out stores first.
+ {"dse", "insert resched checks"},
+ // insert resched checks adds new blocks containing generic instructions
+ {"insert resched checks", "lower"},
+ {"insert resched checks", "tighten"},
+
+ // prove relies on common-subexpression elimination for maximum benefits.
{"generic cse", "prove"},
// deadcode after prove to eliminate all new dead blocks.
{"prove", "generic deadcode"},
import (
"cmd/internal/obj"
+ "cmd/internal/src"
"crypto/sha1"
"fmt"
"os"
Log() bool
// Fatal reports a compiler error and exits.
- Fatalf(line int32, msg string, args ...interface{})
+ Fatalf(pos src.XPos, msg string, args ...interface{})
// Warnl writes compiler messages in the form expected by "errorcheck" tests
- Warnl(line int32, fmt_ string, args ...interface{})
+ Warnl(pos src.XPos, fmt_ string, args ...interface{})
- // Fowards the Debug flags from gc
+ // Forwards the Debug flags from gc
Debug_checknil() bool
Debug_wb() bool
}
SplitArray(LocalSlot) LocalSlot // array must be length 1
SplitInt64(LocalSlot) (LocalSlot, LocalSlot) // returns (hi, lo)
- // Line returns a string describing the given line number.
- Line(int32) string
+ // Line returns a string describing the given position.
+ Line(src.XPos) string
// AllocFrame assigns frame offsets to all live auto variables.
AllocFrame(f *Func)
c.hasGReg = true
c.noDuffDevice = true
default:
- fe.Fatalf(0, "arch %s not implemented", arch)
+ fe.Fatalf(src.NoXPos, "arch %s not implemented", arch)
}
c.ctxt = ctxt
c.optimize = optimize
if ev != "" {
v, err := strconv.ParseInt(ev, 10, 64)
if err != nil {
- fe.Fatalf(0, "Environment variable GO_SSA_PHI_LOC_CUTOFF (value '%s') did not parse as a number", ev)
+ fe.Fatalf(src.NoXPos, "Environment variable GO_SSA_PHI_LOC_CUTOFF (value '%s') did not parse as a number", ev)
}
c.sparsePhiCutoff = uint64(v) // convert -1 to maxint, for never use sparse
}
func (c *Config) NewFunc() *Func {
// TODO(khr): should this function take name, type, etc. as arguments?
if c.curFunc != nil {
- c.Fatalf(0, "NewFunc called without previous Free")
+ c.Fatalf(src.NoXPos, "NewFunc called without previous Free")
}
f := &Func{Config: c, NamedValues: map[LocalSlot][]*Value{}}
c.curFunc = f
return f
}
- func (c *Config) Logf(msg string, args ...interface{}) { c.fe.Logf(msg, args...) }
- func (c *Config) Log() bool { return c.fe.Log() }
- func (c *Config) Fatalf(line int32, msg string, args ...interface{}) { c.fe.Fatalf(line, msg, args...) }
- func (c *Config) Warnl(line int32, msg string, args ...interface{}) { c.fe.Warnl(line, msg, args...) }
- func (c *Config) Debug_checknil() bool { return c.fe.Debug_checknil() }
- func (c *Config) Debug_wb() bool { return c.fe.Debug_wb() }
+ func (c *Config) Logf(msg string, args ...interface{}) { c.fe.Logf(msg, args...) }
+ func (c *Config) Log() bool { return c.fe.Log() }
+ func (c *Config) Fatalf(pos src.XPos, msg string, args ...interface{}) { c.fe.Fatalf(pos, msg, args...) }
+ func (c *Config) Warnl(pos src.XPos, msg string, args ...interface{}) { c.fe.Warnl(pos, msg, args...) }
+ func (c *Config) Debug_checknil() bool { return c.fe.Debug_checknil() }
+ func (c *Config) Debug_wb() bool { return c.fe.Debug_wb() }
func (c *Config) logDebugHashMatch(evname, name string) {
file := c.logfiles[evname]
var ok error
file, ok = os.Create(tmpfile)
if ok != nil {
- c.Fatalf(0, "Could not open hash-testing logfile %s", tmpfile)
+ c.Fatalf(src.NoXPos, "Could not open hash-testing logfile %s", tmpfile)
}
}
c.logfiles[evname] = file
package ssa
import (
+ "cmd/internal/src"
"fmt"
"math"
"strings"
vid idAlloc // value ID allocator
scheduled bool // Values in Blocks are in final order
+ NoSplit bool // true if function is marked as nosplit. Used by schedule check pass.
// when register allocation is done, maps value ids to locations
RegAlloc []Location
}
// newValue allocates a new Value with the given fields and places it at the end of b.Values.
- func (f *Func) newValue(op Op, t Type, b *Block, line int32) *Value {
+ func (f *Func) newValue(op Op, t Type, b *Block, pos src.XPos) *Value {
var v *Value
if f.freeValues != nil {
v = f.freeValues
v.Op = op
v.Type = t
v.Block = b
- v.Line = line
+ v.Pos = pos
b.Values = append(b.Values, v)
return v
}
if f.pass != nil {
n = strings.Replace(f.pass.name, " ", "_", -1)
}
- f.Config.Warnl(f.Entry.Line, "\t%s\t%s%s\t%s", n, key, value, f.Name)
+ f.Config.Warnl(f.Entry.Pos, "\t%s\t%s%s\t%s", n, key, value, f.Name)
}
// freeValue frees a value. It must no longer be referenced.
}
// NewValue0 returns a new value in the block with no arguments and zero aux values.
- func (b *Block) NewValue0(line int32, op Op, t Type) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue0(pos src.XPos, op Op, t Type) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Args = v.argstorage[:0]
return v
}
// NewValue returns a new value in the block with no arguments and an auxint value.
- func (b *Block) NewValue0I(line int32, op Op, t Type, auxint int64) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue0I(pos src.XPos, op Op, t Type, auxint int64) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = auxint
v.Args = v.argstorage[:0]
return v
}
// NewValue returns a new value in the block with no arguments and an aux value.
- func (b *Block) NewValue0A(line int32, op Op, t Type, aux interface{}) *Value {
+ func (b *Block) NewValue0A(pos src.XPos, op Op, t Type, aux interface{}) *Value {
if _, ok := aux.(int64); ok {
// Disallow int64 aux values. They should be in the auxint field instead.
// Maybe we want to allow this at some point, but for now we disallow it
// to prevent errors like using NewValue1A instead of NewValue1I.
b.Fatalf("aux field has int64 type op=%s type=%s aux=%v", op, t, aux)
}
- v := b.Func.newValue(op, t, b, line)
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Aux = aux
v.Args = v.argstorage[:0]
}
// NewValue returns a new value in the block with no arguments and both an auxint and aux values.
- func (b *Block) NewValue0IA(line int32, op Op, t Type, auxint int64, aux interface{}) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue0IA(pos src.XPos, op Op, t Type, auxint int64, aux interface{}) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = auxint
v.Aux = aux
v.Args = v.argstorage[:0]
}
// NewValue1 returns a new value in the block with one argument and zero aux values.
- func (b *Block) NewValue1(line int32, op Op, t Type, arg *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue1(pos src.XPos, op Op, t Type, arg *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Args = v.argstorage[:1]
v.argstorage[0] = arg
}
// NewValue1I returns a new value in the block with one argument and an auxint value.
- func (b *Block) NewValue1I(line int32, op Op, t Type, auxint int64, arg *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue1I(pos src.XPos, op Op, t Type, auxint int64, arg *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = auxint
v.Args = v.argstorage[:1]
v.argstorage[0] = arg
}
// NewValue1A returns a new value in the block with one argument and an aux value.
- func (b *Block) NewValue1A(line int32, op Op, t Type, aux interface{}, arg *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue1A(pos src.XPos, op Op, t Type, aux interface{}, arg *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Aux = aux
v.Args = v.argstorage[:1]
}
// NewValue1IA returns a new value in the block with one argument and both an auxint and aux values.
- func (b *Block) NewValue1IA(line int32, op Op, t Type, auxint int64, aux interface{}, arg *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue1IA(pos src.XPos, op Op, t Type, auxint int64, aux interface{}, arg *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = auxint
v.Aux = aux
v.Args = v.argstorage[:1]
}
// NewValue2 returns a new value in the block with two arguments and zero aux values.
- func (b *Block) NewValue2(line int32, op Op, t Type, arg0, arg1 *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue2(pos src.XPos, op Op, t Type, arg0, arg1 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Args = v.argstorage[:2]
v.argstorage[0] = arg0
}
// NewValue2I returns a new value in the block with two arguments and an auxint value.
- func (b *Block) NewValue2I(line int32, op Op, t Type, auxint int64, arg0, arg1 *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue2I(pos src.XPos, op Op, t Type, auxint int64, arg0, arg1 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = auxint
v.Args = v.argstorage[:2]
v.argstorage[0] = arg0
}
// NewValue3 returns a new value in the block with three arguments and zero aux values.
- func (b *Block) NewValue3(line int32, op Op, t Type, arg0, arg1, arg2 *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue3(pos src.XPos, op Op, t Type, arg0, arg1, arg2 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Args = v.argstorage[:3]
v.argstorage[0] = arg0
}
// NewValue3I returns a new value in the block with three arguments and an auxint value.
- func (b *Block) NewValue3I(line int32, op Op, t Type, auxint int64, arg0, arg1, arg2 *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue3I(pos src.XPos, op Op, t Type, auxint int64, arg0, arg1, arg2 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = auxint
v.Args = v.argstorage[:3]
v.argstorage[0] = arg0
}
// NewValue4 returns a new value in the block with four arguments and zero aux values.
- func (b *Block) NewValue4(line int32, op Op, t Type, arg0, arg1, arg2, arg3 *Value) *Value {
- v := b.Func.newValue(op, t, b, line)
+ func (b *Block) NewValue4(pos src.XPos, op Op, t Type, arg0, arg1, arg2, arg3 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
v.AuxInt = 0
v.Args = []*Value{arg0, arg1, arg2, arg3}
arg0.Uses++
}
// constVal returns a constant value for c.
- func (f *Func) constVal(line int32, op Op, t Type, c int64, setAux bool) *Value {
+ func (f *Func) constVal(pos src.XPos, op Op, t Type, c int64, setAux bool) *Value {
if f.constants == nil {
f.constants = make(map[int64][]*Value)
}
}
var v *Value
if setAux {
- v = f.Entry.NewValue0I(line, op, t, c)
+ v = f.Entry.NewValue0I(pos, op, t, c)
} else {
- v = f.Entry.NewValue0(line, op, t)
+ v = f.Entry.NewValue0(pos, op, t)
}
f.constants[c] = append(vv, v)
return v
)
// ConstInt returns an int constant representing its argument.
- func (f *Func) ConstBool(line int32, t Type, c bool) *Value {
+ func (f *Func) ConstBool(pos src.XPos, t Type, c bool) *Value {
i := int64(0)
if c {
i = 1
}
- return f.constVal(line, OpConstBool, t, i, true)
+ return f.constVal(pos, OpConstBool, t, i, true)
}
- func (f *Func) ConstInt8(line int32, t Type, c int8) *Value {
- return f.constVal(line, OpConst8, t, int64(c), true)
+ func (f *Func) ConstInt8(pos src.XPos, t Type, c int8) *Value {
+ return f.constVal(pos, OpConst8, t, int64(c), true)
}
- func (f *Func) ConstInt16(line int32, t Type, c int16) *Value {
- return f.constVal(line, OpConst16, t, int64(c), true)
+ func (f *Func) ConstInt16(pos src.XPos, t Type, c int16) *Value {
+ return f.constVal(pos, OpConst16, t, int64(c), true)
}
- func (f *Func) ConstInt32(line int32, t Type, c int32) *Value {
- return f.constVal(line, OpConst32, t, int64(c), true)
+ func (f *Func) ConstInt32(pos src.XPos, t Type, c int32) *Value {
+ return f.constVal(pos, OpConst32, t, int64(c), true)
}
- func (f *Func) ConstInt64(line int32, t Type, c int64) *Value {
- return f.constVal(line, OpConst64, t, c, true)
+ func (f *Func) ConstInt64(pos src.XPos, t Type, c int64) *Value {
+ return f.constVal(pos, OpConst64, t, c, true)
}
- func (f *Func) ConstFloat32(line int32, t Type, c float64) *Value {
- return f.constVal(line, OpConst32F, t, int64(math.Float64bits(float64(float32(c)))), true)
+ func (f *Func) ConstFloat32(pos src.XPos, t Type, c float64) *Value {
+ return f.constVal(pos, OpConst32F, t, int64(math.Float64bits(float64(float32(c)))), true)
}
- func (f *Func) ConstFloat64(line int32, t Type, c float64) *Value {
- return f.constVal(line, OpConst64F, t, int64(math.Float64bits(c)), true)
+ func (f *Func) ConstFloat64(pos src.XPos, t Type, c float64) *Value {
+ return f.constVal(pos, OpConst64F, t, int64(math.Float64bits(c)), true)
}
- func (f *Func) ConstSlice(line int32, t Type) *Value {
- return f.constVal(line, OpConstSlice, t, constSliceMagic, false)
+ func (f *Func) ConstSlice(pos src.XPos, t Type) *Value {
+ return f.constVal(pos, OpConstSlice, t, constSliceMagic, false)
}
- func (f *Func) ConstInterface(line int32, t Type) *Value {
- return f.constVal(line, OpConstInterface, t, constInterfaceMagic, false)
+ func (f *Func) ConstInterface(pos src.XPos, t Type) *Value {
+ return f.constVal(pos, OpConstInterface, t, constInterfaceMagic, false)
}
- func (f *Func) ConstNil(line int32, t Type) *Value {
- return f.constVal(line, OpConstNil, t, constNilMagic, false)
+ func (f *Func) ConstNil(pos src.XPos, t Type) *Value {
+ return f.constVal(pos, OpConstNil, t, constNilMagic, false)
}
- func (f *Func) ConstEmptyString(line int32, t Type) *Value {
- v := f.constVal(line, OpConstString, t, constEmptyStringMagic, false)
+ func (f *Func) ConstEmptyString(pos src.XPos, t Type) *Value {
+ v := f.constVal(pos, OpConstString, t, constEmptyStringMagic, false)
v.Aux = ""
return v
}
func (f *Func) Logf(msg string, args ...interface{}) { f.Config.Logf(msg, args...) }
func (f *Func) Log() bool { return f.Config.Log() }
- func (f *Func) Fatalf(msg string, args ...interface{}) { f.Config.Fatalf(f.Entry.Line, msg, args...) }
+ func (f *Func) Fatalf(msg string, args ...interface{}) { f.Config.Fatalf(f.Entry.Pos, msg, args...) }
func (f *Func) Free() {
// Clear cached CFG info.
--- /dev/null
- lastMems[f.Entry.ID] = f.Entry.NewValue0(f.Entry.Line, OpInitMem, TypeMem)
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ssa
+
+import "fmt"
+
+// an edgeMemCtr records a backedge, together with the memory and
+// counter phi functions at the target of the backedge that must
+// be updated when a rescheduling check replaces the backedge.
+type edgeMemCtr struct {
+ e Edge
+ m *Value // phi for memory at dest of e
+ c *Value // phi for counter at dest of e
+}
+
+// a rewriteTarget is a a value-argindex pair indicating
+// where a rewrite is applied. Note that this is for values,
+// not for block controls, because block controls are not targets
+// for the rewrites performed in inserting rescheduling checks.
+type rewriteTarget struct {
+ v *Value
+ i int
+}
+
+type rewrite struct {
+ before, after *Value // before is the expected value before rewrite, after is the new value installed.
+ rewrites []rewriteTarget // all the targets for this rewrite.
+}
+
+func (r *rewrite) String() string {
+ s := "\n\tbefore=" + r.before.String() + ", after=" + r.after.String()
+ for _, rw := range r.rewrites {
+ s += ", (i=" + fmt.Sprint(rw.i) + ", v=" + rw.v.LongString() + ")"
+ }
+ s += "\n"
+ return s
+}
+
+const initialRescheduleCounterValue = 1021 // Largest 10-bit prime. 97 nSec loop bodies will check every 100 uSec.
+
+// insertLoopReschedChecks inserts rescheduling checks on loop backedges.
+func insertLoopReschedChecks(f *Func) {
+ // TODO: when split information is recorded in export data, insert checks only on backedges that can be reached on a split-call-free path.
+
+ // Loop reschedule checks decrement a per-function counter
+ // shared by all loops, and when the counter becomes non-positive
+ // a call is made to a rescheduling check in the runtime.
+ //
+ // Steps:
+ // 1. locate backedges.
+ // 2. Record memory definitions at block end so that
+ // the SSA graph for mem can be prperly modified.
+ // 3. Define a counter and record its future uses (at backedges)
+ // (Same process as 2, applied to a single definition of the counter.
+ // difference for mem is that there are zero-to-many existing mem
+ // definitions, versus exactly one for the new counter.)
+ // 4. Ensure that phi functions that will-be-needed for mem and counter
+ // are present in the graph, initially with trivial inputs.
+ // 5. Record all to-be-modified uses of mem and counter;
+ // apply modifications (split into two steps to simplify and
+ // avoided nagging order-dependences).
+ // 6. Rewrite backedges to include counter check, reschedule check,
+ // and modify destination phi function appropriately with new
+ // definitions for mem and counter.
+
+ if f.NoSplit { // nosplit functions don't reschedule.
+ return
+ }
+
+ backedges := backedges(f)
+ if len(backedges) == 0 { // no backedges means no rescheduling checks.
+ return
+ }
+
+ lastMems := findLastMems(f)
+
+ idom := f.Idom()
+ sdom := f.sdom()
+
+ if f.pass.debug > 2 {
+ fmt.Printf("before %s = %s\n", f.Name, sdom.treestructure(f.Entry))
+ }
+
+ tofixBackedges := []edgeMemCtr{}
+
+ for _, e := range backedges { // TODO: could filter here by calls in loops, if declared and inferred nosplit are recorded in export data.
+ tofixBackedges = append(tofixBackedges, edgeMemCtr{e, nil, nil})
+ }
+
+ // It's possible that there is no memory state (no global/pointer loads/stores or calls)
+ if lastMems[f.Entry.ID] == nil {
- counter0 := f.Entry.NewValue0I(f.Entry.Line, OpConst32, f.Config.fe.TypeInt32(), initialRescheduleCounterValue)
++ lastMems[f.Entry.ID] = f.Entry.NewValue0(f.Entry.Pos, OpInitMem, TypeMem)
+ }
+
+ memDefsAtBlockEnds := make([]*Value, f.NumBlocks()) // For each block, the mem def seen at its bottom. Could be from earlier block.
+
+ // Propagate last mem definitions forward through successor blocks.
+ po := f.postorder()
+ for i := len(po) - 1; i >= 0; i-- {
+ b := po[i]
+ mem := lastMems[b.ID]
+ for j := 0; mem == nil; j++ { // if there's no def, then there's no phi, so the visible mem is identical in all predecessors.
+ // loop because there might be backedges that haven't been visited yet.
+ mem = memDefsAtBlockEnds[b.Preds[j].b.ID]
+ }
+ memDefsAtBlockEnds[b.ID] = mem
+ }
+
+ // Set up counter. There are no phis etc pre-existing for it.
- zero := f.Entry.NewValue0I(f.Entry.Line, OpConst32, f.Config.fe.TypeInt32(), 0)
- one := f.Entry.NewValue0I(f.Entry.Line, OpConst32, f.Config.fe.TypeInt32(), 1)
++ counter0 := f.Entry.NewValue0I(f.Entry.Pos, OpConst32, f.Config.fe.TypeInt32(), initialRescheduleCounterValue)
+ ctrDefsAtBlockEnds := make([]*Value, f.NumBlocks()) // For each block, def visible at its end, if that def will be used.
+
+ // There's a minor difference between memDefsAtBlockEnds and ctrDefsAtBlockEnds;
+ // because the counter only matter for loops and code that reaches them, it is nil for blocks where the ctr is no
+ // longer live. This will avoid creation of dead phi functions. This optimization is ignored for the mem variable
+ // because it is harder and also less likely to be helpful, though dead code elimination ought to clean this out anyhow.
+
+ for _, emc := range tofixBackedges {
+ e := emc.e
+ // set initial uses of counter zero (note available-at-bottom and use are the same thing initially.)
+ // each back-edge will be rewritten to include a reschedule check, and that will use the counter.
+ src := e.b.Preds[e.i].b
+ ctrDefsAtBlockEnds[src.ID] = counter0
+ }
+
+ // Push uses towards root
+ for _, b := range f.postorder() {
+ bd := ctrDefsAtBlockEnds[b.ID]
+ if bd == nil {
+ continue
+ }
+ for _, e := range b.Preds {
+ p := e.b
+ if ctrDefsAtBlockEnds[p.ID] == nil {
+ ctrDefsAtBlockEnds[p.ID] = bd
+ }
+ }
+ }
+
+ // Maps from block to newly-inserted phi function in block.
+ newmemphis := make(map[*Block]rewrite)
+ newctrphis := make(map[*Block]rewrite)
+
+ // Insert phi functions as necessary for future changes to flow graph.
+ for i, emc := range tofixBackedges {
+ e := emc.e
+ h := e.b
+
+ // find the phi function for the memory input at "h", if there is one.
+ var headerMemPhi *Value // look for header mem phi
+
+ for _, v := range h.Values {
+ if v.Op == OpPhi && v.Type.IsMemory() {
+ headerMemPhi = v
+ }
+ }
+
+ if headerMemPhi == nil {
+ // if the header is nil, make a trivial phi from the dominator
+ mem0 := memDefsAtBlockEnds[idom[h.ID].ID]
+ headerMemPhi = newPhiFor(h, mem0)
+ newmemphis[h] = rewrite{before: mem0, after: headerMemPhi}
+ addDFphis(mem0, h, h, f, memDefsAtBlockEnds, newmemphis)
+
+ }
+ tofixBackedges[i].m = headerMemPhi
+
+ var headerCtrPhi *Value
+ rw, ok := newctrphis[h]
+ if !ok {
+ headerCtrPhi = newPhiFor(h, counter0)
+ newctrphis[h] = rewrite{before: counter0, after: headerCtrPhi}
+ addDFphis(counter0, h, h, f, ctrDefsAtBlockEnds, newctrphis)
+ } else {
+ headerCtrPhi = rw.after
+ }
+ tofixBackedges[i].c = headerCtrPhi
+ }
+
+ rewriteNewPhis(f.Entry, f.Entry, f, memDefsAtBlockEnds, newmemphis)
+ rewriteNewPhis(f.Entry, f.Entry, f, ctrDefsAtBlockEnds, newctrphis)
+
+ if f.pass.debug > 0 {
+ for b, r := range newmemphis {
+ fmt.Printf("b=%s, rewrite=%s\n", b, r.String())
+ }
+
+ for b, r := range newctrphis {
+ fmt.Printf("b=%s, rewrite=%s\n", b, r.String())
+ }
+ }
+
+ // Apply collected rewrites.
+ for _, r := range newmemphis {
+ for _, rw := range r.rewrites {
+ rw.v.SetArg(rw.i, r.after)
+ }
+ }
+
+ for _, r := range newctrphis {
+ for _, rw := range r.rewrites {
+ rw.v.SetArg(rw.i, r.after)
+ }
+ }
+
- test.Line = bb.Line
- sched.Line = bb.Line
++ zero := f.Entry.NewValue0I(f.Entry.Pos, OpConst32, f.Config.fe.TypeInt32(), 0)
++ one := f.Entry.NewValue0I(f.Entry.Pos, OpConst32, f.Config.fe.TypeInt32(), 1)
+
+ // Rewrite backedges to include reschedule checks.
+ for _, emc := range tofixBackedges {
+ e := emc.e
+ headerMemPhi := emc.m
+ headerCtrPhi := emc.c
+ h := e.b
+ i := e.i
+ p := h.Preds[i]
+ bb := p.b
+ mem0 := headerMemPhi.Args[i]
+ ctr0 := headerCtrPhi.Args[i]
+ // bb e->p h,
+ // Because we're going to insert a rare-call, make sure the
+ // looping edge still looks likely.
+ likely := BranchLikely
+ if p.i != 0 {
+ likely = BranchUnlikely
+ }
+ bb.Likely = likely
+
+ // rewrite edge to include reschedule check
+ // existing edges:
+ //
+ // bb.Succs[p.i] == Edge{h, i}
+ // h.Preds[i] == p == Edge{bb,p.i}
+ //
+ // new block(s):
+ // test:
+ // ctr1 := ctr0 - 1
+ // if ctr1 <= 0 { goto sched }
+ // goto join
+ // sched:
+ // mem1 := call resched (mem0)
+ // goto join
+ // join:
+ // ctr2 := phi(ctr1, counter0) // counter0 is the constant
+ // mem2 := phi(mem0, mem1)
+ // goto h
+ //
+ // and correct arg i of headerMemPhi and headerCtrPhi
+ //
+ // EXCEPT: block containing only phi functions is bad
+ // for the register allocator. Therefore, there is no
+ // join, and instead branches targeting join instead target
+ // the header, and the other phi functions within header are
+ // adjusted for the additional input.
+
+ test := f.NewBlock(BlockIf)
+ sched := f.NewBlock(BlockPlain)
+
- ctr1 := test.NewValue2(bb.Line, OpSub32, f.Config.fe.TypeInt32(), ctr0, one)
- cmp := test.NewValue2(bb.Line, OpLeq32, f.Config.fe.TypeBool(), ctr1, zero)
++ test.Pos = bb.Pos
++ sched.Pos = bb.Pos
+
+ // ctr1 := ctr0 - 1
+ // if ctr1 <= 0 { goto sched }
+ // goto header
- mem1 := sched.NewValue1A(bb.Line, OpStaticCall, TypeMem, resched, mem0)
++ ctr1 := test.NewValue2(bb.Pos, OpSub32, f.Config.fe.TypeInt32(), ctr0, one)
++ cmp := test.NewValue2(bb.Pos, OpLeq32, f.Config.fe.TypeBool(), ctr1, zero)
+ test.SetControl(cmp)
+ test.AddEdgeTo(sched) // if true
+ // if false -- rewrite edge to header.
+ // do NOT remove+add, because that will perturb all the other phi functions
+ // as well as messing up other edges to the header.
+ test.Succs = append(test.Succs, Edge{h, i})
+ h.Preds[i] = Edge{test, 1}
+ headerMemPhi.SetArg(i, mem0)
+ headerCtrPhi.SetArg(i, ctr1)
+
+ test.Likely = BranchUnlikely
+
+ // sched:
+ // mem1 := call resched (mem0)
+ // goto header
+ resched := f.Config.fe.Syslook("goschedguarded")
- phiV := b.NewValue0(b.Line, OpPhi, v.Type)
++ mem1 := sched.NewValue1A(bb.Pos, OpStaticCall, TypeMem, resched, mem0)
+ sched.AddEdgeTo(h)
+ headerMemPhi.AddArg(mem1)
+ headerCtrPhi.AddArg(counter0)
+
+ bb.Succs[p.i] = Edge{test, 0}
+ test.Preds = append(test.Preds, Edge{bb, p.i})
+
+ // Must correct all the other phi functions in the header for new incoming edge.
+ // Except for mem and counter phis, it will be the same value seen on the original
+ // backedge at index i.
+ for _, v := range h.Values {
+ if v.Op == OpPhi && v != headerMemPhi && v != headerCtrPhi {
+ v.AddArg(v.Args[i])
+ }
+ }
+ }
+
+ f.invalidateCFG()
+
+ if f.pass.debug > 2 {
+ sdom = newSparseTree(f, f.Idom())
+ fmt.Printf("after %s = %s\n", f.Name, sdom.treestructure(f.Entry))
+ }
+
+ return
+}
+
+// newPhiFor inserts a new Phi function into b,
+// with all inputs set to v.
+func newPhiFor(b *Block, v *Value) *Value {
++ phiV := b.NewValue0(b.Pos, OpPhi, v.Type)
+
+ for range b.Preds {
+ phiV.AddArg(v)
+ }
+ return phiV
+}
+
+// rewriteNewPhis updates newphis[h] to record all places where the new phi function inserted
+// in block h will replace a previous definition. Block b is the block currently being processed;
+// if b has its own phi definition then it takes the place of h.
+// defsForUses provides information about other definitions of the variable that are present
+// (and if nil, indicates that the variable is no longer live)
+func rewriteNewPhis(h, b *Block, f *Func, defsForUses []*Value, newphis map[*Block]rewrite) {
+ // If b is a block with a new phi, then a new rewrite applies below it in the dominator tree.
+ if _, ok := newphis[b]; ok {
+ h = b
+ }
+ change := newphis[h]
+ x := change.before
+ y := change.after
+
+ // Apply rewrites to this block
+ if x != nil { // don't waste time on the common case of no definition.
+ p := &change.rewrites
+ for _, v := range b.Values {
+ if v == y { // don't rewrite self -- phi inputs are handled below.
+ continue
+ }
+ for i, w := range v.Args {
+ if w != x {
+ continue
+ }
+ *p = append(*p, rewriteTarget{v, i})
+ }
+ }
+
+ // Rewrite appropriate inputs of phis reached in successors
+ // in dominance frontier, self, and dominated.
+ // If the variable def reaching uses in b is itself defined in b, then the new phi function
+ // does not reach the successors of b. (This assumes a bit about the structure of the
+ // phi use-def graph, but it's true for memory and the inserted counter.)
+ if dfu := defsForUses[b.ID]; dfu != nil && dfu.Block != b {
+ for _, e := range b.Succs {
+ s := e.b
+ if sphi, ok := newphis[s]; ok { // saves time to find the phi this way.
+ *p = append(*p, rewriteTarget{sphi.after, e.i})
+ continue
+ }
+ for _, v := range s.Values {
+ if v.Op == OpPhi && v.Args[e.i] == x {
+ *p = append(*p, rewriteTarget{v, e.i})
+ break
+ }
+ }
+ }
+ }
+ newphis[h] = change
+ }
+
+ sdom := f.sdom()
+
+ for c := sdom[b.ID].child; c != nil; c = sdom[c.ID].sibling {
+ rewriteNewPhis(h, c, f, defsForUses, newphis) // TODO: convert to explicit stack from recursion.
+ }
+}
+
+// addDFphis creates new trivial phis that are necessary to correctly reflect (within SSA)
+// a new definition for variable "x" inserted at h (usually but not necessarily a phi).
+// These new phis can only occur at the dominance frontier of h; block s is in the dominance
+// frontier of h if h does not strictly dominate s and if s is a successor of a block b where
+// either b = h or h strictly dominates b.
+// These newly created phis are themselves new definitions that may require addition of their
+// own trivial phi functions in their own dominance frontier, and this is handled recursively.
+func addDFphis(x *Value, h, b *Block, f *Func, defForUses []*Value, newphis map[*Block]rewrite) {
+ oldv := defForUses[b.ID]
+ if oldv != x { // either a new definition replacing x, or nil if it is proven that there are no uses reachable from b
+ return
+ }
+ sdom := f.sdom()
+ idom := f.Idom()
+outer:
+ for _, e := range b.Succs {
+ s := e.b
+ // check phi functions in the dominance frontier
+ if sdom.isAncestor(h, s) {
+ continue // h dominates s, successor of b, therefore s is not in the frontier.
+ }
+ if _, ok := newphis[s]; ok {
+ continue // successor s of b already has a new phi function, so there is no need to add another.
+ }
+ if x != nil {
+ for _, v := range s.Values {
+ if v.Op == OpPhi && v.Args[e.i] == x {
+ continue outer // successor s of b has an old phi function, so there is no need to add another.
+ }
+ }
+ }
+
+ old := defForUses[idom[s.ID].ID] // new phi function is correct-but-redundant, combining value "old" on all inputs.
+ headerPhi := newPhiFor(s, old)
+ // the new phi will replace "old" in block s and all blocks dominated by s.
+ newphis[s] = rewrite{before: old, after: headerPhi} // record new phi, to have inputs labeled "old" rewritten to "headerPhi"
+ addDFphis(old, s, s, f, defForUses, newphis) // the new definition may also create new phi functions.
+ }
+ for c := sdom[b.ID].child; c != nil; c = sdom[c.ID].sibling {
+ addDFphis(x, h, c, f, defForUses, newphis) // TODO: convert to explicit stack from recursion.
+ }
+}
+
+// findLastMems maps block ids to last memory-output op in a block, if any
+func findLastMems(f *Func) []*Value {
+
+ var stores []*Value
+ lastMems := make([]*Value, f.NumBlocks())
+ storeUse := f.newSparseSet(f.NumValues())
+ defer f.retSparseSet(storeUse)
+ for _, b := range f.Blocks {
+ // Find all the stores in this block. Categorize their uses:
+ // storeUse contains stores which are used by a subsequent store.
+ storeUse.clear()
+ stores = stores[:0]
+ var memPhi *Value
+ for _, v := range b.Values {
+ if v.Op == OpPhi {
+ if v.Type.IsMemory() {
+ memPhi = v
+ }
+ continue
+ }
+ if v.Type.IsMemory() {
+ stores = append(stores, v)
+ if v.Op == OpSelect1 {
+ // Use the arg of the tuple-generating op.
+ v = v.Args[0]
+ }
+ for _, a := range v.Args {
+ if a.Block == b && a.Type.IsMemory() {
+ storeUse.add(a.ID)
+ }
+ }
+ }
+ }
+ if len(stores) == 0 {
+ lastMems[b.ID] = memPhi
+ continue
+ }
+
+ // find last store in the block
+ var last *Value
+ for _, v := range stores {
+ if storeUse.contains(v.ID) {
+ continue
+ }
+ if last != nil {
+ b.Fatalf("two final stores - simultaneous live stores %s %s", last, v)
+ }
+ last = v
+ }
+ if last == nil {
+ b.Fatalf("no last store found - cycle?")
+ }
+ lastMems[b.ID] = last
+ }
+ return lastMems
+}
+
+type backedgesState struct {
+ b *Block
+ i int
+}
+
+// backedges returns a slice of successor edges that are back
+// edges. For reducible loops, edge.b is the header.
+func backedges(f *Func) []Edge {
+ edges := []Edge{}
+ mark := make([]markKind, f.NumBlocks())
+ stack := []backedgesState{}
+
+ mark[f.Entry.ID] = notExplored
+ stack = append(stack, backedgesState{f.Entry, 0})
+
+ for len(stack) > 0 {
+ l := len(stack)
+ x := stack[l-1]
+ if x.i < len(x.b.Succs) {
+ e := x.b.Succs[x.i]
+ stack[l-1].i++
+ s := e.b
+ if mark[s.ID] == notFound {
+ mark[s.ID] = notExplored
+ stack = append(stack, backedgesState{s, 0})
+ } else if mark[s.ID] == notExplored {
+ edges = append(edges, e)
+ }
+ } else {
+ mark[x.b.ID] = done
+ stack = stack[0 : l-1]
+ }
+ }
+ return edges
+}
}
}
- // Next, process values in the block.
+ // Next, eliminate any redundant nil checks in this block.
i := 0
for _, v := range b.Values {
b.Values[i] = v
// This is a redundant implicit nil check.
// Logging in the style of the former compiler -- and omit line 1,
// which is usually in generated code.
- if f.Config.Debug_checknil() && v.Line > 1 {
- f.Config.Warnl(v.Line, "removed nil check")
+ if f.Config.Debug_checknil() && v.Pos.Line() > 1 {
+ f.Config.Warnl(v.Pos, "removed nil check")
}
v.reset(OpUnknown)
+ // TODO: f.freeValue(v)
i--
continue
}
- // Record the fact that we know ptr is non nil, and remember to
- // undo that information when this dominator subtree is done.
- nonNilValues[ptr.ID] = true
- work = append(work, bp{op: ClearPtr, ptr: ptr})
}
}
for j := i; j < len(b.Values); j++ {
}
b.Values = b.Values[:i]
+ // Finally, find redundant nil checks for subsequent blocks.
+ // Note that we can't add these until the loop above is done, as the
+ // values in the block are not ordered in any way when this pass runs.
+ // This was the cause of issue #18725.
+ for _, v := range b.Values {
+ if v.Op != OpNilCheck {
+ continue
+ }
+ ptr := v.Args[0]
+ // Record the fact that we know ptr is non nil, and remember to
+ // undo that information when this dominator subtree is done.
+ nonNilValues[ptr.ID] = true
+ work = append(work, bp{op: ClearPtr, ptr: ptr})
+ }
+
// Add all dominated blocks to the work list.
for w := sdom[node.block.ID].child; w != nil; w = sdom[w.ID].sibling {
work = append(work, bp{op: Work, block: w})
}
// All platforms are guaranteed to fault if we load/store to anything smaller than this address.
+//
+// This should agree with minLegalPointer in the runtime.
const minZeroPage = 4096
// nilcheckelim2 eliminates unnecessary nil checks.
for i := len(b.Values) - 1; i >= 0; i-- {
v := b.Values[i]
if opcodeTable[v.Op].nilCheck && unnecessary.contains(v.Args[0].ID) {
- if f.Config.Debug_checknil() && int(v.Line) > 1 {
- f.Config.Warnl(v.Line, "removed nil check")
+ if f.Config.Debug_checknil() && v.Pos.Line() > 1 {
+ f.Config.Warnl(v.Pos, "removed nil check")
}
v.reset(OpUnknown)
continue
import (
"cmd/internal/obj"
+ "cmd/internal/src"
"fmt"
"unsafe"
)
}
type use struct {
- dist int32 // distance from start of the block to a use of a value
- line int32 // line number of the use
- next *use // linked list of uses of a value in nondecreasing dist order
+ dist int32 // distance from start of the block to a use of a value
+ pos src.XPos // source position of the use
+ next *use // linked list of uses of a value in nondecreasing dist order
}
type valState struct {
}
type startReg struct {
- r register
- vid ID // pre-regalloc value needed in this register
- line int32 // line number of use of this register
+ r register
+ vid ID // pre-regalloc value needed in this register
+ pos src.XPos // source position of use of this register
}
// freeReg frees up register r. Any current user of r is kicked out.
m := s.compatRegs(v2.Type) &^ s.used &^ s.tmpused &^ (regMask(1) << r)
if m != 0 && !s.values[v2.ID].rematerializeable && countRegs(s.values[v2.ID].regs) == 1 {
r2 := pickReg(m)
- c := s.curBlock.NewValue1(v2.Line, OpCopy, v2.Type, s.regs[r].c)
+ c := s.curBlock.NewValue1(v2.Pos, OpCopy, v2.Type, s.regs[r].c)
s.copies[c] = false
if s.f.pass.debug > regDebug {
fmt.Printf("copy %s to %s : %s\n", v2, c, s.registers[r2].Name())
// allocated register is marked nospill so the assignment cannot be
// undone until the caller allows it by clearing nospill. Returns a
// *Value which is either v or a copy of v allocated to the chosen register.
- func (s *regAllocState) allocValToReg(v *Value, mask regMask, nospill bool, line int32) *Value {
+ func (s *regAllocState) allocValToReg(v *Value, mask regMask, nospill bool, pos src.XPos) *Value {
vi := &s.values[v.ID]
// Check if v is already in a requested register.
if s.regs[r2].v != v {
panic("bad register state")
}
- c = s.curBlock.NewValue1(line, OpCopy, v.Type, s.regs[r2].c)
+ c = s.curBlock.NewValue1(pos, OpCopy, v.Type, s.regs[r2].c)
} else if v.rematerializeable() {
// Rematerialize instead of loading from the spill location.
c = v.copyInto(s.curBlock)
// Load v from its spill location.
case vi.spill != nil:
if s.f.pass.debug > logSpills {
- s.f.Config.Warnl(vi.spill.Line, "load spill for %v from %v", v, vi.spill)
+ s.f.Config.Warnl(vi.spill.Pos, "load spill for %v from %v", v, vi.spill)
}
- c = s.curBlock.NewValue1(line, OpLoadReg, v.Type, vi.spill)
+ c = s.curBlock.NewValue1(pos, OpLoadReg, v.Type, vi.spill)
vi.spillUsed = true
default:
s.f.Fatalf("attempt to load unspilled value %v", v.LongString())
case "s390x":
// nothing to do, R10 & R11 already reserved
default:
- s.f.Config.fe.Fatalf(0, "arch %s not implemented", s.f.Config.arch)
+ s.f.Config.fe.Fatalf(src.NoXPos, "arch %s not implemented", s.f.Config.arch)
}
}
if s.f.Config.nacl {
// Adds a use record for id at distance dist from the start of the block.
// All calls to addUse must happen with nonincreasing dist.
- func (s *regAllocState) addUse(id ID, dist int32, line int32) {
+ func (s *regAllocState) addUse(id ID, dist int32, pos src.XPos) {
r := s.freeUseRecords
if r != nil {
s.freeUseRecords = r.next
r = &use{}
}
r.dist = dist
- r.line = line
+ r.pos = pos
r.next = s.values[id].uses
s.values[id].uses = r
if r.next != nil && dist > r.next.dist {
// Walk backwards through the block doing liveness analysis.
liveSet.clear()
for _, e := range s.live[b.ID] {
- s.addUse(e.ID, int32(len(b.Values))+e.dist, e.line) // pseudo-uses from beyond end of block
+ s.addUse(e.ID, int32(len(b.Values))+e.dist, e.pos) // pseudo-uses from beyond end of block
liveSet.add(e.ID)
}
if v := b.Control; v != nil && s.values[v.ID].needReg {
- s.addUse(v.ID, int32(len(b.Values)), b.Line) // pseudo-use by control value
- s.addUse(v.ID, int32(len(b.Values)), b.Pos) // psuedo-use by control value
++ s.addUse(v.ID, int32(len(b.Values)), b.Pos) // pseudo-use by control value
liveSet.add(v.ID)
}
for i := len(b.Values) - 1; i >= 0; i-- {
if !s.values[a.ID].needReg {
continue
}
- s.addUse(a.ID, int32(i), v.Line)
+ s.addUse(a.ID, int32(i), v.Pos)
liveSet.add(a.ID)
}
}
m := s.compatRegs(a.Type) &^ s.used &^ phiUsed
if m != 0 && !s.values[a.ID].rematerializeable && countRegs(s.values[a.ID].regs) == 1 {
r2 := pickReg(m)
- c := p.NewValue1(a.Line, OpCopy, a.Type, s.regs[r].c)
+ c := p.NewValue1(a.Pos, OpCopy, a.Type, s.regs[r].c)
s.copies[c] = false
if s.f.pass.debug > regDebug {
fmt.Printf("copy %s to %s : %s\n", a, c, s.registers[r2].Name())
// register-based phi
s.assignReg(r, v, v)
// Spill the phi in case we need to restore it later.
- spill := b.NewValue1(v.Line, OpStoreReg, v.Type, v)
+ spill := b.NewValue1(v.Pos, OpStoreReg, v.Type, v)
s.setOrig(spill, v)
s.values[v.ID].spill = spill
s.values[v.ID].spillUsed = false
// specially during merge edge processing.
continue
}
- regList = append(regList, startReg{r, v.ID, s.values[v.ID].uses.line})
+ regList = append(regList, startReg{r, v.ID, s.values[v.ID].uses.pos})
}
s.startRegs[b.ID] = regList
mask &^= desired.avoid
}
}
- args[i.idx] = s.allocValToReg(args[i.idx], mask, true, v.Line)
+ args[i.idx] = s.allocValToReg(args[i.idx], mask, true, v.Pos)
}
// If the output clobbers the input register, make sure we have
for _, r := range dinfo[idx].out {
if r != noRegister && m>>r&1 != 0 {
m = regMask(1) << r
- args[0] = s.allocValToReg(v.Args[0], m, true, v.Line)
+ args[0] = s.allocValToReg(v.Args[0], m, true, v.Pos)
// Note: we update args[0] so the instruction will
// use the register copy we just made.
goto ok
for _, r := range dinfo[idx].in[0] {
if r != noRegister && m>>r&1 != 0 {
m = regMask(1) << r
- c := s.allocValToReg(v.Args[0], m, true, v.Line)
+ c := s.allocValToReg(v.Args[0], m, true, v.Pos)
s.copies[c] = false
// Note: no update to args[0] so the instruction will
// use the original copy.
for _, r := range dinfo[idx].in[1] {
if r != noRegister && m>>r&1 != 0 {
m = regMask(1) << r
- c := s.allocValToReg(v.Args[1], m, true, v.Line)
+ c := s.allocValToReg(v.Args[1], m, true, v.Pos)
s.copies[c] = false
args[0], args[1] = args[1], args[0]
goto ok
m &^= desired.avoid
}
// Save input 0 to a new register so we can clobber it.
- c := s.allocValToReg(v.Args[0], m, true, v.Line)
+ c := s.allocValToReg(v.Args[0], m, true, v.Pos)
s.copies[c] = false
}
// It would be good to have both spill and restore inside the IF.
issueSpill:
if s.values[v.ID].needReg {
- spill := b.NewValue1(v.Line, OpStoreReg, v.Type, v)
+ spill := b.NewValue1(v.Pos, OpStoreReg, v.Type, v)
s.setOrig(spill, v)
s.values[v.ID].spill = spill
s.values[v.ID].spillUsed = false
// We assume that a control input can be passed in any
// type-compatible register. If this turns out not to be true,
// we'll need to introduce a regspec for a block's control value.
- b.Control = s.allocValToReg(v, s.compatRegs(v.Type), false, b.Line)
+ b.Control = s.allocValToReg(v, s.compatRegs(v.Type), false, b.Pos)
if b.Control != v {
v.Uses--
b.Control.Uses++
m &^= desired.avoid
}
if m != 0 {
- s.allocValToReg(v, m, false, b.Line)
+ s.allocValToReg(v, m, false, b.Pos)
}
}
}
vi := s.values[i]
if vi.spillUsed {
if s.f.pass.debug > logSpills && vi.spill.Op != OpArg {
- s.f.Config.Warnl(vi.spill.Line, "spilled value at %v remains", vi.spill)
+ s.f.Config.Warnl(vi.spill.Pos, "spilled value at %v remains", vi.spill)
}
continue
}
}
// If here, the register assignment was lost down at least one exit and it can't be sunk
if s.f.pass.debug > moveSpills {
- s.f.Config.Warnl(e.Line, "lost register assignment for spill %v in %v at exit %v to %v",
+ s.f.Config.Warnl(e.Pos, "lost register assignment for spill %v in %v at exit %v to %v",
vsp, b, p, d)
}
nSpillsChanged++
d := loop.exits[i]
vspnew := vsp // reuse original for first sunk spill, saves tracking down and renaming uses
if !first { // any sunk spills after first must make a copy
- vspnew = d.NewValue1(e.Line, OpStoreReg, e.Type, e)
+ vspnew = d.NewValue1(e.Pos, OpStoreReg, e.Type, e)
f.setHome(vspnew, f.getHome(vsp.ID)) // copy stack home
if s.f.pass.debug > moveSpills {
- s.f.Config.Warnl(e.Line, "copied spill %v in %v for %v to %v in %v",
+ s.f.Config.Warnl(e.Pos, "copied spill %v in %v for %v to %v in %v",
vsp, b, e, vspnew, d)
}
} else {
vspnew.Block = d
d.Values = append(d.Values, vspnew)
if s.f.pass.debug > moveSpills {
- s.f.Config.Warnl(e.Line, "moved spill %v in %v for %v to %v in %v",
+ s.f.Config.Warnl(e.Pos, "moved spill %v in %v for %v to %v in %v",
vsp, b, e, vspnew, d)
}
}
}
type contentRecord struct {
- vid ID // pre-regalloc value
- c *Value // cached value
- final bool // this is a satisfied destination
- line int32 // line number of use of the value
+ vid ID // pre-regalloc value
+ c *Value // cached value
+ final bool // this is a satisfied destination
+ pos src.XPos // source position of use of the value
}
type dstRecord struct {
loc Location // register or stack slot
vid ID // pre-regalloc value it should contain
splice **Value // place to store reference to the generating instruction
- line int32 // line number of use of this location
+ pos src.XPos // source position of use of this location
}
// setup initializes the edge state for shuffling.
// Live registers can be sources.
for _, x := range srcReg {
- e.set(&e.s.registers[x.r], x.v.ID, x.c, false, 0) // don't care the line number of the source
+ e.set(&e.s.registers[x.r], x.v.ID, x.c, false, src.NoXPos) // don't care the position of the source
}
// So can all of the spill locations.
for _, spillID := range stacklive {
v := e.s.orig[spillID]
spill := e.s.values[v.ID].spill
- e.set(e.s.f.getHome(spillID), v.ID, spill, false, 0) // don't care the line number of the source
+ e.set(e.s.f.getHome(spillID), v.ID, spill, false, src.NoXPos) // don't care the position of the source
}
// Figure out all the destinations we need.
dsts := e.destinations[:0]
for _, x := range dstReg {
- dsts = append(dsts, dstRecord{&e.s.registers[x.r], x.vid, nil, x.line})
+ dsts = append(dsts, dstRecord{&e.s.registers[x.r], x.vid, nil, x.pos})
}
// Phis need their args to end up in a specific location.
for _, v := range e.b.Values {
if loc == nil {
continue
}
- dsts = append(dsts, dstRecord{loc, v.Args[idx].ID, &v.Args[idx], v.Line})
+ dsts = append(dsts, dstRecord{loc, v.Args[idx].ID, &v.Args[idx], v.Pos})
}
e.destinations = dsts
for len(dsts) > 0 {
i := 0
for _, d := range dsts {
- if !e.processDest(d.loc, d.vid, d.splice, d.line) {
+ if !e.processDest(d.loc, d.vid, d.splice, d.pos) {
// Failed - save for next iteration.
dsts[i] = d
i++
fmt.Printf("breaking cycle with v%d in %s:%s\n", vid, loc.Name(), c)
}
if _, isReg := loc.(*Register); isReg {
- c = e.p.NewValue1(d.line, OpCopy, c.Type, c)
+ c = e.p.NewValue1(d.pos, OpCopy, c.Type, c)
} else {
e.s.lateSpillUse(vid)
- c = e.p.NewValue1(d.line, OpLoadReg, c.Type, c)
+ c = e.p.NewValue1(d.pos, OpLoadReg, c.Type, c)
}
- e.set(r, vid, c, false, d.line)
+ e.set(r, vid, c, false, d.pos)
}
}
// processDest generates code to put value vid into location loc. Returns true
// if progress was made.
- func (e *edgeState) processDest(loc Location, vid ID, splice **Value, line int32) bool {
+ func (e *edgeState) processDest(loc Location, vid ID, splice **Value, pos src.XPos) bool {
occupant := e.contents[loc]
if occupant.vid == vid {
// Value is already in the correct place.
- e.contents[loc] = contentRecord{vid, occupant.c, true, line}
+ e.contents[loc] = contentRecord{vid, occupant.c, true, pos}
if splice != nil {
(*splice).Uses--
*splice = occupant.c
e.erase(loc) // see pre-clobber comment below
r := e.findRegFor(v.Type)
x = v.copyInto(e.p)
- e.set(r, vid, x, false, line)
+ e.set(r, vid, x, false, pos)
// Make sure we spill with the size of the slot, not the
// size of x (which might be wider due to our dropping
// of narrowing conversions).
- x = e.p.NewValue1(line, OpStoreReg, loc.(LocalSlot).Type, x)
+ x = e.p.NewValue1(pos, OpStoreReg, loc.(LocalSlot).Type, x)
}
} else {
// Emit move from src to dst.
_, srcReg := src.(*Register)
if srcReg {
if dstReg {
- x = e.p.NewValue1(line, OpCopy, c.Type, c)
+ x = e.p.NewValue1(pos, OpCopy, c.Type, c)
} else {
- x = e.p.NewValue1(line, OpStoreReg, loc.(LocalSlot).Type, c)
+ x = e.p.NewValue1(pos, OpStoreReg, loc.(LocalSlot).Type, c)
}
} else {
if dstReg {
e.s.lateSpillUse(vid)
- x = e.p.NewValue1(line, OpLoadReg, c.Type, c)
+ x = e.p.NewValue1(pos, OpLoadReg, c.Type, c)
} else {
// mem->mem. Use temp register.
r := e.findRegFor(c.Type)
e.s.lateSpillUse(vid)
- t := e.p.NewValue1(line, OpLoadReg, c.Type, c)
- e.set(r, vid, t, false, line)
- x = e.p.NewValue1(line, OpStoreReg, loc.(LocalSlot).Type, t)
+ t := e.p.NewValue1(pos, OpLoadReg, c.Type, c)
+ e.set(r, vid, t, false, pos)
+ x = e.p.NewValue1(pos, OpStoreReg, loc.(LocalSlot).Type, t)
}
}
}
- e.set(loc, vid, x, true, line)
+ e.set(loc, vid, x, true, pos)
if splice != nil {
(*splice).Uses--
*splice = x
}
// set changes the contents of location loc to hold the given value and its cached representative.
- func (e *edgeState) set(loc Location, vid ID, c *Value, final bool, line int32) {
+ func (e *edgeState) set(loc Location, vid ID, c *Value, final bool, pos src.XPos) {
e.s.f.setHome(c, loc)
e.erase(loc)
- e.contents[loc] = contentRecord{vid, c, final, line}
+ e.contents[loc] = contentRecord{vid, c, final, pos}
a := e.cache[vid]
if len(a) == 0 {
e.cachedVals = append(e.cachedVals, vid)
// Add a destination to move this value back into place.
// Make sure it gets added to the tail of the destination queue
// so we make progress on other moves first.
- e.extra = append(e.extra, dstRecord{loc, cr.vid, nil, cr.line})
+ e.extra = append(e.extra, dstRecord{loc, cr.vid, nil, cr.pos})
}
// Remove c from the list of cached values.
a := e.cache[vid]
for _, c := range a {
if r, ok := e.s.f.getHome(c.ID).(*Register); ok && m>>uint(r.num)&1 != 0 {
- x := e.p.NewValue1(c.Line, OpStoreReg, c.Type, c)
- e.set(t, vid, x, false, c.Line)
+ x := e.p.NewValue1(c.Pos, OpStoreReg, c.Type, c)
+ e.set(t, vid, x, false, c.Pos)
if e.s.f.pass.debug > regDebug {
fmt.Printf(" SPILL %s->%s %s\n", r.Name(), t.Name(), x.LongString())
}
}
type liveInfo struct {
- ID ID // ID of value
- dist int32 // # of instructions before next use
- line int32 // line number of next use
+ ID ID // ID of value
+ dist int32 // # of instructions before next use
+ pos src.XPos // source position of next use
}
// dblock contains information about desired & avoid registers at the end of a block.
// to beginning-of-block distance.
live.clear()
for _, e := range s.live[b.ID] {
- live.set(e.ID, e.dist+int32(len(b.Values)), e.line)
+ live.set(e.ID, e.dist+int32(len(b.Values)), e.pos)
}
// Mark control value as live
if b.Control != nil && s.values[b.Control.ID].needReg {
- live.set(b.Control.ID, int32(len(b.Values)), b.Line)
+ live.set(b.Control.ID, int32(len(b.Values)), b.Pos)
}
// Propagate backwards to the start of the block
}
for _, a := range v.Args {
if s.values[a.ID].needReg {
- live.set(a.ID, int32(i), v.Line)
+ live.set(a.ID, int32(i), v.Pos)
}
}
}
// Start t off with the previously known live values at the end of p.
t.clear()
for _, e := range s.live[p.ID] {
- t.set(e.ID, e.dist, e.line)
+ t.set(e.ID, e.dist, e.pos)
}
update := false
id := v.Args[i].ID
if s.values[id].needReg && (!t.contains(id) || delta < t.get(id)) {
update = true
- t.set(id, delta, v.Line)
+ t.set(id, delta, v.Pos)
}
}
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64ADD)
- v0 := b.NewValue0(v.Line, OpPPC64ADD, t)
- v1 := b.NewValue0(v.Line, OpPPC64SRD, t)
+ v0 := b.NewValue0(v.Pos, OpPPC64ADD, t)
+ v1 := b.NewValue0(v.Pos, OpPPC64SRD, t)
v1.AddArg(x)
- v2 := b.NewValue0(v.Line, OpPPC64MOVDconst, t)
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, t)
v2.AuxInt = 1
v1.AddArg(v2)
v0.AddArg(v1)
- v3 := b.NewValue0(v.Line, OpPPC64SRD, t)
+ v3 := b.NewValue0(v.Pos, OpPPC64SRD, t)
v3.AddArg(y)
- v4 := b.NewValue0(v.Line, OpPPC64MOVDconst, t)
+ v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, t)
v4.AuxInt = 1
v3.AddArg(v4)
v0.AddArg(v3)
v.AddArg(v0)
- v5 := b.NewValue0(v.Line, OpPPC64ANDconst, t)
+ v5 := b.NewValue0(v.Pos, OpPPC64ANDconst, t)
v5.AuxInt = 1
- v6 := b.NewValue0(v.Line, OpPPC64AND, t)
+ v6 := b.NewValue0(v.Pos, OpPPC64AND, t)
v6.AddArg(x)
v6.AddArg(y)
v5.AddArg(v6)
for {
x := v.Args[0]
v.reset(OpPPC64Xf2i64)
- v0 := b.NewValue0(v.Line, OpPPC64FCTIWZ, config.fe.TypeFloat64())
+ v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, config.fe.TypeFloat64())
v0.AddArg(x)
v.AddArg(v0)
return true
for {
x := v.Args[0]
v.reset(OpPPC64Xf2i64)
- v0 := b.NewValue0(v.Line, OpPPC64FCTIDZ, config.fe.TypeFloat64())
+ v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, config.fe.TypeFloat64())
v0.AddArg(x)
v.AddArg(v0)
return true
for {
x := v.Args[0]
v.reset(OpPPC64FRSP)
- v0 := b.NewValue0(v.Line, OpPPC64FCFID, config.fe.TypeFloat64())
- v1 := b.NewValue0(v.Line, OpPPC64Xi2f64, config.fe.TypeFloat64())
- v2 := b.NewValue0(v.Line, OpSignExt32to64, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64FCFID, config.fe.TypeFloat64())
+ v1 := b.NewValue0(v.Pos, OpPPC64Xi2f64, config.fe.TypeFloat64())
+ v2 := b.NewValue0(v.Pos, OpSignExt32to64, config.fe.TypeInt64())
v2.AddArg(x)
v1.AddArg(v2)
v0.AddArg(v1)
for {
x := v.Args[0]
v.reset(OpPPC64FCFID)
- v0 := b.NewValue0(v.Line, OpPPC64Xi2f64, config.fe.TypeFloat64())
- v1 := b.NewValue0(v.Line, OpSignExt32to64, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64Xi2f64, config.fe.TypeFloat64())
+ v1 := b.NewValue0(v.Pos, OpSignExt32to64, config.fe.TypeInt64())
v1.AddArg(x)
v0.AddArg(v1)
v.AddArg(v0)
for {
x := v.Args[0]
v.reset(OpPPC64Xf2i64)
- v0 := b.NewValue0(v.Line, OpPPC64FCTIWZ, config.fe.TypeFloat64())
+ v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, config.fe.TypeFloat64())
v0.AddArg(x)
v.AddArg(v0)
return true
for {
x := v.Args[0]
v.reset(OpPPC64Xf2i64)
- v0 := b.NewValue0(v.Line, OpPPC64FCTIDZ, config.fe.TypeFloat64())
+ v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, config.fe.TypeFloat64())
v0.AddArg(x)
v.AddArg(v0)
return true
for {
x := v.Args[0]
v.reset(OpPPC64FRSP)
- v0 := b.NewValue0(v.Line, OpPPC64FCFID, config.fe.TypeFloat64())
- v1 := b.NewValue0(v.Line, OpPPC64Xi2f64, config.fe.TypeFloat64())
+ v0 := b.NewValue0(v.Pos, OpPPC64FCFID, config.fe.TypeFloat64())
+ v1 := b.NewValue0(v.Pos, OpPPC64Xi2f64, config.fe.TypeFloat64())
v1.AddArg(x)
v0.AddArg(v1)
v.AddArg(v0)
for {
x := v.Args[0]
v.reset(OpPPC64FCFID)
- v0 := b.NewValue0(v.Line, OpPPC64Xi2f64, config.fe.TypeFloat64())
+ v0 := b.NewValue0(v.Pos, OpPPC64Xi2f64, config.fe.TypeFloat64())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64DIVW)
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64DIVWU)
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64DIVW)
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64DIVWU)
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
break
}
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
break
}
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpPPC64ANDconst)
v.AuxInt = 1
- v0 := b.NewValue0(v.Line, OpPPC64EQV, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64EQV, config.fe.TypeInt64())
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64Equal)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
_ = b
// match: (Geq16U x y)
// cond:
- // result: (GreaterEqual (CMPU (ZeroExt16to32 x) (ZeroExt16to32 y)))
+ // result: (GreaterEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
for {
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
- v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
++ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FGreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
_ = b
// match: (Geq32U x y)
// cond:
- // result: (GreaterEqual (CMPU x y))
+ // result: (GreaterEqual (CMPWU x y))
for {
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
++ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FGreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
_ = b
// match: (Geq8U x y)
// cond:
- // result: (GreaterEqual (CMPU (ZeroExt8to32 x) (ZeroExt8to32 y)))
+ // result: (GreaterEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
for {
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
- v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
++ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FGreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FGreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64GreaterThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpPPC64SRAWconst)
v.AuxInt = 16
- v0 := b.NewValue0(v.Line, OpPPC64MULLW, config.fe.TypeInt32())
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLW, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpPPC64SRWconst)
v.AuxInt = 16
- v0 := b.NewValue0(v.Line, OpPPC64MULLW, config.fe.TypeUInt32())
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLW, config.fe.TypeUInt32())
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpPPC64SRAWconst)
v.AuxInt = 8
- v0 := b.NewValue0(v.Line, OpPPC64MULLW, config.fe.TypeInt16())
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLW, config.fe.TypeInt16())
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpPPC64SRWconst)
v.AuxInt = 8
- v0 := b.NewValue0(v.Line, OpPPC64MULLW, config.fe.TypeUInt16())
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLW, config.fe.TypeUInt16())
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
idx := v.Args[0]
len := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
v0.AddArg(idx)
v0.AddArg(len)
v.AddArg(v0)
for {
ptr := v.Args[0]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, TypeFlags)
v0.AuxInt = 0
v0.AddArg(ptr)
v.AddArg(v0)
idx := v.Args[0]
len := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
v0.AddArg(idx)
v0.AddArg(len)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FLessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FLessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FLessThan)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64FLessThan)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64LessThan)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWU, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
break
}
v.reset(OpPPC64MOVBreg)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v0.AddArg(ptr)
v0.AddArg(mem)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -16
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -16
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -16
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -16
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -8
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -8
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -8
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SLW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -8
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpMod32)
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpMod32u)
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
y := v.Args[1]
v.reset(OpPPC64SUB)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64MULLW, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLW, config.fe.TypeInt32())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64DIVW, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpPPC64DIVW, config.fe.TypeInt32())
v1.AddArg(x)
v1.AddArg(y)
v0.AddArg(v1)
y := v.Args[1]
v.reset(OpPPC64SUB)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64MULLW, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLW, config.fe.TypeInt32())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64DIVWU, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpPPC64DIVWU, config.fe.TypeInt32())
v1.AddArg(x)
v1.AddArg(y)
v0.AddArg(v1)
y := v.Args[1]
v.reset(OpPPC64SUB)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64MULLD, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLD, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64DIVD, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64DIVD, config.fe.TypeInt64())
v1.AddArg(x)
v1.AddArg(y)
v0.AddArg(v1)
y := v.Args[1]
v.reset(OpPPC64SUB)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64MULLD, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64MULLD, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64DIVDU, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64DIVDU, config.fe.TypeInt64())
v1.AddArg(x)
v1.AddArg(y)
v0.AddArg(v1)
x := v.Args[0]
y := v.Args[1]
v.reset(OpMod32)
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpMod32u)
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(y)
v.AddArg(v1)
return true
}
v.reset(OpPPC64MOVBstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
}
v.reset(OpPPC64MOVHstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
v.reset(OpPPC64MOVBstore)
v.AuxInt = 1
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v0.AuxInt = 1
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64MOVBstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVBstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
}
v.reset(OpPPC64MOVWstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVWload, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVWload, config.fe.TypeInt32())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
v.reset(OpPPC64MOVHstore)
v.AuxInt = 2
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v0.AuxInt = 2
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64MOVHstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
v.reset(OpPPC64MOVBstore)
v.AuxInt = 3
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v0.AuxInt = 3
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64MOVBstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVBstore, TypeMem)
v1.AuxInt = 2
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v2.AuxInt = 2
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
- v3 := b.NewValue0(v.Line, OpPPC64MOVBstore, TypeMem)
+ v3 := b.NewValue0(v.Pos, OpPPC64MOVBstore, TypeMem)
v3.AuxInt = 1
v3.AddArg(dst)
- v4 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v4 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v4.AuxInt = 1
v4.AddArg(src)
v4.AddArg(mem)
v3.AddArg(v4)
- v5 := b.NewValue0(v.Line, OpPPC64MOVBstore, TypeMem)
+ v5 := b.NewValue0(v.Pos, OpPPC64MOVBstore, TypeMem)
v5.AddArg(dst)
- v6 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v6 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v6.AddArg(src)
v6.AddArg(mem)
v5.AddArg(v6)
}
v.reset(OpPPC64MOVDstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVDload, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVDload, config.fe.TypeInt64())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
v.reset(OpPPC64MOVWstore)
v.AuxInt = 4
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVWZload, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVWZload, config.fe.TypeUInt32())
v0.AuxInt = 4
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64MOVWstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpPPC64MOVWZload, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, config.fe.TypeUInt32())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
v.reset(OpPPC64MOVHstore)
v.AuxInt = 6
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v0.AuxInt = 6
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64MOVHstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, TypeMem)
v1.AuxInt = 4
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v2.AuxInt = 4
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
- v3 := b.NewValue0(v.Line, OpPPC64MOVHstore, TypeMem)
+ v3 := b.NewValue0(v.Pos, OpPPC64MOVHstore, TypeMem)
v3.AuxInt = 2
v3.AddArg(dst)
- v4 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v4 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v4.AuxInt = 2
v4.AddArg(src)
v4.AddArg(mem)
v3.AddArg(v4)
- v5 := b.NewValue0(v.Line, OpPPC64MOVHstore, TypeMem)
+ v5 := b.NewValue0(v.Pos, OpPPC64MOVHstore, TypeMem)
v5.AddArg(dst)
- v6 := b.NewValue0(v.Line, OpPPC64MOVHZload, config.fe.TypeUInt16())
+ v6 := b.NewValue0(v.Pos, OpPPC64MOVHZload, config.fe.TypeUInt16())
v6.AddArg(src)
v6.AddArg(mem)
v5.AddArg(v6)
v.reset(OpPPC64MOVBstore)
v.AuxInt = 2
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v0.AuxInt = 2
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64MOVBstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVBstore, TypeMem)
v1.AuxInt = 1
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v2.AuxInt = 1
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
- v3 := b.NewValue0(v.Line, OpPPC64MOVBstore, TypeMem)
+ v3 := b.NewValue0(v.Pos, OpPPC64MOVBstore, TypeMem)
v3.AddArg(dst)
- v4 := b.NewValue0(v.Line, OpPPC64MOVBZload, config.fe.TypeUInt8())
+ v4 := b.NewValue0(v.Pos, OpPPC64MOVBZload, config.fe.TypeUInt8())
v4.AddArg(src)
v4.AddArg(mem)
v3.AddArg(v4)
v.AuxInt = SizeAndAlign(s).Align()
v.AddArg(dst)
v.AddArg(src)
- v0 := b.NewValue0(v.Line, OpPPC64ADDconst, src.Type)
+ v0 := b.NewValue0(v.Pos, OpPPC64ADDconst, src.Type)
v0.AuxInt = SizeAndAlign(s).Size() - moveSize(SizeAndAlign(s).Align(), config)
v0.AddArg(src)
v.AddArg(v0)
break
}
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64FCMPU, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
break
}
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v2 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMPW, TypeFlags)
- v1 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPW, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64NotEqual)
- v0 := b.NewValue0(v.Line, OpPPC64CMP, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMP, TypeFlags)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
off := v.AuxInt
ptr := v.Args[0]
v.reset(OpPPC64ADD)
- v0 := b.NewValue0(v.Line, OpPPC64MOVDconst, config.Frontend().TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, config.Frontend().TypeInt64())
v0.AuxInt = off
v.AddArg(v0)
v.AddArg(ptr)
break
}
v.reset(OpPPC64InvertFlags)
- v0 := b.NewValue0(v.Line, OpPPC64CMPconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(y)
v.AddArg(v0)
break
}
v.reset(OpPPC64InvertFlags)
- v0 := b.NewValue0(v.Line, OpPPC64CMPUconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPUconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(y)
v.AddArg(v0)
break
}
v.reset(OpPPC64InvertFlags)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(y)
v.AddArg(v0)
break
}
v.reset(OpPPC64InvertFlags)
- v0 := b.NewValue0(v.Line, OpPPC64CMPWUconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWUconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(y)
v.AddArg(v0)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
- v4 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
- v4 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt16to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt16to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
- v4 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
- v4 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
- v4 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = 63
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt16to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt16to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -16
- v4 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
y := v.Args[1]
v.reset(OpPPC64SRW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAW)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -32
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
v2.AddArg(y)
v1.AddArg(v2)
y := v.Args[1]
v.reset(OpPPC64SRAD)
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v2 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v2.AuxInt = -64
- v3 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
- v4 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
- v4 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRW)
- v0 := b.NewValue0(v.Line, OpZeroExt8to32, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpZeroExt8to32, config.fe.TypeUInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
- v4 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
- v4 := b.NewValue0(v.Line, OpZeroExt16to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt16to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
- v4 := b.NewValue0(v.Line, OpZeroExt32to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt32to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = 63
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
}
v.reset(OpPPC64SRAWconst)
v.AuxInt = c
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpPPC64SRAW)
- v0 := b.NewValue0(v.Line, OpSignExt8to32, config.fe.TypeInt32())
+ v0 := b.NewValue0(v.Pos, OpSignExt8to32, config.fe.TypeInt32())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpPPC64ORN, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpPPC64ORN, config.fe.TypeInt64())
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
- v3 := b.NewValue0(v.Line, OpPPC64ADDconstForCarry, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, config.fe.TypeInt64())
+ v3 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, TypeFlags)
v3.AuxInt = -8
- v4 := b.NewValue0(v.Line, OpZeroExt8to64, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpZeroExt8to64, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
v.reset(OpPPC64XORconst)
v.AuxInt = -1
- v0 := b.NewValue0(v.Line, OpPPC64SRADconst, t)
+ v0 := b.NewValue0(v.Pos, OpPPC64SRADconst, t)
v0.AuxInt = 63
- v1 := b.NewValue0(v.Line, OpPPC64ADDconst, t)
+ v1 := b.NewValue0(v.Pos, OpPPC64ADDconst, t)
v1.AuxInt = -1
v1.AddArg(x)
v0.AddArg(v1)
v.reset(OpPPC64MOVBstorezero)
v.AuxInt = 1
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBstorezero, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpPPC64MOVHstorezero)
v.AuxInt = 2
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVHstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVHstorezero, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpPPC64MOVBstorezero)
v.AuxInt = 3
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBstorezero, TypeMem)
v0.AuxInt = 2
v0.AddArg(destptr)
- v1 := b.NewValue0(v.Line, OpPPC64MOVBstorezero, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVBstorezero, TypeMem)
v1.AuxInt = 1
v1.AddArg(destptr)
- v2 := b.NewValue0(v.Line, OpPPC64MOVBstorezero, TypeMem)
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVBstorezero, TypeMem)
v2.AuxInt = 0
v2.AddArg(destptr)
v2.AddArg(mem)
v.reset(OpPPC64MOVWstorezero)
v.AuxInt = 4
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVWstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVWstorezero, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpPPC64MOVHstorezero)
v.AuxInt = 6
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVHstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVHstorezero, TypeMem)
v0.AuxInt = 4
v0.AddArg(destptr)
- v1 := b.NewValue0(v.Line, OpPPC64MOVHstorezero, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVHstorezero, TypeMem)
v1.AuxInt = 2
v1.AddArg(destptr)
- v2 := b.NewValue0(v.Line, OpPPC64MOVHstorezero, TypeMem)
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVHstorezero, TypeMem)
v2.AuxInt = 0
v2.AddArg(destptr)
v2.AddArg(mem)
v.reset(OpPPC64MOVBstorezero)
v.AuxInt = 2
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVBstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVBstorezero, TypeMem)
v0.AuxInt = 1
v0.AddArg(destptr)
- v1 := b.NewValue0(v.Line, OpPPC64MOVBstorezero, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVBstorezero, TypeMem)
v1.AuxInt = 0
v1.AddArg(destptr)
v1.AddArg(mem)
v.reset(OpPPC64MOVDstorezero)
v.AuxInt = 8
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVDstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpPPC64MOVDstorezero)
v.AuxInt = 16
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVDstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, TypeMem)
v0.AuxInt = 8
v0.AddArg(destptr)
- v1 := b.NewValue0(v.Line, OpPPC64MOVDstorezero, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, TypeMem)
v1.AuxInt = 0
v1.AddArg(destptr)
v1.AddArg(mem)
v.reset(OpPPC64MOVDstorezero)
v.AuxInt = 24
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpPPC64MOVDstorezero, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, TypeMem)
v0.AuxInt = 16
v0.AddArg(destptr)
- v1 := b.NewValue0(v.Line, OpPPC64MOVDstorezero, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, TypeMem)
v1.AuxInt = 8
v1.AddArg(destptr)
- v2 := b.NewValue0(v.Line, OpPPC64MOVDstorezero, TypeMem)
+ v2 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, TypeMem)
v2.AuxInt = 0
v2.AddArg(destptr)
v2.AddArg(mem)
v.reset(OpPPC64LoweredZero)
v.AuxInt = SizeAndAlign(s).Align()
v.AddArg(ptr)
- v0 := b.NewValue0(v.Line, OpPPC64ADDconst, ptr.Type)
+ v0 := b.NewValue0(v.Pos, OpPPC64ADDconst, ptr.Type)
v0.AuxInt = SizeAndAlign(s).Size() - moveSize(SizeAndAlign(s).Align(), config)
v0.AddArg(ptr)
v.AddArg(v0)
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
- v0 := b.NewValue0(v.Line, OpPPC64ANDCCconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
- v0 := b.NewValue0(v.Line, OpPPC64ANDCCconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
- v0 := b.NewValue0(v.Line, OpPPC64CMPWconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, TypeFlags)
v0.AuxInt = 0
v0.AddArg(cond)
b.SetControl(v0)
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
- v0 := b.NewValue0(v.Line, OpPPC64ANDCCconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
- v0 := b.NewValue0(v.Line, OpPPC64ANDCCconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
val := v.Args[1]
mem := v.Args[2]
v.reset(OpS390XAddTupleFirst32)
- v0 := b.NewValue0(v.Line, OpS390XLAA, MakeTuple(config.fe.TypeUInt32(), TypeMem))
+ v0 := b.NewValue0(v.Pos, OpS390XLAA, MakeTuple(config.fe.TypeUInt32(), TypeMem))
v0.AddArg(ptr)
v0.AddArg(val)
v0.AddArg(mem)
val := v.Args[1]
mem := v.Args[2]
v.reset(OpS390XAddTupleFirst64)
- v0 := b.NewValue0(v.Line, OpS390XLAAG, MakeTuple(config.fe.TypeUInt64(), TypeMem))
+ v0 := b.NewValue0(v.Pos, OpS390XLAAG, MakeTuple(config.fe.TypeUInt64(), TypeMem))
v0.AddArg(ptr)
v0.AddArg(val)
v0.AddArg(mem)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XADD)
- v0 := b.NewValue0(v.Line, OpS390XADD, t)
- v1 := b.NewValue0(v.Line, OpS390XSRDconst, t)
+ v0 := b.NewValue0(v.Pos, OpS390XADD, t)
+ v1 := b.NewValue0(v.Pos, OpS390XSRDconst, t)
v1.AuxInt = 1
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XSRDconst, t)
+ v2 := b.NewValue0(v.Pos, OpS390XSRDconst, t)
v2.AuxInt = 1
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
- v3 := b.NewValue0(v.Line, OpS390XANDconst, t)
+ v3 := b.NewValue0(v.Pos, OpS390XANDconst, t)
v3.AuxInt = 1
- v4 := b.NewValue0(v.Line, OpS390XAND, t)
+ v4 := b.NewValue0(v.Pos, OpS390XAND, t)
v4.AddArg(x)
v4.AddArg(y)
v3.AddArg(v4)
t := v.Type
x := v.Args[0]
v.reset(OpS390XSUB)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 64
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XFLOGR, config.fe.TypeUInt64())
- v2 := b.NewValue0(v.Line, OpS390XMOVWZreg, config.fe.TypeUInt64())
- v3 := b.NewValue0(v.Line, OpS390XANDW, t)
- v4 := b.NewValue0(v.Line, OpS390XSUBWconst, t)
+ v1 := b.NewValue0(v.Pos, OpS390XFLOGR, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XANDW, t)
+ v4 := b.NewValue0(v.Pos, OpS390XSUBWconst, t)
v4.AuxInt = 1
v4.AddArg(x)
v3.AddArg(v4)
- v5 := b.NewValue0(v.Line, OpS390XNOTW, t)
+ v5 := b.NewValue0(v.Pos, OpS390XNOTW, t)
v5.AddArg(x)
v3.AddArg(v5)
v2.AddArg(v3)
t := v.Type
x := v.Args[0]
v.reset(OpS390XSUB)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 64
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XFLOGR, config.fe.TypeUInt64())
- v2 := b.NewValue0(v.Line, OpS390XAND, t)
- v3 := b.NewValue0(v.Line, OpS390XSUBconst, t)
+ v1 := b.NewValue0(v.Pos, OpS390XFLOGR, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XAND, t)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBconst, t)
v3.AuxInt = 1
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XNOT, t)
+ v4 := b.NewValue0(v.Pos, OpS390XNOT, t)
v4.AddArg(x)
v2.AddArg(v4)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XDIVW)
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XDIVWU)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XDIVW)
- v0 := b.NewValue0(v.Line, OpS390XMOVWreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
v.AddArg(y)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XDIVWU)
- v0 := b.NewValue0(v.Line, OpS390XMOVWZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, config.fe.TypeUInt64())
v0.AddArg(x)
v.AddArg(v0)
v.AddArg(y)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XDIVW)
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XDIVWU)
- v0 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPW, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPW, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMPS, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMPS, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDEQ)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPW, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPW, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGEnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMPS, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMPS, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPWU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGEnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPW, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPW, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGTnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMPS, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMPS, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPWU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGTnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
y := v.Args[1]
v.reset(OpS390XSRDconst)
v.AuxInt = 16
- v0 := b.NewValue0(v.Line, OpS390XMULLW, config.fe.TypeInt32())
- v1 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMULLW, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpS390XSRDconst)
v.AuxInt = 16
- v0 := b.NewValue0(v.Line, OpS390XMULLW, config.fe.TypeInt32())
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMULLW, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpS390XSRDconst)
v.AuxInt = 32
- v0 := b.NewValue0(v.Line, OpS390XMULLD, config.fe.TypeInt64())
- v1 := b.NewValue0(v.Line, OpS390XMOVWreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMULLD, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVWreg, config.fe.TypeInt64())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XMOVWreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVWreg, config.fe.TypeInt64())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpS390XSRDconst)
v.AuxInt = 32
- v0 := b.NewValue0(v.Line, OpS390XMULLD, config.fe.TypeInt64())
- v1 := b.NewValue0(v.Line, OpS390XMOVWZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMULLD, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVWZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XMOVWZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, config.fe.TypeUInt64())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpS390XSRDconst)
v.AuxInt = 8
- v0 := b.NewValue0(v.Line, OpS390XMULLW, config.fe.TypeInt32())
- v1 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMULLW, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
y := v.Args[1]
v.reset(OpS390XSRDconst)
v.AuxInt = 8
- v0 := b.NewValue0(v.Line, OpS390XMULLW, config.fe.TypeInt32())
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMULLW, config.fe.TypeInt32())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v2.AddArg(y)
v0.AddArg(v2)
v.AddArg(v0)
idx := v.Args[0]
len := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
v2.AddArg(idx)
v2.AddArg(len)
v.AddArg(v2)
for {
p := v.Args[0]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPconst, TypeFlags)
v2.AuxInt = 0
v2.AddArg(p)
v.AddArg(v2)
idx := v.Args[0]
len := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
v2.AddArg(idx)
v2.AddArg(len)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPW, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPW, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGEnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMPS, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMPS, TypeFlags)
v2.AddArg(y)
v2.AddArg(x)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPWU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGEnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMP, TypeFlags)
v2.AddArg(y)
v2.AddArg(x)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPW, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPW, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGTnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMPS, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMPS, TypeFlags)
v2.AddArg(y)
v2.AddArg(x)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPWU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDGTnoinv)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMP, TypeFlags)
v2.AddArg(y)
v2.AddArg(x)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDLT)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPU, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMPU, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSLD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 63
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSLD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 63
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSLD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v2.AuxInt = 63
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSLD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 63
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSLW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMODW)
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMODWU)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMODW)
- v0 := b.NewValue0(v.Line, OpS390XMOVWreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
v.AddArg(y)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMODWU)
- v0 := b.NewValue0(v.Line, OpS390XMOVWZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, config.fe.TypeUInt64())
v0.AddArg(x)
v.AddArg(v0)
v.AddArg(y)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMODW)
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMODWU)
- v0 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(y)
v.AddArg(v1)
return true
}
v.reset(OpS390XMOVBstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, config.fe.TypeUInt8())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
}
v.reset(OpS390XMOVHstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZload, config.fe.TypeUInt16())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, config.fe.TypeUInt16())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
}
v.reset(OpS390XMOVWstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVWZload, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, config.fe.TypeUInt32())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
}
v.reset(OpS390XMOVDstore)
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
v.reset(OpS390XMOVDstore)
v.AuxInt = 8
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v0.AuxInt = 8
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
v.reset(OpS390XMOVDstore)
v.AuxInt = 16
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v0.AuxInt = 16
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, TypeMem)
v1.AuxInt = 8
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v2.AuxInt = 8
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
- v3 := b.NewValue0(v.Line, OpS390XMOVDstore, TypeMem)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVDstore, TypeMem)
v3.AddArg(dst)
- v4 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v4.AddArg(src)
v4.AddArg(mem)
v3.AddArg(v4)
v.reset(OpS390XMOVBstore)
v.AuxInt = 2
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, config.fe.TypeUInt8())
v0.AuxInt = 2
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpS390XMOVHZload, config.fe.TypeUInt16())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, config.fe.TypeUInt16())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
v.reset(OpS390XMOVBstore)
v.AuxInt = 4
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, config.fe.TypeUInt8())
v0.AuxInt = 4
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVWstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpS390XMOVWZload, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, config.fe.TypeUInt32())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
v.reset(OpS390XMOVHstore)
v.AuxInt = 4
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZload, config.fe.TypeUInt16())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, config.fe.TypeUInt16())
v0.AuxInt = 4
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVWstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, TypeMem)
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpS390XMOVWZload, config.fe.TypeUInt32())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, config.fe.TypeUInt32())
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
v.reset(OpS390XMOVBstore)
v.AuxInt = 6
v.AddArg(dst)
- v0 := b.NewValue0(v.Line, OpS390XMOVBZload, config.fe.TypeUInt8())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, config.fe.TypeUInt8())
v0.AuxInt = 6
v0.AddArg(src)
v0.AddArg(mem)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHstore, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, TypeMem)
v1.AuxInt = 4
v1.AddArg(dst)
- v2 := b.NewValue0(v.Line, OpS390XMOVHZload, config.fe.TypeUInt16())
+ v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, config.fe.TypeUInt16())
v2.AuxInt = 4
v2.AddArg(src)
v2.AddArg(mem)
v1.AddArg(v2)
- v3 := b.NewValue0(v.Line, OpS390XMOVWstore, TypeMem)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVWstore, TypeMem)
v3.AddArg(dst)
- v4 := b.NewValue0(v.Line, OpS390XMOVWZload, config.fe.TypeUInt32())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVWZload, config.fe.TypeUInt32())
v4.AddArg(src)
v4.AddArg(mem)
v3.AddArg(v4)
v.AuxInt = makeValAndOff(SizeAndAlign(s).Size()-256, 256)
v.AddArg(dst)
v.AddArg(src)
- v0 := b.NewValue0(v.Line, OpS390XMVC, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMVC, TypeMem)
v0.AuxInt = makeValAndOff(256, 0)
v0.AddArg(dst)
v0.AddArg(src)
v.AuxInt = makeValAndOff(SizeAndAlign(s).Size()-512, 512)
v.AddArg(dst)
v.AddArg(src)
- v0 := b.NewValue0(v.Line, OpS390XMVC, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMVC, TypeMem)
v0.AuxInt = makeValAndOff(256, 256)
v0.AddArg(dst)
v0.AddArg(src)
- v1 := b.NewValue0(v.Line, OpS390XMVC, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMVC, TypeMem)
v1.AuxInt = makeValAndOff(256, 0)
v1.AddArg(dst)
v1.AddArg(src)
v.AuxInt = makeValAndOff(SizeAndAlign(s).Size()-768, 768)
v.AddArg(dst)
v.AddArg(src)
- v0 := b.NewValue0(v.Line, OpS390XMVC, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMVC, TypeMem)
v0.AuxInt = makeValAndOff(256, 512)
v0.AddArg(dst)
v0.AddArg(src)
- v1 := b.NewValue0(v.Line, OpS390XMVC, TypeMem)
+ v1 := b.NewValue0(v.Pos, OpS390XMVC, TypeMem)
v1.AuxInt = makeValAndOff(256, 256)
v1.AddArg(dst)
v1.AddArg(src)
- v2 := b.NewValue0(v.Line, OpS390XMVC, TypeMem)
+ v2 := b.NewValue0(v.Pos, OpS390XMVC, TypeMem)
v2.AuxInt = makeValAndOff(256, 0)
v2.AddArg(dst)
v2.AddArg(src)
v.AuxInt = SizeAndAlign(s).Size() % 256
v.AddArg(dst)
v.AddArg(src)
- v0 := b.NewValue0(v.Line, OpS390XADDconst, src.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XADDconst, src.Type)
v0.AuxInt = (SizeAndAlign(s).Size() / 256) * 256
v0.AddArg(src)
v.AddArg(v0)
for {
x := v.Args[0]
v.reset(OpS390XNEGW)
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
return true
for {
x := v.Args[0]
v.reset(OpS390XNEGW)
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
return true
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMPW, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPW, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMPS, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMPS, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XFCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XFCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
- v3 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v3.AddArg(x)
v2.AddArg(v3)
- v4 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v4.AddArg(y)
v2.AddArg(v4)
v.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XMOVDNE)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = 0
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v1.AuxInt = 1
v.AddArg(v1)
- v2 := b.NewValue0(v.Line, OpS390XCMP, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XCMP, TypeFlags)
v2.AddArg(x)
v2.AddArg(y)
v.AddArg(v2)
off := v.AuxInt
ptr := v.Args[0]
v.reset(OpS390XADD)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = off
v.AddArg(v0)
v.AddArg(ptr)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 15
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 15
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v3.AuxInt = 15
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 15
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v4.AuxInt = 15
- v5 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v5 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v5.AddArg(y)
v4.AddArg(v5)
v3.AddArg(v4)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v4.AuxInt = 15
v4.AddArg(y)
v3.AddArg(v4)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XOR, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XOR, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOT, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOT, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v4.AuxInt = 15
v4.AddArg(y)
v3.AddArg(v4)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVHreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v4.AuxInt = 15
- v5 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v5 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v5.AddArg(y)
v4.AddArg(v5)
v3.AddArg(v4)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v2.AuxInt = 31
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 31
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
v.reset(OpS390XSRAW)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 31
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
v.reset(OpS390XSRAW)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 31
v3.AddArg(y)
v2.AddArg(v3)
v.reset(OpS390XSRAW)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XOR, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XOR, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOT, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOT, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v3.AuxInt = 31
v3.AddArg(y)
v2.AddArg(v3)
v.reset(OpS390XSRAW)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 31
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSRD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 63
- v3 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSRD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 63
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSRD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v2.AuxInt = 63
v2.AddArg(y)
v1.AddArg(v2)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XAND)
- v0 := b.NewValue0(v.Line, OpS390XSRD, t)
+ v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
v0.AddArg(x)
v0.AddArg(y)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, t)
- v2 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, t)
+ v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v2.AuxInt = 63
- v3 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v3.AddArg(y)
v2.AddArg(v3)
v1.AddArg(v2)
v.reset(OpS390XSRAD)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 63
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
v.reset(OpS390XSRAD)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 63
v3.AddArg(y)
v2.AddArg(v3)
v.reset(OpS390XSRAD)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XOR, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XOR, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOT, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOT, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v3.AuxInt = 63
v3.AddArg(y)
v2.AddArg(v3)
v.reset(OpS390XSRAD)
v.Type = t
v.AddArg(x)
- v0 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v0.AddArg(y)
- v1 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v1 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 63
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 7
- v4 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 7
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v3.AuxInt = 7
v3.AddArg(y)
v2.AddArg(v3)
x := v.Args[0]
y := v.Args[1]
v.reset(OpS390XANDW)
- v0 := b.NewValue0(v.Line, OpS390XSRW, t)
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(x)
v0.AddArg(v1)
v0.AddArg(y)
v.AddArg(v0)
- v2 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, t)
- v3 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, t)
+ v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v3.AuxInt = 7
- v4 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v4.AddArg(y)
v3.AddArg(v4)
v2.AddArg(v3)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v4.AuxInt = 7
- v5 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v5 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v5.AddArg(y)
v4.AddArg(v5)
v3.AddArg(v4)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v4.AuxInt = 7
v4.AddArg(y)
v3.AddArg(v4)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XOR, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XOR, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOT, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOT, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v4.AuxInt = 7
v4.AddArg(y)
v3.AddArg(v4)
y := v.Args[1]
v.reset(OpS390XSRAW)
v.Type = t
- v0 := b.NewValue0(v.Line, OpS390XMOVBreg, config.fe.TypeInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, config.fe.TypeInt64())
v0.AddArg(x)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XORW, y.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XORW, y.Type)
v1.AddArg(y)
- v2 := b.NewValue0(v.Line, OpS390XNOTW, y.Type)
- v3 := b.NewValue0(v.Line, OpS390XSUBEWcarrymask, y.Type)
- v4 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v2 := b.NewValue0(v.Pos, OpS390XNOTW, y.Type)
+ v3 := b.NewValue0(v.Pos, OpS390XSUBEWcarrymask, y.Type)
+ v4 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v4.AuxInt = 7
- v5 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v5 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v5.AddArg(y)
v4.AddArg(v5)
v3.AddArg(v4)
break
}
v.reset(OpS390XInvertFlags)
- v0 := b.NewValue0(v.Line, OpS390XCMPconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpS390XCMPconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
v.AddArg(v0)
break
}
v.reset(OpS390XInvertFlags)
- v0 := b.NewValue0(v.Line, OpS390XCMPUconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpS390XCMPUconst, TypeFlags)
v0.AuxInt = int64(uint32(c))
v0.AddArg(x)
v.AddArg(v0)
c := v_0.AuxInt
x := v.Args[1]
v.reset(OpS390XInvertFlags)
- v0 := b.NewValue0(v.Line, OpS390XCMPWconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
v.AddArg(v0)
c := v_0.AuxInt
x := v.Args[1]
v.reset(OpS390XInvertFlags)
- v0 := b.NewValue0(v.Line, OpS390XCMPWUconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpS390XCMPWUconst, TypeFlags)
v0.AuxInt = int64(uint32(c))
v0.AddArg(x)
v.AddArg(v0)
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVBZload, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVBZloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBZloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVBload, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVBload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
v.AddArg(cmp)
return true
}
- // match: (MOVDNE _ y (FlagEQ))
+ // match: (MOVDNE y _ (FlagEQ))
// cond:
// result: y
for {
- y := v.Args[1]
+ y := v.Args[0]
v_2 := v.Args[2]
if v_2.Op != OpS390XFlagEQ {
break
v.AddArg(y)
return true
}
- // match: (MOVDNE x _ (FlagLT))
+ // match: (MOVDNE _ x (FlagLT))
// cond:
// result: x
for {
- x := v.Args[0]
+ x := v.Args[1]
v_2 := v.Args[2]
if v_2.Op != OpS390XFlagLT {
break
v.AddArg(x)
return true
}
- // match: (MOVDNE x _ (FlagGT))
+ // match: (MOVDNE _ x (FlagGT))
// cond:
// result: x
for {
- x := v.Args[0]
+ x := v.Args[1]
v_2 := v.Args[2]
if v_2.Op != OpS390XFlagGT {
break
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVHZload, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVHZloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVHload, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVWZload, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVWZloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
break
}
b = x.Block
- v0 := b.NewValue0(v.Line, OpS390XMOVWload, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWload, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = off
v.AuxInt = ValAndOff(a).Off()
v.Aux = s
v.AddArg(p)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = ValAndOff(c).Val()&0xffffffff | ValAndOff(a).Val()<<32
v.AddArg(v0)
v.AddArg(mem)
break
}
v.reset(OpS390XSUB)
- v0 := b.NewValue0(v.Line, OpS390XSLDconst, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XSLDconst, v.Type)
v0.AuxInt = log2(c + 1)
v0.AddArg(x)
v.AddArg(v0)
break
}
v.reset(OpS390XADD)
- v0 := b.NewValue0(v.Line, OpS390XSLDconst, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XSLDconst, v.Type)
v0.AuxInt = log2(c - 1)
v0.AddArg(x)
v.AddArg(v0)
break
}
v.reset(OpS390XSUBW)
- v0 := b.NewValue0(v.Line, OpS390XSLWconst, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XSLWconst, v.Type)
v0.AuxInt = log2(c + 1)
v0.AddArg(x)
v.AddArg(v0)
break
}
v.reset(OpS390XADDW)
- v0 := b.NewValue0(v.Line, OpS390XSLWconst, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XSLWconst, v.Type)
v0.AuxInt = log2(c - 1)
v0.AddArg(x)
v.AddArg(v0)
break
}
v.reset(OpS390XXOR)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = -1
v.AddArg(v0)
v.AddArg(x)
break
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
- v0 := b.NewValue0(v.Line, OpS390XMOVDBRload, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDBRload, config.fe.TypeUInt64())
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i
break
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
- v0 := b.NewValue0(v.Line, OpS390XMOVDBRloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDBRloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i
break
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
- v0 := b.NewValue0(v.Line, OpS390XMOVDload, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDload, config.fe.TypeUInt64())
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i - 7
break
}
b = mergePoint(b, x0, x1, x2, x3, x4, x5, x6, x7)
- v0 := b.NewValue0(v.Line, OpS390XMOVDloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i - 7
break
}
b = mergePoint(b, x0, x1)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v.reset(OpCopy)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHBRload, config.fe.TypeUInt16())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHBRload, config.fe.TypeUInt16())
v1.AuxInt = i
v1.Aux = s
v1.AddArg(p)
break
}
b = mergePoint(b, x0, x1, x2)
- v0 := b.NewValue0(v.Line, OpS390XMOVWBRload, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWBRload, config.fe.TypeUInt32())
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i
break
}
b = mergePoint(b, x0, x1)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, config.fe.TypeUInt64())
v.reset(OpCopy)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVHBRloadidx, v.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVHBRloadidx, v.Type)
v1.AuxInt = i
v1.Aux = s
v1.AddArg(p)
break
}
b = mergePoint(b, x0, x1, x2)
- v0 := b.NewValue0(v.Line, OpS390XMOVWZreg, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, config.fe.TypeUInt64())
v.reset(OpCopy)
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XMOVWBRloadidx, v.Type)
+ v1 := b.NewValue0(v.Pos, OpS390XMOVWBRloadidx, v.Type)
v1.AuxInt = i
v1.Aux = s
v1.AddArg(p)
break
}
b = mergePoint(b, x0, x1)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZload, config.fe.TypeUInt16())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, config.fe.TypeUInt16())
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i - 1
break
}
b = mergePoint(b, x0, x1, x2)
- v0 := b.NewValue0(v.Line, OpS390XMOVWZload, config.fe.TypeUInt32())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, config.fe.TypeUInt32())
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i - 2
break
}
b = mergePoint(b, x0, x1)
- v0 := b.NewValue0(v.Line, OpS390XMOVHZloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHZloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i - 1
break
}
b = mergePoint(b, x0, x1, x2)
- v0 := b.NewValue0(v.Line, OpS390XMOVWZloadidx, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWZloadidx, v.Type)
v.reset(OpCopy)
v.AddArg(v0)
v0.AuxInt = i - 2
break
}
v.reset(OpS390XNEG)
- v0 := b.NewValue0(v.Line, OpS390XSUBconst, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XSUBconst, v.Type)
v0.AuxInt = c
v0.AddArg(x)
v.AddArg(v0)
c := v_0.AuxInt
x := v.Args[1]
v.reset(OpS390XNEGW)
- v0 := b.NewValue0(v.Line, OpS390XSUBWconst, v.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XSUBWconst, v.Type)
v0.AuxInt = c
v0.AddArg(x)
v.AddArg(v0)
val := v_0.Args[1]
v.reset(OpS390XADDW)
v.AddArg(val)
- v0 := b.NewValue0(v.Line, OpSelect0, t)
+ v0 := b.NewValue0(v.Pos, OpSelect0, t)
v0.AddArg(tuple)
v.AddArg(v0)
return true
val := v_0.Args[1]
v.reset(OpS390XADD)
v.AddArg(val)
- v0 := b.NewValue0(v.Line, OpSelect0, t)
+ v0 := b.NewValue0(v.Pos, OpSelect0, t)
v0.AddArg(tuple)
v.AddArg(v0)
return true
t := v.Type
x := v.Args[0]
v.reset(OpS390XXOR)
- v0 := b.NewValue0(v.Line, OpS390XMOVDconst, config.fe.TypeUInt64())
+ v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, config.fe.TypeUInt64())
v0.AuxInt = -1
v.AddArg(v0)
- v1 := b.NewValue0(v.Line, OpS390XSRADconst, t)
+ v1 := b.NewValue0(v.Pos, OpS390XSRADconst, t)
v1.AuxInt = 63
- v2 := b.NewValue0(v.Line, OpS390XSUBconst, t)
+ v2 := b.NewValue0(v.Pos, OpS390XSUBconst, t)
v2.AuxInt = 1
v2.AddArg(x)
v1.AddArg(v2)
v.reset(OpS390XMOVBstoreconst)
v.AuxInt = makeValAndOff(0, 2)
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpS390XMOVHstoreconst, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVHstoreconst, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpS390XMOVBstoreconst)
v.AuxInt = makeValAndOff(0, 4)
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpS390XMOVWstoreconst, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpS390XMOVHstoreconst)
v.AuxInt = makeValAndOff(0, 4)
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpS390XMOVWstoreconst, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpS390XMOVWstoreconst)
v.AuxInt = makeValAndOff(0, 3)
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpS390XMOVWstoreconst, TypeMem)
+ v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, TypeMem)
v0.AuxInt = 0
v0.AddArg(destptr)
v0.AddArg(mem)
v.reset(OpS390XLoweredZero)
v.AuxInt = SizeAndAlign(s).Size() % 256
v.AddArg(destptr)
- v0 := b.NewValue0(v.Line, OpS390XADDconst, destptr.Type)
+ v0 := b.NewValue0(v.Pos, OpS390XADDconst, destptr.Type)
v0.AuxInt = (SizeAndAlign(s).Size() / 256) * 256
v0.AddArg(destptr)
v.AddArg(v0)
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XNE
- v0 := b.NewValue0(v.Line, OpS390XCMPWconst, TypeFlags)
+ v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, TypeFlags)
v0.AuxInt = 0
- v1 := b.NewValue0(v.Line, OpS390XMOVBZreg, config.fe.TypeUInt64())
+ v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, config.fe.TypeUInt64())
v1.AddArg(cond)
v0.AddArg(v1)
b.SetControl(v0)
package ssa
- import "fmt"
+ import (
+ "cmd/internal/src"
+ "fmt"
+ )
// writebarrier expands write barrier ops (StoreWB, MoveWB, etc.) into
// branches and runtime calls, like
valueLoop:
for i, v := range b.Values {
switch v.Op {
- case OpStoreWB, OpMoveWB, OpMoveWBVolatile:
+ case OpStoreWB, OpMoveWB, OpMoveWBVolatile, OpZeroWB:
if IsStackAddr(v.Args[0]) {
switch v.Op {
case OpStoreWB:
if wbaddr == nil {
// initalize global values for write barrier test and calls
// find SB and SP values in entry block
- initln := f.Entry.Line
+ initln := f.Entry.Pos
for _, v := range f.Entry.Values {
if v.Op == OpSB {
sb = v
defer f.retSparseSet(wbs)
}
- line := v.Line
+ pos := v.Pos
// there may be a sequence of WB stores in the current block. find them.
storeWBs = storeWBs[:0]
bThen := f.NewBlock(BlockPlain)
bElse := f.NewBlock(BlockPlain)
bEnd := f.NewBlock(b.Kind)
- bThen.Line = line
- bElse.Line = line
- bEnd.Line = line
+ bThen.Pos = pos
+ bElse.Pos = pos
+ bEnd.Pos = pos
// set up control flow for end block
bEnd.SetControl(b.Control)
// set up control flow for write barrier test
// load word, test word, avoiding partial register write from load byte.
- flag := b.NewValue2(line, OpLoad, f.Config.fe.TypeUInt32(), wbaddr, mem)
- const0 := f.ConstInt32(line, f.Config.fe.TypeUInt32(), 0)
- flag = b.NewValue2(line, OpNeq32, f.Config.fe.TypeBool(), flag, const0)
+ flag := b.NewValue2(pos, OpLoad, f.Config.fe.TypeUInt32(), wbaddr, mem)
+ const0 := f.ConstInt32(pos, f.Config.fe.TypeUInt32(), 0)
+ flag = b.NewValue2(pos, OpNeq32, f.Config.fe.TypeBool(), flag, const0)
b.Kind = BlockIf
b.SetControl(flag)
b.Likely = BranchUnlikely
}
// then block: emit write barrier call
- memThen = wbcall(line, bThen, fn, typ, ptr, val, memThen, sp, sb, w.Op == OpMoveWBVolatile)
+ memThen = wbcall(pos, bThen, fn, typ, ptr, val, memThen, sp, sb, w.Op == OpMoveWBVolatile)
// else block: normal store
if op == OpZero {
- memElse = bElse.NewValue2I(line, op, TypeMem, siz, ptr, memElse)
+ memElse = bElse.NewValue2I(pos, op, TypeMem, siz, ptr, memElse)
} else {
- memElse = bElse.NewValue3I(line, op, TypeMem, siz, ptr, val, memElse)
+ memElse = bElse.NewValue3I(pos, op, TypeMem, siz, ptr, val, memElse)
}
}
}
if f.Config.fe.Debug_wb() {
- f.Config.Warnl(line, "write barrier")
+ f.Config.Warnl(pos, "write barrier")
}
break valueLoop
// wbcall emits write barrier runtime call in b, returns memory.
// if valIsVolatile, it moves val into temp space before making the call.
- func wbcall(line int32, b *Block, fn interface{}, typ interface{}, ptr, val, mem, sp, sb *Value, valIsVolatile bool) *Value {
+ func wbcall(pos src.XPos, b *Block, fn interface{}, typ interface{}, ptr, val, mem, sp, sb *Value, valIsVolatile bool) *Value {
config := b.Func.Config
var tmp GCNode
t := val.Type.ElemType()
tmp = config.fe.Auto(t)
aux := &AutoSymbol{Typ: t, Node: tmp}
- mem = b.NewValue1A(line, OpVarDef, TypeMem, tmp, mem)
- tmpaddr := b.NewValue1A(line, OpAddr, t.PtrTo(), aux, sp)
+ mem = b.NewValue1A(pos, OpVarDef, TypeMem, tmp, mem)
+ tmpaddr := b.NewValue1A(pos, OpAddr, t.PtrTo(), aux, sp)
siz := MakeSizeAndAlign(t.Size(), t.Alignment()).Int64()
- mem = b.NewValue3I(line, OpMove, TypeMem, siz, tmpaddr, val, mem)
+ mem = b.NewValue3I(pos, OpMove, TypeMem, siz, tmpaddr, val, mem)
val = tmpaddr
}
off := config.ctxt.FixedFrameSize()
if typ != nil { // for typedmemmove
- taddr := b.NewValue1A(line, OpAddr, config.fe.TypeUintptr(), typ, sb)
+ taddr := b.NewValue1A(pos, OpAddr, config.fe.TypeUintptr(), typ, sb)
off = round(off, taddr.Type.Alignment())
- arg := b.NewValue1I(line, OpOffPtr, taddr.Type.PtrTo(), off, sp)
- mem = b.NewValue3I(line, OpStore, TypeMem, ptr.Type.Size(), arg, taddr, mem)
+ arg := b.NewValue1I(pos, OpOffPtr, taddr.Type.PtrTo(), off, sp)
+ mem = b.NewValue3I(pos, OpStore, TypeMem, ptr.Type.Size(), arg, taddr, mem)
off += taddr.Type.Size()
}
off = round(off, ptr.Type.Alignment())
- arg := b.NewValue1I(line, OpOffPtr, ptr.Type.PtrTo(), off, sp)
- mem = b.NewValue3I(line, OpStore, TypeMem, ptr.Type.Size(), arg, ptr, mem)
+ arg := b.NewValue1I(pos, OpOffPtr, ptr.Type.PtrTo(), off, sp)
+ mem = b.NewValue3I(pos, OpStore, TypeMem, ptr.Type.Size(), arg, ptr, mem)
off += ptr.Type.Size()
if val != nil {
off = round(off, val.Type.Alignment())
- arg = b.NewValue1I(line, OpOffPtr, val.Type.PtrTo(), off, sp)
- mem = b.NewValue3I(line, OpStore, TypeMem, val.Type.Size(), arg, val, mem)
+ arg = b.NewValue1I(pos, OpOffPtr, val.Type.PtrTo(), off, sp)
+ mem = b.NewValue3I(pos, OpStore, TypeMem, val.Type.Size(), arg, val, mem)
off += val.Type.Size()
}
off = round(off, config.PtrSize)
// issue call
- mem = b.NewValue1A(line, OpStaticCall, TypeMem, fn, mem)
+ mem = b.NewValue1A(pos, OpStaticCall, TypeMem, fn, mem)
mem.AuxInt = off - config.ctxt.FixedFrameSize()
if valIsVolatile {
- mem = b.NewValue1A(line, OpVarKill, TypeMem, tmp, mem) // mark temp dead
+ mem = b.NewValue1A(pos, OpVarKill, TypeMem, tmp, mem) // mark temp dead
}
return mem
package syntax
+ import "cmd/internal/src"
+
// ----------------------------------------------------------------------------
// Nodes
type Node interface {
- Line() uint32
+ Pos() src.Pos
aNode()
init(p *parser)
}
type node struct {
// commented out for now since not yet used
// doc *Comment // nil means no comment(s) attached
- pos uint32
- line uint32
+ pos src.Pos
}
- func (*node) aNode() {}
-
- func (n *node) Line() uint32 {
- return n.line
+ func (n *node) Pos() src.Pos {
+ return n.pos
}
+ func (*node) aNode() {}
+
+ // TODO(gri) we may be able to get rid of init here and in Node
func (n *node) init(p *parser) {
- n.pos = uint32(p.pos)
- n.line = uint32(p.line)
+ n.pos = p.pos()
}
// ----------------------------------------------------------------------------
type File struct {
PkgName *Name
DeclList []Decl
- Lines int
+ Lines uint
node
}
// Name Type
TypeDecl struct {
Name *Name
+ Alias bool
Type Expr
Group *Group // nil means not part of a group
Pragma Pragma
Type *FuncType
Body []Stmt // nil means no body (forward declaration)
Pragma Pragma // TODO(mdempsky): Cleaner solution.
- EndLine uint32 // TODO(mdempsky): Cleaner solution.
+ EndLine uint // TODO(mdempsky): Cleaner solution.
decl
}
)
CompositeLit struct {
Type Expr // nil means no literal type
ElemList []Expr
- NKeys int // number of elements with keys
- EndLine uint32 // TODO(mdempsky): Cleaner solution.
+ NKeys int // number of elements with keys
+ EndLine uint // TODO(mdempsky): Cleaner solution.
expr
}
FuncLit struct {
Type *FuncType
Body []Stmt
- EndLine uint32 // TODO(mdempsky): Cleaner solution.
+ EndLine uint // TODO(mdempsky): Cleaner solution.
expr
}
package syntax
import (
+ "cmd/internal/src"
"fmt"
"io"
+ "strconv"
"strings"
)
const gcCompat = true
type parser struct {
+ base *src.PosBase
+ errh ErrorHandler
scanner
+ first error // first error encountered
+ pragma Pragma // pragma flags
+
fnest int // function nesting level (for error handling)
xnest int // expression nesting level (for complit ambiguity resolution)
indent []byte // tracing support
}
- func (p *parser) init(src io.Reader, errh ErrorHandler, pragh PragmaHandler) {
- p.scanner.init(src, errh, pragh)
+ func (p *parser) init(base *src.PosBase, r io.Reader, errh ErrorHandler, pragh PragmaHandler) {
+ p.base = base
+ p.errh = errh
+ p.scanner.init(
+ r,
+ // Error and pragma handlers for scanner.
+ // Because the (line, col) positions passed to these
+ // handlers are always at or after the current reading
+ // position, it is save to use the most recent position
+ // base to compute the corresponding Pos value.
+ func(line, col uint, msg string) {
+ p.error_at(p.pos_at(line, col), msg)
+ },
+ func(line, col uint, text string) {
+ if strings.HasPrefix(text, "line ") {
+ p.updateBase(line, col+5, text[5:])
+ return
+ }
+ if pragh != nil {
+ p.pragma |= pragh(p.pos_at(line, col), text)
+ }
+ },
+ )
+
+ p.first = nil
+ p.pragma = 0
p.fnest = 0
p.xnest = 0
p.indent = nil
}
+ const lineMax = 1<<24 - 1 // TODO(gri) this limit is defined for src.Pos - fix
+
+ func (p *parser) updateBase(line, col uint, text string) {
+ // Want to use LastIndexByte below but it's not defined in Go1.4 and bootstrap fails.
+ i := strings.LastIndex(text, ":") // look from right (Windows filenames may contain ':')
+ if i < 0 {
+ return // ignore (not a line directive)
+ }
+ nstr := text[i+1:]
+ n, err := strconv.Atoi(nstr)
+ if err != nil || n <= 0 || n > lineMax {
+ p.error_at(p.pos_at(line, col+uint(i+1)), "invalid line number: "+nstr)
+ return
+ }
+ p.base = src.NewLinePragmaBase(src.MakePos(p.base.Pos().Base(), line, col), text[:i], uint(n))
+ }
+
func (p *parser) got(tok token) bool {
if p.tok == tok {
p.next()
// ----------------------------------------------------------------------------
// Error handling
- // syntax_error reports a syntax error at the current line.
- func (p *parser) syntax_error(msg string) {
- p.syntax_error_at(p.pos, p.line, msg)
+ // pos_at returns the Pos value for (line, col) and the current position base.
+ func (p *parser) pos_at(line, col uint) src.Pos {
+ return src.MakePos(p.base, line, col)
}
- // Like syntax_error, but reports error at given line rather than current lexer line.
- func (p *parser) syntax_error_at(pos, line int, msg string) {
+ // error reports an error at the given position.
+ func (p *parser) error_at(pos src.Pos, msg string) {
+ err := Error{pos, msg}
+ if p.first == nil {
+ p.first = err
+ }
+ if p.errh == nil {
+ panic(p.first)
+ }
+ p.errh(err)
+ }
+
+ // syntax_error_at reports a syntax error at the given position.
+ func (p *parser) syntax_error_at(pos src.Pos, msg string) {
if trace {
defer p.trace("syntax_error (" + msg + ")")()
}
msg = ", " + msg
default:
// plain error - we don't care about current token
- p.error_at(pos, line, "syntax error: "+msg)
+ p.error_at(pos, "syntax error: "+msg)
return
}
tok = tokstring(p.tok)
}
- p.error_at(pos, line, "syntax error: unexpected "+tok+msg)
+ p.error_at(pos, "syntax error: unexpected "+tok+msg)
}
+ // Convenience methods using the current token position.
+ func (p *parser) pos() src.Pos { return p.pos_at(p.line, p.col) }
+ func (p *parser) error(msg string) { p.error_at(p.pos(), msg) }
+ func (p *parser) syntax_error(msg string) { p.syntax_error_at(p.pos(), msg) }
+
// The stopset contains keywords that start a statement.
// They are good synchronization points in case of syntax
// errors and (usually) shouldn't be skipped over.
return d
}
-// TypeSpec = identifier Type .
+// TypeSpec = identifier [ "=" ] Type .
func (p *parser) typeDecl(group *Group) Decl {
if trace {
defer p.trace("typeDecl")()
d.init(p)
d.Name = p.name()
+ d.Alias = p.got(_Assign)
d.Type = p.tryType()
if d.Type == nil {
p.syntax_error("in type declaration")
f.Body = p.funcBody()
f.Pragma = p.pragma
- f.EndLine = uint32(p.line)
+ f.EndLine = p.line
// TODO(gri) deal with function properties
// if noescape && body != nil {
f.init(p)
f.Type = t
f.Body = p.funcBody()
- f.EndLine = uint32(p.line)
+ f.EndLine = p.line
p.xnest--
p.fnest--
return f
}
}
- x.EndLine = uint32(p.line)
+ x.EndLine = p.line
p.xnest--
p.want(_Rbrace)
p.want(_Rparen)
tag := p.oliteral()
p.addField(styp, nil, typ, tag)
- p.error("cannot parenthesize embedded type")
+ p.syntax_error("cannot parenthesize embedded type")
} else {
// '(' embed ')' oliteral
p.want(_Rparen)
tag := p.oliteral()
p.addField(styp, nil, typ, tag)
- p.error("cannot parenthesize embedded type")
+ p.syntax_error("cannot parenthesize embedded type")
}
case _Star:
p.want(_Rparen)
tag := p.oliteral()
p.addField(styp, nil, typ, tag)
- p.error("cannot parenthesize embedded type")
+ p.syntax_error("cannot parenthesize embedded type")
} else {
// '*' embed oliteral
f.init(p)
f.Type = p.qualifiedName(nil)
p.want(_Rparen)
- p.error("cannot parenthesize embedded type")
+ p.syntax_error("cannot parenthesize embedded type")
return f
default:
p.want(_DotDotDot)
t.Elem = p.tryType()
if t.Elem == nil {
- p.error("final argument in variadic function missing type")
+ p.syntax_error("final argument in variadic function missing type")
}
return t
s.Stmt = p.stmt()
if s.Stmt == missing_stmt {
// report error at line of ':' token
- p.syntax_error_at(int(label.pos), int(label.line), "missing statement after label")
+ p.syntax_error_at(label.Pos(), "missing statement after label")
// we are already at the end of the labeled statement - no need to advance
return missing_stmt
}
if p.tok != _Semi {
// accept potential varDecl but complain
if forStmt && p.got(_Var) {
- p.error("var declaration not allowed in for initializer")
+ p.syntax_error("var declaration not allowed in for initializer")
}
init = p.simpleStmt(nil, forStmt)
// If we have a range clause, we are done.
p.want(_If)
s.Init, s.Cond, _ = p.header(false)
if s.Cond == nil {
- p.error("missing condition in if statement")
+ p.syntax_error("missing condition in if statement")
}
if gcCompat {
case _Lbrace:
s.Else = p.blockStmt()
default:
- p.error("else must be followed by if or statement block")
+ p.syntax_error("else must be followed by if or statement block")
p.advance(_Name, _Rbrace)
}
}
list = append(list, p.expr())
}
t := new(ListExpr)
- t.init(p) // TODO(gri) what is the correct thing here?
+ t.pos = x.Pos()
t.ElemList = list
x = t
}
t.Skip("skipping test in short mode")
}
- ast, err := ParseFile(*src, nil, nil, 0)
+ ast, err := ParseFile(*src_, nil, nil, 0)
if err != nil {
t.Fatal(err)
}
Fprint(os.Stdout, ast, true)
fmt.Println()
}
- ast, err := ParseBytes([]byte(want), nil, nil, 0)
+
+func TestPrintString(t *testing.T) {
+ for _, want := range []string{
+ "package p",
+ "package p; type _ = int; type T1 = struct{}; type ( _ = *struct{}; T2 = float32 )",
+ // TODO(gri) expand
+ } {
++ ast, err := ParseBytes(nil, []byte(want), nil, nil, 0)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
+ if got := String(ast); got != want {
+ t.Errorf("%q: got %q", want, got)
+ }
+ }
+}
import (
"cmd/internal/obj"
"cmd/internal/sys"
+ "encoding/binary"
"fmt"
"math"
)
// code will not see a half-updated stack frame.
q = obj.Appendp(ctxt, q)
q.As = mov
- q.Lineno = p.Lineno
+ q.Pos = p.Pos
q.From.Type = obj.TYPE_REG
q.From.Reg = REGLINK
q.To.Type = obj.TYPE_MEM
q = obj.Appendp(ctxt, q)
q.As = add
- q.Lineno = p.Lineno
+ q.Pos = p.Pos
q.From.Type = obj.TYPE_CONST
q.From.Offset = int64(-autosize)
q.To.Type = obj.TYPE_REG
q = ctxt.NewProg()
q.As = AJMP
- q.Lineno = p.Lineno
+ q.Pos = p.Pos
q.To.Type = obj.TYPE_MEM
q.To.Offset = 0
q.To.Reg = REGLINK
if autosize != 0 {
q = ctxt.NewProg()
q.As = add
- q.Lineno = p.Lineno
+ q.Pos = p.Pos
q.From.Type = obj.TYPE_CONST
q.From.Offset = int64(autosize)
q.To.Type = obj.TYPE_REG
q1 = ctxt.NewProg()
q1.As = AJMP
- q1.Lineno = p.Lineno
+ q1.Pos = p.Pos
if retSym != nil { // retjmp
q1.To.Type = obj.TYPE_BRANCH
q1.To.Name = obj.NAME_EXTERN
}
}
+ if ctxt.Mode&Mips32 != 0 {
+ // rewrite MOVD into two MOVF in 32-bit mode to avoid unaligned memory access
+ for p = cursym.Text; p != nil; p = p1 {
+ p1 = p.Link
+
+ if p.As != AMOVD {
+ continue
+ }
+ if p.From.Type != obj.TYPE_MEM && p.To.Type != obj.TYPE_MEM {
+ continue
+ }
+
+ p.As = AMOVF
+ q = ctxt.NewProg()
+ *q = *p
+ q.Link = p.Link
+ p.Link = q
+ p1 = q.Link
+
+ var regOff int16
+ if ctxt.Arch.ByteOrder == binary.BigEndian {
+ regOff = 1 // load odd register first
+ }
+ if p.From.Type == obj.TYPE_MEM {
+ reg := REG_F0 + (p.To.Reg-REG_F0)&^1
+ p.To.Reg = reg + regOff
+ q.To.Reg = reg + 1 - regOff
+ q.From.Offset += 4
+ } else if p.To.Type == obj.TYPE_MEM {
+ reg := REG_F0 + (p.From.Reg-REG_F0)&^1
+ p.From.Reg = reg + regOff
+ q.From.Reg = reg + 1 - regOff
+ q.To.Offset += 4
+ }
+ }
+ }
+
if nosched {
// if we don't do instruction scheduling, simply add
// NOP after each branch instruction.
// as R0, we have to resort to manually encode the SLL
// instruction as WORD $0.
q.As = AWORD
- q.Lineno = p.Lineno
+ q.Pos = p.Pos
q.From.Type = obj.TYPE_CONST
q.From.Name = obj.NAME_NONE
q.From.Offset = 0
a = AJMP
q = ctxt.NewProg()
q.As = a
- q.Lineno = p.Lineno
+ q.Pos = p.Pos
q.To.Type = obj.TYPE_BRANCH
q.To.Offset = p.Pc
q.Pcond = p
import "log"
-func addvarint(ctxt *Link, d *Pcdata, val uint32) {
- var v uint32
- for v = val; v >= 0x80; v >>= 7 {
+func addvarint(d *Pcdata, v uint32) {
+ for ; v >= 0x80; v >>= 7 {
d.P = append(d.P, uint8(v|0x80))
}
d.P = append(d.P, uint8(v))
}
if started != 0 {
- addvarint(ctxt, dst, uint32((p.Pc-pc)/int64(ctxt.Arch.MinLC)))
+ addvarint(dst, uint32((p.Pc-pc)/int64(ctxt.Arch.MinLC)))
pc = p.Pc
}
} else {
delta <<= 1
}
- addvarint(ctxt, dst, delta)
+ addvarint(dst, delta)
oldval = val
started = 1
val = valfunc(ctxt, func_, val, p, 1, arg)
if ctxt.Debugpcln != 0 {
ctxt.Logf("%6x done\n", uint64(func_.Text.Pc+func_.Size))
}
- addvarint(ctxt, dst, uint32((func_.Size-pc)/int64(ctxt.Arch.MinLC)))
- addvarint(ctxt, dst, 0) // terminator
+ addvarint(dst, uint32((func_.Size-pc)/int64(ctxt.Arch.MinLC)))
+ addvarint(dst, 0) // terminator
}
if ctxt.Debugpcln != 0 {
// pctofileline computes either the file number (arg == 0)
// or the line number (arg == 1) to use at p.
- // Because p->lineno applies to p, phase == 0 (before p)
+ // Because p.Pos applies to p, phase == 0 (before p)
// takes care of the update.
func pctofileline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
- if p.As == ATEXT || p.As == ANOP || p.As == AUSEFIELD || p.Lineno == 0 || phase == 1 {
+ if p.As == ATEXT || p.As == ANOP || p.As == AUSEFIELD || p.Pos.Line() == 0 || phase == 1 {
return oldval
}
- f, l := linkgetline(ctxt, p.Lineno)
+ f, l := linkgetlineFromPos(ctxt, p.Pos)
if f == nil {
// print("getline failed for %s %v\n", ctxt->cursym->name, p);
return oldval