@@ -514,9 +514,13 @@ fn test_instruction_details() {
514
514
& [ X86_REG_RIP , X86_REG_RSP ] ,
515
515
& [ X86_REG_RSP , X86_REG_RIP ] ,
516
516
) ,
517
- // Upstream bug: ret should read rsp to compute the new rsp
518
- // https://github.com/capstone-engine/capstone/issues/2714
519
- ( "ret" , b"\xc3 " , & [ RET ] , & [ ] , & [ X86_REG_RIP , X86_REG_RSP ] ) ,
517
+ (
518
+ "ret" ,
519
+ b"\xc3 " ,
520
+ & [ RET ] ,
521
+ & [ X86_REG_RSP ] ,
522
+ & [ X86_REG_RIP , X86_REG_RSP ] ,
523
+ ) ,
520
524
( "syscall" , b"\x0f \x05 " , & [ INT ] , & [ ] , & [ ] ) ,
521
525
( "iretd" , b"\xcf " , & [ IRET ] , & [ ] , & [ ] ) ,
522
526
(
@@ -705,9 +709,7 @@ fn test_syntax() {
705
709
"retq" ,
706
710
b"\xc3 " ,
707
711
& [ RET ] ,
708
- // Upstream bug: ret should read rsp
709
- // https://github.com/capstone-engine/capstone/issues/2714
710
- & [ ] ,
712
+ & [ X86_REG_RSP ] ,
711
713
& [ X86_REG_RSP , X86_REG_RIP ] ,
712
714
) ,
713
715
( "syscall" , "syscall" , b"\x0f \x05 " , & [ INT ] , & [ ] , & [ ] ) ,
@@ -1038,7 +1040,7 @@ fn test_arch_arm_detail() {
1038
1040
use crate :: arch:: arm:: ArmOperandType :: * ;
1039
1041
use crate :: arch:: arm:: * ;
1040
1042
use capstone_sys:: arm_op_mem;
1041
- use capstone_sys:: arm_spsr_cspr_bits ;
1043
+ use capstone_sys:: arm_spsr_cpsr_bits ;
1042
1044
1043
1045
let r0_op_read = ArmOperand {
1044
1046
op_type : Reg ( RegId ( ArmReg :: ARM_REG_R0 as RegIdInt ) ) ,
@@ -1179,8 +1181,8 @@ fn test_arch_arm_detail() {
1179
1181
& [
1180
1182
ArmOperand {
1181
1183
op_type : Cpsr (
1182
- arm_spsr_cspr_bits :: ARM_FIELD_CPSR_F
1183
- | arm_spsr_cspr_bits :: ARM_FIELD_CPSR_C ,
1184
+ arm_spsr_cpsr_bits :: ARM_FIELD_CPSR_F
1185
+ | arm_spsr_cpsr_bits :: ARM_FIELD_CPSR_C ,
1184
1186
) ,
1185
1187
access : Some ( RegAccessType :: WriteOnly ) ,
1186
1188
..Default :: default ( )
@@ -1606,9 +1608,14 @@ fn test_arch_aarch64_detail() {
1606
1608
// smstart
1607
1609
DII :: new ( "smstart" , b"\x7f \x47 \x03 \xd5 " , & [ ] ) ,
1608
1610
// smstart sm
1609
- // Upstream bug: no way to figure out sm?
1610
- // https://github.com/capstone-engine/capstone/issues/2715
1611
- DII :: new ( "smstart" , b"\x7f \x43 \x03 \xd5 " , & [ ] ) ,
1611
+ DII :: new (
1612
+ "smstart" ,
1613
+ b"\x7f \x43 \x03 \xd5 " ,
1614
+ & [ AArch64Operand {
1615
+ op_type : Svcr ( AArch64Svcr :: AARCH64_SVCR_SVCRSM ) ,
1616
+ ..Default :: default ( )
1617
+ } ] ,
1618
+ ) ,
1612
1619
// ldr za[w12, 4], [x0, #4, mul vl]
1613
1620
DII :: new (
1614
1621
"ldr" ,
@@ -2160,9 +2167,7 @@ fn test_arch_loongarch_detail() {
2160
2167
op_type : loongarch:: LoongArchOperandType :: Reg ( RegId (
2161
2168
LOONGARCH_REG_S1 as RegIdInt ,
2162
2169
) ) ,
2163
- // Upstream bug: should be read only
2164
- // https://github.com/capstone-engine/capstone/issues/2700
2165
- access : Some ( RegAccessType :: WriteOnly ) ,
2170
+ access : Some ( RegAccessType :: ReadOnly ) ,
2166
2171
} ,
2167
2172
LoongArchOperand {
2168
2173
op_type : loongarch:: LoongArchOperandType :: Mem ( LoongArchOpMem (
@@ -4637,12 +4642,10 @@ fn test_regs_access_arm() {
4637
4642
. unwrap ( ) ,
4638
4643
b"\xf0 \xbd " ,
4639
4644
CsResult :: Ok ( & [ as_reg_access (
4640
- // Upstream bug: register written are reported as read
4641
- // https://github.com/capstone-engine/capstone/issues/2713
4645
+ & [ ARM_REG_SP ] ,
4642
4646
& [
4643
4647
ARM_REG_SP , ARM_REG_R4 , ARM_REG_R5 , ARM_REG_R6 , ARM_REG_R7 , ARM_REG_PC ,
4644
4648
] ,
4645
- & [ ARM_REG_SP ] ,
4646
4649
) ] ) ,
4647
4650
) ;
4648
4651
}
0 commit comments