File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -1647,12 +1647,22 @@ impl Emu {
1647
1647
return storage0;
1648
1648
}
1649
1649
1650
- for i in 0 ..=( size as u64 - 1 - counter) {
1650
+ let mut to = size as u64 - 1 - counter;
1651
+ if to>64 {
1652
+ // println!("to: {}", to);
1653
+ to = 64 ;
1654
+ }
1655
+
1656
+ for i in 0 ..=to {
1651
1657
let bit = get_bit ! ( storage0, i as u32 + counter as u32 ) ;
1652
1658
set_bit ! ( storage0, i as u32 , bit) ;
1653
1659
}
1654
1660
1655
- for i in ( size as u64 - counter) ..size as u64 {
1661
+ let from = size as u64 - counter;
1662
+
1663
+ //println!("from: {}", from);
1664
+
1665
+ for i in from..size as u64 {
1656
1666
let bit = get_bit ! ( value1, i as u32 + counter as u32 - size as u32 ) ;
1657
1667
set_bit ! ( storage0, i as u32 , bit) ;
1658
1668
}
@@ -4648,6 +4658,24 @@ impl Emu {
4648
4658
}
4649
4659
}
4650
4660
4661
+ // https://hjlebbink.github.io/x86doc/html/CMOVcc.html
4662
+
4663
+ Mnemonic :: Cmovnp => {
4664
+ self . show_instruction ( & self . colors . orange , & ins) ;
4665
+
4666
+ if !self . flags . f_pf {
4667
+ let value1 = match self . get_operand_value ( & ins, 1 , true ) {
4668
+ Some ( v) => v,
4669
+ None => break ,
4670
+ } ;
4671
+
4672
+ if !self . set_operand_value ( & ins, 0 , value1) {
4673
+ break ;
4674
+ }
4675
+ }
4676
+
4677
+ }
4678
+
4651
4679
4652
4680
Mnemonic :: Seta => {
4653
4681
self . show_instruction ( & self . colors . orange , & ins) ;
You can’t perform that action at this time.
0 commit comments