mirror of
				https://github.com/golang/go.git
				synced 2025-10-31 16:50:58 +00:00 
			
		
		
		
	[dev.garbage] all: merge dev.power64 (5ad5e85cfb99) into dev.garbage
The goal here is to get the big-endian fixes so that in some upcoming code movement for write barriers I don't make them unmergeable. LGTM=rlh R=rlh CC=golang-codereviews https://golang.org/cl/166890043
This commit is contained in:
		
						commit
						d6f4e5020b
					
				
					 158 changed files with 39414 additions and 2818 deletions
				
			
		|  | @ -4,9 +4,7 @@ | |||
| 
 | ||||
| package runtime | ||||
| 
 | ||||
| import ( | ||||
| 	"unsafe" | ||||
| ) | ||||
| import "unsafe" | ||||
| 
 | ||||
| const ( | ||||
| 	debugMalloc = false | ||||
|  | @ -261,8 +259,10 @@ func mallocgc(size uintptr, typ *_type, flags int) unsafe.Pointer { | |||
| 				goto marked | ||||
| 			} | ||||
| 			ptrmask = (*uint8)(unsafe.Pointer(uintptr(typ.gc[0]))) | ||||
| 			// Check whether the program is already unrolled. | ||||
| 			if uintptr(atomicloadp(unsafe.Pointer(ptrmask)))&0xff == 0 { | ||||
| 			// Check whether the program is already unrolled | ||||
| 			// by checking if the unroll flag byte is set | ||||
| 			maskword := uintptr(atomicloadp(unsafe.Pointer(ptrmask))) | ||||
| 			if *(*uint8)(unsafe.Pointer(&maskword)) == 0 { | ||||
| 				mp := acquirem() | ||||
| 				mp.ptrarg[0] = unsafe.Pointer(typ) | ||||
| 				onM(unrollgcprog_m) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Russ Cox
						Russ Cox