]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm/internal/asm: add aliases for ARM64 condition codes
authorAram Hăvărneanu <aram@mgk.ro>
Thu, 17 Sep 2015 09:47:16 +0000 (11:47 +0200)
committerAram Hăvărneanu <aram@mgk.ro>
Thu, 17 Sep 2015 15:11:08 +0000 (15:11 +0000)
Add CS as an alias for HS, and CC as an alias for LO, otherwise

CSINV CS, R1, R2, R3

was interpreted as

CSINV 0, R1, R2, R3

Also fix the corresponding faulty test.

Fixes #12632
Updates #12470

Change-Id: I974cfc7e5ced682d4754ba09b0b102cb08a46567
Reviewed-on: https://go-review.googlesource.com/14680
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/asm/internal/arch/arch.go
src/cmd/asm/internal/asm/testdata/arm64.out

index e6901ebfc2a1d7881eab3cdffe1be6941de7f7a9..04622e63ec4ed9c0a09fd78cf9301669be56bd36 100644 (file)
@@ -252,7 +252,9 @@ func archArm64() *Arch {
        register["EQ"] = arm64.COND_EQ
        register["NE"] = arm64.COND_NE
        register["HS"] = arm64.COND_HS
+       register["CS"] = arm64.COND_HS
        register["LO"] = arm64.COND_LO
+       register["CC"] = arm64.COND_LO
        register["MI"] = arm64.COND_MI
        register["PL"] = arm64.COND_PL
        register["VS"] = arm64.COND_VS
index 0b7b430f4c8352f96f15a4ad6ff6907027fd1867..37944bc75cd9b059ae438a02f3d9b7483e87539c 100644 (file)
@@ -37,7 +37,7 @@
 147 00037 (testdata/arm64.s:147)       CSEL    LT, R1, R2, ZR
 148 00038 (testdata/arm64.s:148)       CSINC   GT, R1, ZR, R3
 149 00039 (testdata/arm64.s:149)       CSNEG   MI, R1, R2, R3
-150 00040 (testdata/arm64.s:150)       CSINV   0, R1, R2, R3
+150 00040 (testdata/arm64.s:150)       CSINV   HS, R1, R2, R3
 156 00041 (testdata/arm64.s:156)       CSEL    LT, R1, R2
 164 00042 (testdata/arm64.s:164)       CCMN    MI, ZR, R1, $4
 173 00043 (testdata/arm64.s:173)       FADDD   $(0.5), F1