aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/util.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2015-11-16 13:20:16 -0800
committerKeith Randall <khr@golang.org>2015-11-16 17:19:42 -0800
commit4304fbc4d0e024d948ef637d19d89b0b6359788f (patch)
treee178b3d8220239ad50be4ce974b965533950c775 /src/cmd/internal/obj/util.go
parent75102afce77f1376b0aab3f1d5fee9b881d0f68a (diff)
parent2c11164db52bca183da4c3ac09ceac7565835d53 (diff)
downloadgo-4304fbc4d0e024d948ef637d19d89b0b6359788f.tar.xz
[dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranch
Conflicts: src/cmd/compile/internal/gc/racewalk.go src/cmd/internal/obj/stack.go src/cmd/internal/obj/x86/obj6.go src/runtime/stack.go test/nilptr3.go test/nosplit.go Change-Id: Ie6053eb1577fd73e8243651f25c0f1fc765ae660
Diffstat (limited to 'src/cmd/internal/obj/util.go')
-rw-r--r--src/cmd/internal/obj/util.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
index a71d69edfc..5846470702 100644
--- a/src/cmd/internal/obj/util.go
+++ b/src/cmd/internal/obj/util.go
@@ -53,6 +53,10 @@ func Binitw(w io.Writer) *Biobuf {
return &Biobuf{w: bufio.NewWriter(w)}
}
+func Binitr(r io.Reader) *Biobuf {
+ return &Biobuf{r: bufio.NewReader(r)}
+}
+
func (b *Biobuf) Write(p []byte) (int, error) {
return b.w.Write(p)
}
@@ -523,11 +527,12 @@ var regSpace []regSet
const (
// Because of masking operations in the encodings, each register
// space should start at 0 modulo some power of 2.
- RBase386 = 1 * 1024
- RBaseAMD64 = 2 * 1024
- RBaseARM = 3 * 1024
- RBasePPC64 = 4 * 1024 // range [4k, 8k)
- RBaseARM64 = 8 * 1024 // range [8k, 12k)
+ RBase386 = 1 * 1024
+ RBaseAMD64 = 2 * 1024
+ RBaseARM = 3 * 1024
+ RBasePPC64 = 4 * 1024 // range [4k, 8k)
+ RBaseARM64 = 8 * 1024 // range [8k, 13k)
+ RBaseMIPS64 = 13 * 1024 // range [13k, 16k)
)
// RegisterRegister binds a pretty-printer (Rconv) for register
@@ -587,6 +592,7 @@ const (
ABaseAMD64
ABasePPC64
ABaseARM64
+ ABaseMIPS64
AMask = 1<<12 - 1 // AND with this to use the opcode as an array index.
)