[gcc/devel/gccgo] runtime: fix arenaBaseOffset for aix/ppc

Ian Lance Taylor ian@gcc.gnu.org
Sun Jul 12 19:32:29 GMT 2020


https://gcc.gnu.org/g:75452d68672ff7da6e5a167924b6aeb07b5b2ed1

commit 75452d68672ff7da6e5a167924b6aeb07b5b2ed1
Author: Clément Chigot <chigot.c@gmail.com>
Date:   Tue Jun 9 11:36:01 2020 +0200

    runtime: fix arenaBaseOffset for aix/ppc
    
    The arenaBaseOffset modifications was aimed only for aix/ppc64.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/237038

Diff:
---
 gcc/go/gofrontend/MERGE         | 2 +-
 libgo/go/runtime/export_test.go | 2 +-
 libgo/go/runtime/malloc.go      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 284374820b0..c8b78bfda04 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-ea58b8491064fbed18a220571a3043c38dccf7c7
+74199467ea912138c1b76e9a156bb47886be1436
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/go/runtime/export_test.go b/libgo/go/runtime/export_test.go
index 6595fafe368..ab74e34d611 100644
--- a/libgo/go/runtime/export_test.go
+++ b/libgo/go/runtime/export_test.go
@@ -866,7 +866,7 @@ func FreePageAlloc(pp *PageAlloc) {
 //
 // This should not be higher than 0x100*pallocChunkBytes to support
 // mips and mipsle, which only have 31-bit address spaces.
-var BaseChunkIdx = ChunkIdx(chunkIndex(((0xc000*pageAlloc64Bit + 0x100*pageAlloc32Bit) * pallocChunkBytes) + 0x0a00000000000000*sys.GoosAix))
+var BaseChunkIdx = ChunkIdx(chunkIndex(((0xc000*pageAlloc64Bit + 0x100*pageAlloc32Bit) * pallocChunkBytes) + 0x0a00000000000000*sys.GoosAix*sys.GoarchPpc64))
 
 // PageBase returns an address given a chunk index and a page index
 // relative to that chunk.
diff --git a/libgo/go/runtime/malloc.go b/libgo/go/runtime/malloc.go
index 266f5eba747..6df7eaa53bb 100644
--- a/libgo/go/runtime/malloc.go
+++ b/libgo/go/runtime/malloc.go
@@ -312,7 +312,7 @@ const (
 	//
 	// On other platforms, the user address space is contiguous
 	// and starts at 0, so no offset is necessary.
-	arenaBaseOffset = sys.GoarchAmd64*(1<<47) + (^0x0a00000000000000+1)&uintptrMask*sys.GoosAix
+	arenaBaseOffset = sys.GoarchAmd64*(1<<47) + (^0x0a00000000000000+1)&uintptrMask*sys.GoosAix*sys.GoarchPpc64
 
 	// Max number of threads to run garbage collection.
 	// 2, 3, and 4 are all plausible maximums depending


More information about the Gcc-cvs mailing list