mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	vendor: update buildkit to 539be170
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
		
							
								
								
									
										1
									
								
								vendor/golang.org/x/sys/cpu/cpu.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/golang.org/x/sys/cpu/cpu.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -56,6 +56,7 @@ var X86 struct {
 | 
			
		||||
	HasAVX512BF16       bool // Advanced vector extension 512 BFloat16 Instructions
 | 
			
		||||
	HasBMI1             bool // Bit manipulation instruction set 1
 | 
			
		||||
	HasBMI2             bool // Bit manipulation instruction set 2
 | 
			
		||||
	HasCX16             bool // Compare and exchange 16 Bytes
 | 
			
		||||
	HasERMS             bool // Enhanced REP for MOVSB and STOSB
 | 
			
		||||
	HasFMA              bool // Fused-multiply-add instructions
 | 
			
		||||
	HasOSXSAVE          bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -39,6 +39,7 @@ func initOptions() {
 | 
			
		||||
		{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
 | 
			
		||||
		{Name: "bmi1", Feature: &X86.HasBMI1},
 | 
			
		||||
		{Name: "bmi2", Feature: &X86.HasBMI2},
 | 
			
		||||
		{Name: "cx16", Feature: &X86.HasCX16},
 | 
			
		||||
		{Name: "erms", Feature: &X86.HasERMS},
 | 
			
		||||
		{Name: "fma", Feature: &X86.HasFMA},
 | 
			
		||||
		{Name: "osxsave", Feature: &X86.HasOSXSAVE},
 | 
			
		||||
@@ -73,6 +74,7 @@ func archInit() {
 | 
			
		||||
	X86.HasPCLMULQDQ = isSet(1, ecx1)
 | 
			
		||||
	X86.HasSSSE3 = isSet(9, ecx1)
 | 
			
		||||
	X86.HasFMA = isSet(12, ecx1)
 | 
			
		||||
	X86.HasCX16 = isSet(13, ecx1)
 | 
			
		||||
	X86.HasSSE41 = isSet(19, ecx1)
 | 
			
		||||
	X86.HasSSE42 = isSet(20, ecx1)
 | 
			
		||||
	X86.HasPOPCNT = isSet(23, ecx1)
 | 
			
		||||
@@ -88,9 +90,10 @@ func archInit() {
 | 
			
		||||
		osSupportsAVX = isSet(1, eax) && isSet(2, eax)
 | 
			
		||||
 | 
			
		||||
		if runtime.GOOS == "darwin" {
 | 
			
		||||
			// Check darwin commpage for AVX512 support. Necessary because:
 | 
			
		||||
			// https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L175-L201
 | 
			
		||||
			osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()
 | 
			
		||||
			// Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
 | 
			
		||||
			// Since users can't rely on mask register contents, let's not advertise AVX-512 support.
 | 
			
		||||
			// See issue 49233.
 | 
			
		||||
			osSupportsAVX512 = false
 | 
			
		||||
		} else {
 | 
			
		||||
			// Check if OPMASK and ZMM registers have OS support.
 | 
			
		||||
			osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.s
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								vendor/golang.org/x/sys/cpu/cpu_x86.s
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -26,27 +26,3 @@ TEXT ·xgetbv(SB),NOSPLIT,$0-8
 | 
			
		||||
	MOVL AX, eax+0(FP)
 | 
			
		||||
	MOVL DX, edx+4(FP)
 | 
			
		||||
	RET
 | 
			
		||||
 | 
			
		||||
// func darwinSupportsAVX512() bool
 | 
			
		||||
TEXT ·darwinSupportsAVX512(SB), NOSPLIT, $0-1
 | 
			
		||||
    MOVB    $0, ret+0(FP) // default to false
 | 
			
		||||
#ifdef GOOS_darwin   // return if not darwin
 | 
			
		||||
#ifdef GOARCH_amd64  // return if not amd64
 | 
			
		||||
// These values from:
 | 
			
		||||
// https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/osfmk/i386/cpu_capabilities.h
 | 
			
		||||
#define commpage64_base_address         0x00007fffffe00000
 | 
			
		||||
#define commpage64_cpu_capabilities64   (commpage64_base_address+0x010)
 | 
			
		||||
#define commpage64_version              (commpage64_base_address+0x01E)
 | 
			
		||||
#define hasAVX512F                      0x0000004000000000
 | 
			
		||||
    MOVQ    $commpage64_version, BX
 | 
			
		||||
    CMPW    (BX), $13  // cpu_capabilities64 undefined in versions < 13
 | 
			
		||||
    JL      no_avx512
 | 
			
		||||
    MOVQ    $commpage64_cpu_capabilities64, BX
 | 
			
		||||
    MOVQ    $hasAVX512F, CX
 | 
			
		||||
    TESTQ   (BX), CX
 | 
			
		||||
    JZ      no_avx512
 | 
			
		||||
    MOVB    $1, ret+0(FP)
 | 
			
		||||
no_avx512:
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
    RET
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user