aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/location.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/ssa/location.go')
-rw-r--r--src/cmd/compile/internal/ssa/location.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/location.go b/src/cmd/compile/internal/ssa/location.go
index 70afa47e9d..dc01bd4235 100644
--- a/src/cmd/compile/internal/ssa/location.go
+++ b/src/cmd/compile/internal/ssa/location.go
@@ -26,6 +26,12 @@ func (r *Register) Name() string {
return r.name
}
+// ObjNum returns the register number from cmd/internal/obj/$ARCH that
+// corresponds to this register.
+func (r *Register) ObjNum() int16 {
+ return r.objNum
+}
+
// A LocalSlot is a location in the stack frame, which identifies and stores
// part or all of a PPARAM, PPARAMOUT, or PAUTO ONAME node.
// It can represent a whole variable, part of a larger stack slot, or part of a