From a3b40c37c2e4109e1dd40d381058eb633f453169 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 16 Aug 2023 14:35:41 -0700 Subject: [PATCH 1/2] Arm64: Optimize non-optimal BFI move case Commonly we are doing a BFI into a 32-bit register, which is hitting the ubfx (lsr alias) path. In the case of 32-bit destination we can also do a regular move, which will take advantage of CPU's rename functionality and give a minor speed boost. --- External/FEXCore/Source/Interface/Core/JIT/Arm64/ALUOps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/External/FEXCore/Source/Interface/Core/JIT/Arm64/ALUOps.cpp b/External/FEXCore/Source/Interface/Core/JIT/Arm64/ALUOps.cpp index 566d405d1..86b464826 100644 --- a/External/FEXCore/Source/Interface/Core/JIT/Arm64/ALUOps.cpp +++ b/External/FEXCore/Source/Interface/Core/JIT/Arm64/ALUOps.cpp @@ -1115,7 +1115,7 @@ DEF_OP(Bfi) { mov(EmitSize, TMP1, SrcDst); bfi(EmitSize, TMP1, Src, Op->lsb, Op->Width); - if (OpSize == 8) { + if (OpSize >= 4) { mov(EmitSize, Dst, TMP1.R()); } else { From 13a4009bd31f342642bca40ec8c6cf2f5f19d76d Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 16 Aug 2023 14:37:36 -0700 Subject: [PATCH 2/2] InstCountCI: Update changed operations due to bfi operation No instruction count changes here, just moving from lsr to mov. --- unittests/InstructionCountCI/H0F38.json | 2 +- unittests/InstructionCountCI/Primary.json | 10 +-- .../InstructionCountCI/PrimaryGroup.json | 50 +++++++-------- .../InstructionCountCI/Primary_32Bit.json | 46 ++++++------- unittests/InstructionCountCI/Secondary.json | 56 ++++++++-------- .../InstructionCountCI/SecondaryGroup.json | 48 +++++++------- .../InstructionCountCI/Secondary_OpSize.json | 8 +-- unittests/InstructionCountCI/VEX_map1.json | 16 ++--- unittests/InstructionCountCI/VEX_map2.json | 18 +++--- .../InstructionCountCI/VEX_map_group.json | 4 +- unittests/InstructionCountCI/x87.json | 64 +++++++++---------- 11 files changed, 161 insertions(+), 161 deletions(-) diff --git a/unittests/InstructionCountCI/H0F38.json b/unittests/InstructionCountCI/H0F38.json index 38f434af1..f4b56c623 100644 --- a/unittests/InstructionCountCI/H0F38.json +++ b/unittests/InstructionCountCI/H0F38.json @@ -481,7 +481,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", diff --git a/unittests/InstructionCountCI/Primary.json b/unittests/InstructionCountCI/Primary.json index aaaed7d28..807f3902d 100644 --- a/unittests/InstructionCountCI/Primary.json +++ b/unittests/InstructionCountCI/Primary.json @@ -3661,7 +3661,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "ubfx x22, x20, #2, #1", "strb w22, [x28, #706]", "ubfx x22, x20, #4, #1", @@ -3710,7 +3710,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "ubfx x22, x20, #2, #1", "strb w22, [x28, #706]", "ubfx x22, x20, #4, #1", @@ -3720,7 +3720,7 @@ "ubfx x20, x20, #7, #1", "mov w0, w21", "bfi w0, w20, #31, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -5411,7 +5411,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -5424,7 +5424,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/PrimaryGroup.json b/unittests/InstructionCountCI/PrimaryGroup.json index 27527f6b1..3fc73ce9c 100644 --- a/unittests/InstructionCountCI/PrimaryGroup.json +++ b/unittests/InstructionCountCI/PrimaryGroup.json @@ -1139,7 +1139,7 @@ "eor x20, x22, x20", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1164,7 +1164,7 @@ "csel x20, x20, x22, hs", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x24, #7, #1", "ubfx x22, x24, #6, #1", "eor x21, x21, x22", @@ -1359,7 +1359,7 @@ "eor x20, x22, x20", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1389,7 +1389,7 @@ "csel w20, w21, w23, hs", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x22, x24, #31, #1", "eor x21, x22, x21", "bfi w20, w21, #28, #1", @@ -1421,7 +1421,7 @@ "csel x20, x21, x23, hs", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "lsr x22, x4, #63", "eor x21, x22, x21", "bfi w20, w21, #28, #1", @@ -1448,7 +1448,7 @@ "csel x20, x20, x22, hs", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x24, #15, #1", "ubfx x22, x24, #14, #1", "eor x21, x21, x22", @@ -1482,7 +1482,7 @@ "csel w20, w21, w23, hs", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x24, #31, #1", "ubfx x22, x24, #30, #1", "eor x21, x21, x22", @@ -1515,7 +1515,7 @@ "csel x20, x21, x23, hs", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "lsr x21, x4, #63", "ubfx x22, x4, #62, #1", "eor x21, x21, x22", @@ -1764,7 +1764,7 @@ "eor w20, w22, w20", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1784,7 +1784,7 @@ "bfxil x4, x22, #0, #8", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x22, #7, #1", "ubfx x22, x22, #6, #1", "eor w21, w21, w22", @@ -1986,7 +1986,7 @@ "eor w20, w22, w20", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2006,7 +2006,7 @@ "eor w20, w22, w20", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2026,7 +2026,7 @@ "eor x20, x22, x20", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2045,7 +2045,7 @@ "ubfx x20, x20, #0, #1", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x22, #15, #1", "ubfx x22, x22, #14, #1", "eor w21, w21, w22", @@ -2065,7 +2065,7 @@ "ubfx x20, x20, #0, #1", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x4, #31, #1", "ubfx x22, x4, #30, #1", "eor w21, w21, w22", @@ -2085,7 +2085,7 @@ "ubfx x20, x20, #0, #1", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "lsr x21, x4, #63", "ubfx x22, x4, #62, #1", "eor x21, x21, x22", @@ -2376,7 +2376,7 @@ "csel x20, x23, x21, eq", "mov w0, w22", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2403,7 +2403,7 @@ "csel x20, x21, x23, hs", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x24, #7, #1", "ubfx x22, x24, #6, #1", "eor x21, x21, x22", @@ -2677,7 +2677,7 @@ "csel x20, x23, x21, eq", "mov w0, w22", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2718,7 +2718,7 @@ "csel x20, x23, x21, eq", "mov w0, w22", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2757,7 +2757,7 @@ "csel x20, x22, x20, eq", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2783,7 +2783,7 @@ "csel x20, x21, x23, hs", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x24, #15, #1", "ubfx x22, x24, #14, #1", "eor x21, x21, x22", @@ -2822,7 +2822,7 @@ "csel w21, w21, w23, hs", "mov w0, w22", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "ubfx x22, x21, #28, #1", "ubfx x23, x24, #31, #1", "ubfx x24, x24, #30, #1", @@ -2831,7 +2831,7 @@ "csel x20, x22, x23, eq", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2864,7 +2864,7 @@ "csel x20, x20, x22, hs", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "ubfx x21, x20, #28, #1", "lsr x22, x4, #63", "ubfx x23, x4, #62, #1", diff --git a/unittests/InstructionCountCI/Primary_32Bit.json b/unittests/InstructionCountCI/Primary_32Bit.json index 903f93e7a..5a6aabc2f 100644 --- a/unittests/InstructionCountCI/Primary_32Bit.json +++ b/unittests/InstructionCountCI/Primary_32Bit.json @@ -129,7 +129,7 @@ "mov w22, w4", "mov w0, w22", "bfxil w0, w20, #0, #8", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "ldr w20, [x28, #728]", "ubfx x22, x20, #29, #1", @@ -146,7 +146,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]", "b #+0x3c", "mov w20, w4", @@ -155,13 +155,13 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #8", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "orr w20, wzr, #0x1", "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]", "mov w20, w4", "uxtb x20, w20", @@ -171,7 +171,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #31, #1", - "lsr w21, w0, #0", + "mov w21, w0", "and x22, x20, #0xff", "cmp x22, #0x0 (0)", "cset x22, eq", @@ -206,7 +206,7 @@ "mov w22, w4", "mov w0, w22", "bfxil w0, w20, #0, #8", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "ldr w20, [x28, #728]", "ubfx x22, x20, #29, #1", @@ -223,7 +223,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]", "b #+0x3c", "mov w20, w4", @@ -232,13 +232,13 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #8", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "orr w20, wzr, #0x1", "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]", "mov w20, w4", "uxtb x20, w20", @@ -248,7 +248,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #31, #1", - "lsr w21, w0, #0", + "mov w21, w0", "and x22, x20, #0xff", "cmp x22, #0x0 (0)", "cset x22, eq", @@ -278,7 +278,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "mov w20, #0x0", "ldr w21, [x28, #728]", @@ -292,7 +292,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "orr w20, wzr, #0x1", "ldr w21, [x28, #728]", @@ -321,7 +321,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "mov w20, #0x0", "ldr w21, [x28, #728]", @@ -336,7 +336,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "orr w20, wzr, #0x1", "ldr w21, [x28, #728]", @@ -607,7 +607,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "mov w20, w4", "uxtb x20, w20", @@ -617,7 +617,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #31, #1", - "lsr w21, w0, #0", + "mov w21, w0", "and x22, x20, #0xff", "cmp x22, #0x0 (0)", "cset x22, eq", @@ -644,7 +644,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "mov w20, w4", "uxtb x20, w20", @@ -654,7 +654,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #31, #1", - "lsr w21, w0, #0", + "mov w21, w0", "and x22, x20, #0xff", "cmp x22, #0x0 (0)", "cset x22, eq", @@ -683,7 +683,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "mov w20, w4", "uxtb x20, w20", @@ -693,7 +693,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #31, #1", - "lsr w21, w0, #0", + "mov w21, w0", "and x22, x20, #0xff", "cmp x22, #0x0 (0)", "cset x22, eq", @@ -722,7 +722,7 @@ "mov w21, w4", "mov w0, w21", "bfxil w0, w20, #0, #16", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "mov w20, w4", "uxtb x20, w20", @@ -732,7 +732,7 @@ "ldr w22, [x28, #728]", "mov w0, w22", "bfi w0, w21, #31, #1", - "lsr w21, w0, #0", + "mov w21, w0", "and x22, x20, #0xff", "cmp x22, #0x0 (0)", "cset x22, eq", @@ -758,7 +758,7 @@ "mov w22, w4", "mov w0, w22", "bfxil w0, w20, #0, #8", - "lsr w20, w0, #0", + "mov w20, w0", "bfxil x4, x20, #0, #32", "str w21, [x28, #728]" ] diff --git a/unittests/InstructionCountCI/Secondary.json b/unittests/InstructionCountCI/Secondary.json index 4a5a037d6..8e1f1fa0f 100644 --- a/unittests/InstructionCountCI/Secondary.json +++ b/unittests/InstructionCountCI/Secondary.json @@ -214,7 +214,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -222,7 +222,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -244,7 +244,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -252,7 +252,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1893,7 +1893,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1911,7 +1911,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1928,7 +1928,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1946,7 +1946,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1961,7 +1961,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -1978,7 +1978,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2420,7 +2420,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2442,7 +2442,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2463,7 +2463,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2485,7 +2485,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2503,7 +2503,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2524,7 +2524,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2885,7 +2885,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2907,7 +2907,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2927,7 +2927,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2949,7 +2949,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2967,7 +2967,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -2988,7 +2988,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -3091,7 +3091,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -3113,7 +3113,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -3134,7 +3134,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -3156,7 +3156,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -3174,7 +3174,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -3195,7 +3195,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/SecondaryGroup.json b/unittests/InstructionCountCI/SecondaryGroup.json index 93996124c..92f4ef673 100644 --- a/unittests/InstructionCountCI/SecondaryGroup.json +++ b/unittests/InstructionCountCI/SecondaryGroup.json @@ -31,7 +31,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -45,7 +45,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -58,7 +58,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -73,7 +73,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -88,7 +88,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -102,7 +102,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -118,7 +118,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -134,7 +134,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -149,7 +149,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -166,7 +166,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -183,7 +183,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -198,7 +198,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -215,7 +215,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -231,7 +231,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -247,7 +247,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -265,7 +265,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -282,7 +282,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -298,7 +298,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -314,7 +314,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -330,7 +330,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -345,7 +345,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -362,7 +362,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -379,7 +379,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -394,7 +394,7 @@ "ldr w21, [x28, #728]", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/Secondary_OpSize.json b/unittests/InstructionCountCI/Secondary_OpSize.json index 23f8f3ce2..7361b0d0b 100644 --- a/unittests/InstructionCountCI/Secondary_OpSize.json +++ b/unittests/InstructionCountCI/Secondary_OpSize.json @@ -165,7 +165,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -173,7 +173,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -195,7 +195,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -203,7 +203,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/VEX_map1.json b/unittests/InstructionCountCI/VEX_map1.json index 8768bb33c..f67f2ac83 100644 --- a/unittests/InstructionCountCI/VEX_map1.json +++ b/unittests/InstructionCountCI/VEX_map1.json @@ -4385,7 +4385,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -4393,7 +4393,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -4419,7 +4419,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -4427,7 +4427,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -4453,7 +4453,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -4461,7 +4461,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -4487,7 +4487,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "mov w20, #0x0", @@ -4495,7 +4495,7 @@ "bfi w21, w20, #31, #1", "mov w0, w21", "bfi w0, w20, #28, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/VEX_map2.json b/unittests/InstructionCountCI/VEX_map2.json index 239f43bf7..0b08c7dae 100644 --- a/unittests/InstructionCountCI/VEX_map2.json +++ b/unittests/InstructionCountCI/VEX_map2.json @@ -808,7 +808,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", @@ -854,7 +854,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", @@ -892,7 +892,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", @@ -938,7 +938,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", @@ -1011,7 +1011,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", @@ -1053,7 +1053,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "bfi w20, w21, #29, #1", "strb w22, [x28, #708]", "bfi w20, w22, #31, #1", @@ -4132,7 +4132,7 @@ "cset x20, eq", "mov w0, w22", "bfi w0, w20, #30, #1", - "lsr w20, w0, #0", + "mov w20, w0", "cmp x21, #0x1f (31)", "cset x21, hi", "bfi w20, w21, #29, #1", @@ -4161,12 +4161,12 @@ "cset x21, eq", "mov w0, w22", "bfi w0, w21, #30, #1", - "lsr w21, w0, #0", + "mov w21, w0", "cmp x20, #0x3f (63)", "cset x20, hi", "mov w0, w21", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/VEX_map_group.json b/unittests/InstructionCountCI/VEX_map_group.json index 28151aecd..df007f484 100644 --- a/unittests/InstructionCountCI/VEX_map_group.json +++ b/unittests/InstructionCountCI/VEX_map_group.json @@ -923,7 +923,7 @@ "csel x20, x22, x20, eq", "mov w0, w23", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, @@ -947,7 +947,7 @@ "csel x20, x21, x20, eq", "mov w0, w22", "bfi w0, w20, #29, #1", - "lsr w20, w0, #0", + "mov w20, w0", "str w20, [x28, #728]" ] }, diff --git a/unittests/InstructionCountCI/x87.json b/unittests/InstructionCountCI/x87.json index 66f96f736..fcaeae3aa 100644 --- a/unittests/InstructionCountCI/x87.json +++ b/unittests/InstructionCountCI/x87.json @@ -10508,7 +10508,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -10579,7 +10579,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -10650,7 +10650,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -10721,7 +10721,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -10792,7 +10792,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -10863,7 +10863,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -10934,7 +10934,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11005,7 +11005,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11076,7 +11076,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11147,7 +11147,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11218,7 +11218,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11289,7 +11289,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11360,7 +11360,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11431,7 +11431,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11502,7 +11502,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -11573,7 +11573,7 @@ "ldr w23, [x28, #728]", "mov w0, w23", "bfi w0, w21, #29, #1", - "lsr w21, w0, #0", + "mov w21, w0", "bfi w21, w22, #30, #1", "strb w20, [x28, #706]", "str w21, [x28, #728]" @@ -22720,7 +22720,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -22802,7 +22802,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -22884,7 +22884,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -22967,7 +22967,7 @@ "ldr w25, [x28, #728]", "mov w0, w25", "bfi w0, w23, #29, #1", - "lsr w23, w0, #0", + "mov w23, w0", "bfi w23, w24, #30, #1", "strb w22, [x28, #706]", "ldrh w22, [x28, #1010]", @@ -23048,7 +23048,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23130,7 +23130,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23212,7 +23212,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23294,7 +23294,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23376,7 +23376,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23458,7 +23458,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23540,7 +23540,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23623,7 +23623,7 @@ "ldr w25, [x28, #728]", "mov w0, w25", "bfi w0, w23, #29, #1", - "lsr w23, w0, #0", + "mov w23, w0", "bfi w23, w24, #30, #1", "strb w22, [x28, #706]", "ldrh w22, [x28, #1010]", @@ -23704,7 +23704,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23786,7 +23786,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23868,7 +23868,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]", @@ -23950,7 +23950,7 @@ "ldr w24, [x28, #728]", "mov w0, w24", "bfi w0, w22, #29, #1", - "lsr w22, w0, #0", + "mov w22, w0", "bfi w22, w23, #30, #1", "strb w21, [x28, #706]", "ldrh w21, [x28, #1010]",