diff options
-rw-r--r-- | subx/030---operands.cc | 2 | ||||
-rw-r--r-- | subx/035labels.cc | 3 | ||||
-rw-r--r-- | subx/036global_variables.cc | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/subx/030---operands.cc b/subx/030---operands.cc index a9c85778..34953480 100644 --- a/subx/030---operands.cc +++ b/subx/030---operands.cc @@ -351,6 +351,7 @@ b9 0x080490a7/imm32 # copy to ECX :(scenarios transform) :(scenario pack_silently_ignores_non_hex) +% Hide_errors = true; == 0x1 # instruction effective address operand displacement immediate # op subop mod rm32 base index scale r32 @@ -359,7 +360,6 @@ b9 0x080490a7/imm32 # copy to ECX +transform: packing instruction 'bb foo/imm32' # no change (we're just not printing metadata to the trace) +transform: instruction after packing: 'bb foo' -$error: 0 :(scenarios run) :(scenario pack_flags_bad_hex) diff --git a/subx/035labels.cc b/subx/035labels.cc index 75000233..c2965b2c 100644 --- a/subx/035labels.cc +++ b/subx/035labels.cc @@ -24,6 +24,7 @@ if (SIZE(s) == 2) return true; :(scenarios transform) :(scenario pack_immediate_ignores_single_byte_nondigit_operand) +% Hide_errors = true; == 0x1 b9/copy a/imm32 # copy to ECX +transform: packing instruction 'b9/copy a/imm32' @@ -31,6 +32,7 @@ b9/copy a/imm32 # copy to ECX +transform: instruction after packing: 'b9 a' :(scenario pack_immediate_ignores_3_hex_digit_operand) +% Hide_errors = true; == 0x1 b9/copy aaa/imm32 # copy to ECX +transform: packing instruction 'b9/copy aaa/imm32' @@ -38,6 +40,7 @@ b9/copy aaa/imm32 # copy to ECX +transform: instruction after packing: 'b9 aaa' :(scenario pack_immediate_ignores_non_hex_operand) +% Hide_errors = true; == 0x1 b9/copy xxx/imm32 # copy to ECX +transform: packing instruction 'b9/copy xxx/imm32' diff --git a/subx/036global_variables.cc b/subx/036global_variables.cc index f278ee29..e34c5b73 100644 --- a/subx/036global_variables.cc +++ b/subx/036global_variables.cc @@ -69,6 +69,8 @@ void replace_global_variables_with_addresses(program& p, const map<string, uint3 for (int j = 0; j < SIZE(inst.words); ++j) { const word& curr = inst.words.at(j); if (!contains_key(address, curr.data)) { + if (!looks_like_hex_int(curr.data)) + raise << "missing reference to global '" << curr.data << "'\n" << end(); new_inst.words.push_back(curr); continue; } |