aboutsummaryrefslogtreecommitdiff
path: root/src/internal/bytealg/compare_amd64.s
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-08-02 18:28:40 -0400
committerCherry Mui <cherryyz@google.com>2021-08-11 17:08:54 +0000
commitd7d4f28a06b8633d433a925b0dfaeadf6530ae97 (patch)
treef4c79170ac1e901563fcde82de81132dd288424f /src/internal/bytealg/compare_amd64.s
parenteeb7899137cda1c2cd60dab65ff41f627436db5b (diff)
downloadgo-d7d4f28a06b8633d433a925b0dfaeadf6530ae97.tar.gz
go-d7d4f28a06b8633d433a925b0dfaeadf6530ae97.zip
[dev.typeparams] runtime, internal/bytealg: remove regabi fallback code on AMD64
As we commit to always enabling register ABI on AMD64, remove the fallback code. Change-Id: I30556858ba4bac367495fa94f6a8682ecd771196 Reviewed-on: https://go-review.googlesource.com/c/go/+/341152 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/internal/bytealg/compare_amd64.s')
-rw-r--r--src/internal/bytealg/compare_amd64.s32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/internal/bytealg/compare_amd64.s b/src/internal/bytealg/compare_amd64.s
index 8295acb03a..4ccaca5e87 100644
--- a/src/internal/bytealg/compare_amd64.s
+++ b/src/internal/bytealg/compare_amd64.s
@@ -6,7 +6,6 @@
#include "textflag.h"
TEXT ·Compare<ABIInternal>(SB),NOSPLIT,$0-56
-#ifdef GOEXPERIMENT_regabiargs
// AX = a_base (want in SI)
// BX = a_len (want in BX)
// CX = a_cap (unused)
@@ -15,17 +14,9 @@ TEXT ·Compare<ABIInternal>(SB),NOSPLIT,$0-56
// R8 = b_cap (unused)
MOVQ SI, DX
MOVQ AX, SI
-#else
- MOVQ a_base+0(FP), SI
- MOVQ a_len+8(FP), BX
- MOVQ b_base+24(FP), DI
- MOVQ b_len+32(FP), DX
- LEAQ ret+48(FP), R9
-#endif
JMP cmpbody<>(SB)
TEXT runtime·cmpstring<ABIInternal>(SB),NOSPLIT,$0-40
-#ifdef GOEXPERIMENT_regabiargs
// AX = a_base (want in SI)
// BX = a_len (want in BX)
// CX = b_base (want in DI)
@@ -33,13 +24,6 @@ TEXT runtime·cmpstring<ABIInternal>(SB),NOSPLIT,$0-40
MOVQ AX, SI
MOVQ DI, DX
MOVQ CX, DI
-#else
- MOVQ a_base+0(FP), SI
- MOVQ a_len+8(FP), BX
- MOVQ b_base+16(FP), DI
- MOVQ b_len+24(FP), DX
- LEAQ ret+32(FP), R9
-#endif
JMP cmpbody<>(SB)
// input:
@@ -47,12 +31,8 @@ TEXT runtime·cmpstring<ABIInternal>(SB),NOSPLIT,$0-40
// DI = b
// BX = alen
// DX = blen
-#ifndef GOEXPERIMENT_regabiargs
-// R9 = address of output word (stores -1/0/1 here)
-#else
// output:
// AX = output (-1/0/1)
-#endif
TEXT cmpbody<>(SB),NOSPLIT,$0-0
CMPQ SI, DI
JEQ allsame
@@ -100,9 +80,6 @@ diff16:
CMPB CX, (DI)(BX*1)
SETHI AX
LEAQ -1(AX*2), AX // convert 1/0 to +1/-1
-#ifndef GOEXPERIMENT_regabiargs
- MOVQ AX, (R9)
-#endif
RET
// 0 through 16 bytes left, alen>=8, blen>=8
@@ -128,9 +105,6 @@ diff8:
SHRQ CX, AX // move a's bit to bottom
ANDQ $1, AX // mask bit
LEAQ -1(AX*2), AX // 1/0 => +1/-1
-#ifndef GOEXPERIMENT_regabiargs
- MOVQ AX, (R9)
-#endif
RET
// 0-7 bytes in common
@@ -169,9 +143,6 @@ di_finish:
SHRQ CX, SI // move a's bit to bottom
ANDQ $1, SI // mask bit
LEAQ -1(SI*2), AX // 1/0 => +1/-1
-#ifndef GOEXPERIMENT_regabiargs
- MOVQ AX, (R9)
-#endif
RET
allsame:
@@ -181,9 +152,6 @@ allsame:
SETGT AX // 1 if alen > blen
SETEQ CX // 1 if alen == blen
LEAQ -1(CX)(AX*2), AX // 1,0,-1 result
-#ifndef GOEXPERIMENT_regabiargs
- MOVQ AX, (R9)
-#endif
RET
// this works for >= 64 bytes of data.