1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 03:29:45 +00:00

Switch test and meaning.

This commit is contained in:
Thomas Harte 2024-03-03 14:34:21 -05:00
parent 7a5ed6c427
commit 9fd7d5c10f
2 changed files with 4 additions and 4 deletions

View File

@ -248,14 +248,14 @@ struct Executor {
// Calculate offset.
uint32_t offset;
if constexpr (flags.offset_is_immediate()) {
offset = transfer.immediate();
} else {
if constexpr (flags.offset_is_register()) {
// The 8 shift control bits are described in 6.2.3, but
// the register specified shift amounts are not available
// in this instruction class.
uint32_t carry = registers_.c();
offset = decode_shift<false, false>(transfer, carry, 4);
} else {
offset = transfer.immediate();
}
// Obtain base address.

View File

@ -232,7 +232,7 @@ struct SingleDataTransferFlags {
return flag_bit<20>(flags_) ? Operation::LDR : Operation::STR;
}
constexpr bool offset_is_immediate() const { return !flag_bit<25>(flags_); }
constexpr bool offset_is_register() const { return flag_bit<25>(flags_); }
constexpr bool pre_index() const { return flag_bit<24>(flags_); }
constexpr bool add_offset() const { return flag_bit<23>(flags_); }
constexpr bool transfer_byte() const { return flag_bit<22>(flags_); }