Skip to content

Commit d7f5c03

Browse files
zhangfanniecherrymui
authored andcommitted
cmd/internal/obj/arm64: reorder the assembler's optab entries
Current optab entries are unordered, because the new instructions are added at the end of the optab. The patch reorders them by comments in optab, such as arithmetic operations, logical operations and a series of load/store etc. The patch removes the VMOVS opcode because FMOVS already has the same operation. Change-Id: Iccdf89ecbb3875b9dfcb6e06be2cc19c7e5581a2 Reviewed-on: https://go-review.googlesource.com/109896 Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent adb52cf commit d7f5c03

File tree

6 files changed

+152
-161
lines changed

6 files changed

+152
-161
lines changed

src/cmd/asm/internal/asm/testdata/arm64.s

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,15 @@ TEXT foo(SB), DUPOK|NOSPLIT, $-8
226226
VST1.P V4.D[1], 8(R0) // 04849f4d
227227
VST1.P V4.D[1], (R0)(R1) // VST1.P V4.D[1], (R0)(R1*1) // 0484814d
228228
VST1 V4.D[1], (R0) // 0484004d
229-
VMOVS V20, (R0) // 140000bd
230-
VMOVS.P V20, 4(R0) // 144400bc
231-
VMOVS.W V20, 4(R0) // 144c00bc
232-
VMOVS (R0), V20 // 140040bd
233-
VMOVS.P 8(R0), V20 // 148440bc
234-
VMOVS.W 8(R0), V20 // 148c40bc
229+
FMOVS F20, (R0) // 140000bd
230+
FMOVS.P F20, 4(R0) // 144400bc
231+
FMOVS.W F20, 4(R0) // 144c00bc
232+
FMOVS (R0), F20 // 140040bd
233+
FMOVS.P 8(R0), F20 // 148440bc
234+
FMOVS.W 8(R0), F20 // 148c40bc
235+
FMOVD F20, (R2) // 540000fd
236+
FMOVD.P F20, 8(R1) // 348400fc
237+
FMOVD.W 8(R1), F20 // 348c40fc
235238
PRFM (R2), PLDL1KEEP // 400080f9
236239
PRFM 16(R2), PLDL1KEEP // 400880f9
237240
PRFM 48(R6), PSTL2STRM // d31880f9

src/cmd/internal/obj/arm64/a.out.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,6 @@ const (
884884
AVREV64
885885
AVST1
886886
AVDUP
887-
AVMOVS
888887
AVADDV
889888
AVMOVI
890889
AVUADDLV

src/cmd/internal/obj/arm64/anames.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ var Anames = []string{
386386
"VREV64",
387387
"VST1",
388388
"VDUP",
389-
"VMOVS",
390389
"VADDV",
391390
"VMOVI",
392391
"VUADDLV",

0 commit comments

Comments
 (0)