@@ -607,9 +607,13 @@ fn test_instruction_details() {
607
607
& [ X86_REG_RIP , X86_REG_RSP ] ,
608
608
& [ X86_REG_RSP , X86_REG_RIP ] ,
609
609
) ,
610
- // Upstream bug: ret should read rsp to compute the new rsp
611
- // https://github.com/capstone-engine/capstone/issues/2714
612
- ( "ret" , b"\xc3 " , & [ RET ] , & [ ] , & [ X86_REG_RIP , X86_REG_RSP ] ) ,
610
+ (
611
+ "ret" ,
612
+ b"\xc3 " ,
613
+ & [ RET ] ,
614
+ & [ X86_REG_RSP ] ,
615
+ & [ X86_REG_RIP , X86_REG_RSP ] ,
616
+ ) ,
613
617
( "syscall" , b"\x0f \x05 " , & [ INT ] , & [ ] , & [ ] ) ,
614
618
( "iretd" , b"\xcf " , & [ IRET ] , & [ ] , & [ ] ) ,
615
619
(
@@ -798,9 +802,7 @@ fn test_syntax() {
798
802
"retq" ,
799
803
b"\xc3 " ,
800
804
& [ RET ] ,
801
- // Upstream bug: ret should read rsp
802
- // https://github.com/capstone-engine/capstone/issues/2714
803
- & [ ] ,
805
+ & [ X86_REG_RSP ] ,
804
806
& [ X86_REG_RSP , X86_REG_RIP ] ,
805
807
) ,
806
808
( "syscall" , "syscall" , b"\x0f \x05 " , & [ INT ] , & [ ] , & [ ] ) ,
@@ -1131,7 +1133,7 @@ fn test_arch_arm_detail() {
1131
1133
use crate :: arch:: arm:: ArmOperandType :: * ;
1132
1134
use crate :: arch:: arm:: * ;
1133
1135
use capstone_sys:: arm_op_mem;
1134
- use capstone_sys:: arm_spsr_cspr_bits ;
1136
+ use capstone_sys:: arm_spsr_cpsr_bits ;
1135
1137
1136
1138
let r0_op_read = ArmOperand {
1137
1139
op_type : Reg ( RegId ( ArmReg :: ARM_REG_R0 as RegIdInt ) ) ,
@@ -1272,8 +1274,8 @@ fn test_arch_arm_detail() {
1272
1274
& [
1273
1275
ArmOperand {
1274
1276
op_type : Cpsr (
1275
- arm_spsr_cspr_bits :: ARM_FIELD_CPSR_F
1276
- | arm_spsr_cspr_bits :: ARM_FIELD_CPSR_C ,
1277
+ arm_spsr_cpsr_bits :: ARM_FIELD_CPSR_F
1278
+ | arm_spsr_cpsr_bits :: ARM_FIELD_CPSR_C ,
1277
1279
) ,
1278
1280
access : Some ( RegAccessType :: WriteOnly ) ,
1279
1281
..Default :: default ( )
@@ -1699,9 +1701,14 @@ fn test_arch_aarch64_detail() {
1699
1701
// smstart
1700
1702
DII :: new ( "smstart" , b"\x7f \x47 \x03 \xd5 " , & [ ] ) ,
1701
1703
// smstart sm
1702
- // Upstream bug: no way to figure out sm?
1703
- // https://github.com/capstone-engine/capstone/issues/2715
1704
- DII :: new ( "smstart" , b"\x7f \x43 \x03 \xd5 " , & [ ] ) ,
1704
+ DII :: new (
1705
+ "smstart" ,
1706
+ b"\x7f \x43 \x03 \xd5 " ,
1707
+ & [ AArch64Operand {
1708
+ op_type : Svcr ( AArch64Svcr :: AARCH64_SVCR_SVCRSM ) ,
1709
+ ..Default :: default ( )
1710
+ } ] ,
1711
+ ) ,
1705
1712
// ldr za[w12, 4], [x0, #4, mul vl]
1706
1713
DII :: new (
1707
1714
"ldr" ,
@@ -2253,9 +2260,7 @@ fn test_arch_loongarch_detail() {
2253
2260
op_type : loongarch:: LoongArchOperandType :: Reg ( RegId (
2254
2261
LOONGARCH_REG_S1 as RegIdInt ,
2255
2262
) ) ,
2256
- // Upstream bug: should be read only
2257
- // https://github.com/capstone-engine/capstone/issues/2700
2258
- access : Some ( RegAccessType :: WriteOnly ) ,
2263
+ access : Some ( RegAccessType :: ReadOnly ) ,
2259
2264
} ,
2260
2265
LoongArchOperand {
2261
2266
op_type : loongarch:: LoongArchOperandType :: Mem ( LoongArchOpMem (
@@ -4730,12 +4735,10 @@ fn test_regs_access_arm() {
4730
4735
. unwrap ( ) ,
4731
4736
b"\xf0 \xbd " ,
4732
4737
CsResult :: Ok ( & [ as_reg_access (
4733
- // Upstream bug: register written are reported as read
4734
- // https://github.com/capstone-engine/capstone/issues/2713
4738
+ & [ ARM_REG_SP ] ,
4735
4739
& [
4736
4740
ARM_REG_SP , ARM_REG_R4 , ARM_REG_R5 , ARM_REG_R6 , ARM_REG_R7 , ARM_REG_PC ,
4737
4741
] ,
4738
- & [ ARM_REG_SP ] ,
4739
4742
) ] ) ,
4740
4743
) ;
4741
4744
}
0 commit comments