diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-09-12 15:25:43 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-09-12 15:25:43 -0700 |
commit | 52cf3147bef91837f0bcb14b2820aee02174a0b5 (patch) | |
tree | b45c79864a354c0aa832f5a03982e0f690416b44 /subx | |
parent | 020a39e12e57c0acce011d69fd02a27393292950 (diff) | |
download | mu-52cf3147bef91837f0bcb14b2820aee02174a0b5.tar.gz |
4542
Fix CI (`subx translate examples/ex6.subx examples/ex6`)
Diffstat (limited to 'subx')
-rw-r--r-- | subx/036global_variables.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/036global_variables.cc b/subx/036global_variables.cc index 7a6463e0..d0bb3008 100644 --- a/subx/036global_variables.cc +++ b/subx/036global_variables.cc @@ -72,8 +72,8 @@ void replace_global_variables_with_addresses(program& p, const map<string, uint3 const word& curr = inst.words.at(j); if (contains_key(address, curr.data)) { uint32_t value = get(address, curr.data); - if (!has_metadata(curr, "imm32")) - raise << "'" << to_string(inst) << "': data variables should always be in '/imm32' operands\n" << end(); + if (!has_metadata(curr, "imm32") && !has_metadata(curr, "disp32")) + raise << "'" << to_string(inst) << "': data variables should always be in '/imm32' operands (or, if mod is 00 and rm32 is 101, /disp32)\n" << end(); emit_hex_bytes(new_inst, value, 4); } else { |