diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2019-10-09 16:22:47 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-10-09 22:34:34 +0000 |
commit | 07b4abd62e450f19c47266b3a526df49c01ba425 (patch) | |
tree | f36075bd2f2c2149744ca1bd2fb22fecf742fd87 /src/hash | |
parent | 19a7490e568824302b271f6e27dde3f1cd92ffc7 (diff) | |
download | go-07b4abd62e450f19c47266b3a526df49c01ba425.tar.gz go-07b4abd62e450f19c47266b3a526df49c01ba425.zip |
all: remove the nacl port (part 2, amd64p32 + toolchain)
This is part two if the nacl removal. Part 1 was CL 199499.
This CL removes amd64p32 support, which might be useful in the future
if we implement the x32 ABI. It also removes the nacl bits in the
toolchain, and some remaining nacl bits.
Updates #30439
Change-Id: I2475d5bb066d1b474e00e40d95b520e7c2e286e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/200077
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/hash')
-rw-r--r-- | src/hash/crc32/crc32_amd64p32.go | 37 | ||||
-rw-r--r-- | src/hash/crc32/crc32_amd64p32.s | 53 |
2 files changed, 0 insertions, 90 deletions
diff --git a/src/hash/crc32/crc32_amd64p32.go b/src/hash/crc32/crc32_amd64p32.go deleted file mode 100644 index 1ec44cb496..0000000000 --- a/src/hash/crc32/crc32_amd64p32.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package crc32 - -import "internal/cpu" - -// This file contains the code to call the SSE 4.2 version of the Castagnoli -// CRC. - -// castagnoliSSE42 is defined in crc32_amd64p32.s and uses the SSE4.2 CRC32 -// instruction. -//go:noescape -func castagnoliSSE42(crc uint32, p []byte) uint32 - -func archAvailableCastagnoli() bool { - return cpu.X86.HasSSE42 -} - -func archInitCastagnoli() { - if !cpu.X86.HasSSE42 { - panic("not available") - } - // No initialization necessary. -} - -func archUpdateCastagnoli(crc uint32, p []byte) uint32 { - if !cpu.X86.HasSSE42 { - panic("not available") - } - return castagnoliSSE42(crc, p) -} - -func archAvailableIEEE() bool { return false } -func archInitIEEE() { panic("not available") } -func archUpdateIEEE(crc uint32, p []byte) uint32 { panic("not available") } diff --git a/src/hash/crc32/crc32_amd64p32.s b/src/hash/crc32/crc32_amd64p32.s deleted file mode 100644 index 502bceac57..0000000000 --- a/src/hash/crc32/crc32_amd64p32.s +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -#include "textflag.h" - -// func castagnoliSSE42(crc uint32, p []byte) uint32 -TEXT ·castagnoliSSE42(SB),NOSPLIT,$0 - MOVL crc+0(FP), AX // CRC value - MOVL p+4(FP), SI // data pointer - MOVL p_len+8(FP), CX // len(p) - - NOTL AX - - /* If there's less than 8 bytes to process, we do it byte-by-byte. */ - CMPQ CX, $8 - JL cleanup - - /* Process individual bytes until the input is 8-byte aligned. */ -startup: - MOVQ SI, BX - ANDQ $7, BX - JZ aligned - - CRC32B (SI), AX - DECQ CX - INCQ SI - JMP startup - -aligned: - /* The input is now 8-byte aligned and we can process 8-byte chunks. */ - CMPQ CX, $8 - JL cleanup - - CRC32Q (SI), AX - ADDQ $8, SI - SUBQ $8, CX - JMP aligned - -cleanup: - /* We may have some bytes left over that we process one at a time. */ - CMPQ CX, $0 - JE done - - CRC32B (SI), AX - INCQ SI - DECQ CX - JMP cleanup - -done: - NOTL AX - MOVL AX, ret+16(FP) - RET |