chore: replace set() and unset() with write()
This commit is contained in:
@@ -12,7 +12,7 @@ pub fn branch(comptime InstrFn: type, comptime L: bool) InstrFn {
|
||||
const offset = sext(u32, u24, opcode) << 2 | @as(u32, @intFromBool(H)) << 1;
|
||||
|
||||
cpu.r[14] = cpu.r[15] - 4;
|
||||
cpu.cpsr.t.set();
|
||||
cpu.cpsr.t.write(true);
|
||||
|
||||
cpu.r[15] +%= offset;
|
||||
},
|
||||
|
||||
@@ -68,7 +68,7 @@ pub fn control(comptime InstrFn: type, comptime I: bool, comptime op: u6) InstrF
|
||||
|
||||
if (ret[1] == 0b1) {
|
||||
product = if (product < 0) std.math.maxInt(i32) else std.math.minInt(i32);
|
||||
cpu.cpsr.q.set();
|
||||
cpu.cpsr.q.write(true);
|
||||
}
|
||||
|
||||
break :blk product;
|
||||
@@ -79,7 +79,7 @@ pub fn control(comptime InstrFn: type, comptime I: bool, comptime op: u6) InstrF
|
||||
|
||||
if (ret[1] == 0b1) {
|
||||
result = if (result < 0) std.math.maxInt(i32) else std.math.minInt(i32);
|
||||
cpu.cpsr.q.set();
|
||||
cpu.cpsr.q.write(true);
|
||||
}
|
||||
|
||||
cpu.r[rd] = @bitCast(result);
|
||||
@@ -102,7 +102,7 @@ pub fn control(comptime InstrFn: type, comptime I: bool, comptime op: u6) InstrF
|
||||
const result = @addWithOverflow(left * right, accumulate);
|
||||
cpu.r[rd] = @bitCast(result[0]);
|
||||
|
||||
if (result[1] == 0b1) cpu.cpsr.q.set();
|
||||
if (result[1] == 0b1) cpu.cpsr.q.write(true);
|
||||
},
|
||||
|
||||
0b10_1000, 0b10_1010, 0b10_1100, 0b10_1110 => { // SMLAL<x><y>
|
||||
@@ -143,7 +143,7 @@ pub fn control(comptime InstrFn: type, comptime I: bool, comptime op: u6) InstrF
|
||||
const ret = @addWithOverflow(@as(i32, @truncate((left * right) >> 16)), accumulate);
|
||||
|
||||
cpu.r[rd] = @bitCast(ret[0]);
|
||||
if (ret[1] == 0b1) cpu.cpsr.q.set();
|
||||
if (ret[1] == 0b1) cpu.cpsr.q.write(true);
|
||||
},
|
||||
|
||||
0b01_1010, 0b01_1110 => { // SMULW<y>
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn linkExchange(comptime InstrFn: type, comptime H: u2) InstrFn {
|
||||
|
||||
cpu.r[15] = (cpu.r[14] +% (offset << 1)) & ~@as(u32, 0x3);
|
||||
cpu.r[14] = next_addr | 1;
|
||||
cpu.cpsr.t.unset();
|
||||
cpu.cpsr.t.write(false);
|
||||
|
||||
cpu.pipe.reload(cpu);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user