Skip to content

Commit cd7f737

Browse files
jthackrayc-rhodes
authored andcommitted
[AArch64][llvm] Fix encoding for stshh instruction (#189588)
The encoding for `stshh` was incorrect, and has been fixed. This has been checked against the Arm ARM.
1 parent 4250a0f commit cd7f737

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

llvm/lib/Target/AArch64/AArch64InstrFormats.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ class STSHHI
18501850
: SimpleSystemI<0, (ins phint_op:$policy), "stshh", "\t$policy", []>,
18511851
Sched<[WriteHint]> {
18521852
bits<3> policy;
1853-
let Inst{20-12} = 0b000011001;
1853+
let Inst{20-12} = 0b000110010;
18541854
let Inst{11-8} = 0b0110;
18551855
let Inst{7-5} = policy;
18561856
}

llvm/test/MC/AArch64/armv9.6a-pcdphint.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
stshh keep
1616
// CHECK-INST: stshh keep
17-
// CHECK-ENCODING: encoding: [0x1f,0x96,0x01,0xd5]
17+
// CHECK-ENCODING: encoding: [0x1f,0x26,0x03,0xd5]
1818
// CHECK-ERROR: error: instruction requires: pcdphint
19-
// CHECK-UNKNOWN: d501961f msr S0_1_C9_C6_0, xzr
19+
// CHECK-UNKNOWN: d503261f hint #0x30
2020

2121
stshh strm
2222
// CHECK-INST: stshh strm
23-
// CHECK-ENCODING: encoding: [0x3f,0x96,0x01,0xd5]
23+
// CHECK-ENCODING: encoding: [0x3f,0x26,0x03,0xd5]
2424
// CHECK-ERROR: error: instruction requires: pcdphint
25-
// CHECK-UNKNOWN: d501963f msr S0_1_C9_C6_1, xzr
25+
// CHECK-UNKNOWN: d503263f hint #0x31

0 commit comments

Comments
 (0)