mirror of
https://github.com/mattrberry/crab.git
synced 2025-01-29 20:35:13 +01:00
fix large asr
This commit is contained in:
parent
403bd71d7e
commit
e8de35e27e
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ class CPU
|
|||
def asr(word : Word, bits : Int, set_conditions : Bool) : Word
|
||||
log "asr - word:#{hex_str word}, bits:#{bits}"
|
||||
@cpsr.carry = bit?(word, bits - 1) if set_conditions
|
||||
word // (2 ** bits)
|
||||
word >> bits | (0xFFFFFFFF_u32 &* (word >> 31)) << (32 - bits)
|
||||
end
|
||||
|
||||
# Rotate right
|
||||
|
|
Loading…
Add table
Reference in a new issue