Source file src/cmd/compile/internal/ssa/ssabase/location.go

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package ssabase
     6  
     7  // A Register is a machine register, like AX.
     8  // They are numbered densely from 0 (for each architecture).
     9  type Register struct {
    10  	Num    int32 // dense numbering
    11  	ObjNum int16 // register number from cmd/internal/obj/$ARCH
    12  	Name   string
    13  }
    14  
    15  func (r *Register) String() string {
    16  	return r.Name
    17  }
    18  

View as plain text