1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Moderately improve comments.

This commit is contained in:
Thomas Harte 2024-02-22 11:20:22 -05:00
parent 56a5df3783
commit 73d2acca12

View File

@ -80,6 +80,9 @@ constexpr bool flag_bit(uint8_t flags) {
return flags & (1 << (position - FlagsStartBit));
}
//
// Methods common to data processing and data transfer.
//
struct WithShiftControlBits {
constexpr WithShiftControlBits(uint32_t opcode) noexcept : opcode_(opcode) {}
@ -121,6 +124,7 @@ struct DataProcessingFlags {
/// @c false if it is defined by the @c shift_*() and @c operand2() fields.
constexpr bool operand2_is_immediate() { return flag_bit<25>(flags_); }
/// @c true if the status register should be updated; @c false otherwise.
constexpr bool set_condition_codes() { return flag_bit<20>(flags_); }
private:
@ -152,6 +156,7 @@ struct DataProcessing: public WithShiftControlBits {
struct MultiplyFlags {
constexpr MultiplyFlags(uint8_t flags) noexcept : flags_(flags) {}
/// @c true if the status register should be updated; @c false otherwise.
constexpr bool set_condition_codes() { return flag_bit<20>(flags_); }
private: