Skip to content

Commit 5bbac66

Browse files
randall77gopherbot
authored andcommitted
runtime: increase freebsd/amd64 pointer size from 48 to 57 bits
Because freebsd is now enabling la57 by default. Fixes #49405 Change-Id: I30f7bac8b8a9baa85e0c097e06072c19ad474e5a Reviewed-on: https://go-review.googlesource.com/c/go/+/670715 Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent c62099c commit 5bbac66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/runtime/tagptr_64bit.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ const (
3434
// We use one bit to distinguish between the two ranges.
3535
aixAddrBits = 57
3636

37+
// Later versions of FreeBSD enable amd64's la57 by default.
38+
freebsdAmd64AddrBits = 57
39+
3740
// riscv64 SV57 mode gives 56 bits of userspace VA.
3841
// tagged pointer code supports it,
3942
// but broader support for SV57 mode is incomplete,
4043
// and there may be other issues (see #54104).
4144
riscv64AddrBits = 56
4245

43-
addrBits = goos.IsAix*aixAddrBits + goarch.IsRiscv64*riscv64AddrBits + (1-goos.IsAix)*(1-goarch.IsRiscv64)*defaultAddrBits
46+
addrBits = goos.IsAix*aixAddrBits + goarch.IsRiscv64*riscv64AddrBits + goos.IsFreebsd*goarch.IsAmd64*freebsdAmd64AddrBits + (1-goos.IsAix)*(1-goarch.IsRiscv64)*(1-goos.IsFreebsd*goarch.IsAmd64)*defaultAddrBits
4447

4548
// In addition to the 16 bits (or other, depending on arch/os) taken from the top,
4649
// we can take 9 from the bottom, because we require pointers to be well-aligned

0 commit comments

Comments
 (0)