diff --git a/src/frontend/A64/imm.h b/src/frontend/A64/imm.h index 23b4b71c..9b33ab2e 100644 --- a/src/frontend/A64/imm.h +++ b/src/frontend/A64/imm.h @@ -46,6 +46,7 @@ public: template T Bits() const { + static_assert(begin_bit <= end_bit && end_bit < bit_size); static_assert(Common::BitSize() >= end_bit - begin_bit + 1); return static_cast(Common::Bits(value)); } @@ -87,7 +88,7 @@ bool operator!=(const Imm& a, u32 b) { /** * Concatentate immediates together. - * Left to right correpeonds to most significant imm to least significant imm. + * Left to right corresponds to most significant imm to least significant imm. * This is equivalent to a:b:...:z in ASL. */ template