From c57bb1e4bf84a681d688123c11f98fd928b574c7 Mon Sep 17 00:00:00 2001 From: Matthew Berry <me@mattrb.com> Date: Thu, 1 Apr 2021 23:18:58 -0700 Subject: [PATCH] abort on swap halfword transfers --- src/crab/arm/halfword_data_transfer_imm.cr | 1 + src/crab/arm/halfword_data_transfer_reg.cr | 1 + 2 files changed, 2 insertions(+) diff --git a/src/crab/arm/halfword_data_transfer_imm.cr b/src/crab/arm/halfword_data_transfer_imm.cr index 84528ed..a0c288b 100644 --- a/src/crab/arm/halfword_data_transfer_imm.cr +++ b/src/crab/arm/halfword_data_transfer_imm.cr @@ -23,6 +23,7 @@ module ARM case sh when 0b00 # swp, no docs on this? + abort "HalfwordDataTransferReg swp #{hex_str instr}" when 0b01 # ldrh/strh if load set_reg(rd, @gba.bus.read_half_rotate address) diff --git a/src/crab/arm/halfword_data_transfer_reg.cr b/src/crab/arm/halfword_data_transfer_reg.cr index 5ea109f..60cb1b6 100644 --- a/src/crab/arm/halfword_data_transfer_reg.cr +++ b/src/crab/arm/halfword_data_transfer_reg.cr @@ -22,6 +22,7 @@ module ARM case sh when 0b00 # swp, no docs on this? + abort "HalfwordDataTransferReg swp #{hex_str instr}" when 0b01 # ldrh/strh if load set_reg(rd, @gba.bus.read_half_rotate address)