From 13346ddce48b72e143df153b65d7fc3b0873616a Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 30 Jul 2018 09:58:13 -0700 Subject: 4452 Keep a few macros more tightly scoped to just the transform they're used in. --- subx/022check_instruction.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'subx/022check_instruction.cc') diff --git a/subx/022check_instruction.cc b/subx/022check_instruction.cc index a4a4ec14..6fef09be 100644 --- a/subx/022check_instruction.cc +++ b/subx/022check_instruction.cc @@ -260,12 +260,11 @@ void init_permitted_operands() { // End Init Permitted Operands } -:(before "End Includes") +:(code) #define HAS(bitvector, bit) ((bitvector) & (1 << (bit))) #define SET(bitvector, bit) ((bitvector) | (1 << (bit))) #define CLEAR(bitvector, bit) ((bitvector) & (~(1 << (bit)))) -:(code) void check_operands(const line& inst, const word& op) { if (!is_hex_byte(op)) return; uint8_t expected_bitvector = get(Permitted_operands, op.data); @@ -605,6 +604,10 @@ string tolower(const char* s) { return out.str(); } +#undef HAS +#undef SET +#undef CLEAR + //:: docs on each operand type :(before "End Help Texts") -- cgit 1.4.1-2-gfad0