pub fn cmprb_0(inputs: InstructionInput) -> InstructionResult {
let ra = inputs.try_get_ra()? as u8;
let rb: u64 = inputs.try_get_rb()?;
- let eq = ra >= rb as u8 && ra <= (rb >> 8) as u8;
+ let in_range = ra >= rb as u8 && ra <= (rb >> 8) as u8;
let cr0 = ConditionRegister {
lt: false,
- gt: false,
- eq,
+ gt: in_range,
+ eq: false,
so: false,
};
Ok(InstructionOutput {
// cmprb 0, 0, ..., ...
#[enumerant = CmpRB0]
- fn cmprb_0(Ra, Rb) -> (CR0) {
- "cmprb 0, 0,"
+ fn cmprb_0(Ra("r3"), Rb("r4")) -> (CR0) {
+ "cmprb_0" : "cmprb 0, 0, 3, 4"
}
}