mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-06 13:31:55 +00:00
Switch test and meaning.
This commit is contained in:
parent
7a5ed6c427
commit
9fd7d5c10f
@ -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.
|
||||
|
@ -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_); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user