aboutsummaryrefslogtreecommitdiff
path: root/src/internal/bytealg/compare_amd64.s
diff options
context:
space:
mode:
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.