@@ -3694,17 +3694,6 @@ fn test_arch_sparc_detail() {
3694
3694
] ,
3695
3695
) ;
3696
3696
3697
- let f0_f4 = [
3698
- SparcOperand {
3699
- op_type : Reg ( RegId ( SPARC_REG_F0 as RegIdInt ) ) ,
3700
- access : Some ( AccessType :: ReadOnly ) ,
3701
- } ,
3702
- SparcOperand {
3703
- op_type : Reg ( RegId ( SPARC_REG_F4 as RegIdInt ) ) ,
3704
- access : Some ( AccessType :: ReadOnly ) ,
3705
- } ,
3706
- ] ;
3707
-
3708
3697
test_arch_mode_endian_insns_detail (
3709
3698
& mut Capstone :: new ( )
3710
3699
. sparc ( )
@@ -3718,15 +3707,69 @@ fn test_arch_sparc_detail() {
3718
3707
& [ ] ,
3719
3708
& [
3720
3709
// fcmps %f0, %f4
3721
- DII :: new ( "fcmps" , b"\x81 \xa8 \x0a \x24 " , & f0_f4) ,
3722
- // Upstream bug
3723
- // https://github.com/capstone-engine/capstone/issues/2749
3710
+ DII :: new (
3711
+ "fcmps" ,
3712
+ b"\x81 \xa8 \x0a \x24 " ,
3713
+ & [
3714
+ SparcOperand {
3715
+ op_type : Reg ( RegId ( SPARC_REG_F0 as RegIdInt ) ) ,
3716
+ access : Some ( AccessType :: ReadOnly ) ,
3717
+ } ,
3718
+ SparcOperand {
3719
+ op_type : Reg ( RegId ( SPARC_REG_F4 as RegIdInt ) ) ,
3720
+ access : Some ( AccessType :: ReadOnly ) ,
3721
+ } ,
3722
+ ] ,
3723
+ ) ,
3724
3724
// fstox %f0, %f4
3725
- // DII::new("fstox", b"\x89\xa0\x10\x20", &f0_f4),
3725
+ DII :: new (
3726
+ "fstox" ,
3727
+ b"\x89 \xa0 \x10 \x20 " ,
3728
+ & [
3729
+ SparcOperand {
3730
+ op_type : Reg ( RegId ( SPARC_REG_F0 as RegIdInt ) ) ,
3731
+ access : Some ( AccessType :: ReadOnly ) ,
3732
+ } ,
3733
+ // writes to f4-f5, aka d2
3734
+ SparcOperand {
3735
+ op_type : Reg ( RegId ( SPARC_REG_D2 as RegIdInt ) ) ,
3736
+ access : Some ( AccessType :: WriteOnly ) ,
3737
+ } ,
3738
+ ] ,
3739
+ ) ,
3726
3740
// fqtoi %f0, %f4
3727
- // DII::new("fqtoi", b"\x89\xa0\x1a\x60", &f0_f4),
3741
+ DII :: new (
3742
+ "fqtoi" ,
3743
+ b"\x89 \xa0 \x1a \x60 " ,
3744
+ & [
3745
+ // reads from f0-f3, aka q0
3746
+ SparcOperand {
3747
+ op_type : Reg ( RegId ( SPARC_REG_Q0 as RegIdInt ) ) ,
3748
+ access : Some ( AccessType :: ReadOnly ) ,
3749
+ } ,
3750
+ SparcOperand {
3751
+ op_type : Reg ( RegId ( SPARC_REG_F4 as RegIdInt ) ) ,
3752
+ access : Some ( AccessType :: WriteOnly ) ,
3753
+ } ,
3754
+ ] ,
3755
+ ) ,
3728
3756
// fnegq %f0, %f4
3729
- // DII::new("fnegq", b"\x89\xa0\x00\xe0", &f0_f4),
3757
+ DII :: new (
3758
+ "fnegq" ,
3759
+ b"\x89 \xa0 \x00 \xe0 " ,
3760
+ & [
3761
+ // reads from f0-f3, aka q0
3762
+ SparcOperand {
3763
+ op_type : Reg ( RegId ( SPARC_REG_Q0 as RegIdInt ) ) ,
3764
+ access : Some ( AccessType :: ReadOnly ) ,
3765
+ } ,
3766
+ // writes to f4-f7, aka q1
3767
+ SparcOperand {
3768
+ op_type : Reg ( RegId ( SPARC_REG_Q1 as RegIdInt ) ) ,
3769
+ access : Some ( AccessType :: WriteOnly ) ,
3770
+ } ,
3771
+ ] ,
3772
+ ) ,
3730
3773
] ,
3731
3774
) ;
3732
3775
}
0 commit comments