Fixing BYTE instruction
This commit is contained in:
parent
7af4825b15
commit
46ecb16191
@ -837,8 +837,9 @@ impl Interpreter {
|
||||
},
|
||||
instructions::BYTE => {
|
||||
let word = stack.pop_back();
|
||||
let val = stack.pop_back();
|
||||
let byte = if word < U256::from(32) {
|
||||
word >> (8 * (31 - word.low_u64() as usize))
|
||||
(val >> (8 * (31 - word.low_u64() as usize))) & U256::from(0xff)
|
||||
} else {
|
||||
U256::zero()
|
||||
};
|
||||
|
@ -168,7 +168,7 @@ fn do_json_test_for(vm: &VMType, json_data: &[u8]) -> Vec<String> {
|
||||
let json = Json::from_str(::std::str::from_utf8(json_data).unwrap()).expect("Json is invalid");
|
||||
let mut failed = Vec::new();
|
||||
for (name, test) in json.as_object().unwrap() {
|
||||
// if name != "signextend_Overflow_dj42" {
|
||||
// if name != "byte0" {
|
||||
// continue;
|
||||
// }
|
||||
println!("name: {:?}", name);
|
||||
|
Loading…
Reference in New Issue
Block a user