Skip to content

Commit

Permalink
Thumb: Implemente ADC
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioC31 authored and guerinoni committed Dec 30, 2023
1 parent 0afb380 commit 4c285e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion emu/src/cpu/arm/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 306,7 @@ impl Arm7tdmi {
}
}

fn adc(&mut self, rd: usize, rn: u32, op2: u32, s: bool) {
pub fn adc(&mut self, rd: usize, rn: u32, op2: u32, s: bool) {
let carry: u32 = self.cpsr.carry_flag().into();

let first_op_result = Self::add_inner_op(rn, op2);
Expand Down
2 changes: 1 addition & 1 deletion emu/src/cpu/thumb/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 154,7 @@ impl Arm7tdmi {

self.mov(destination, second_operand, true);
}
ThumbModeAluInstruction::Adc => todo!(),
ThumbModeAluInstruction::Adc => self.adc(rd.into(), self.registers.register_at(rd.into()), rs, true),
ThumbModeAluInstruction::Sbc => todo!(),
ThumbModeAluInstruction::Ror => {
self.ror(rd.into(), rs);
Expand Down

0 comments on commit 4c285e2

Please sign in to comment.