about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-09-12 15:25:43 -0700
committerKartik Agaram <vc@akkartik.com>2018-09-12 15:25:43 -0700
commit52cf3147bef91837f0bcb14b2820aee02174a0b5 (patch)
treeb45c79864a354c0aa832f5a03982e0f690416b44 /subx
parent020a39e12e57c0acce011d69fd02a27393292950 (diff)
downloadmu-52cf3147bef91837f0bcb14b2820aee02174a0b5.tar.gz
4542
Fix CI (`subx translate examples/ex6.subx examples/ex6`)
Diffstat (limited to 'subx')
-rw-r--r--subx/036global_variables.cc4
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 {