about summary refs log tree commit diff stats
path: root/subx/035labels.cc
diff options
context:
space:
mode:
Diffstat (limited to 'subx/035labels.cc')
-rw-r--r--subx/035labels.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/subx/035labels.cc b/subx/035labels.cc
index e07cede8..cbe83802 100644
--- a/subx/035labels.cc
+++ b/subx/035labels.cc
@@ -105,6 +105,11 @@ void compute_byte_indices_for_labels(const segment& code, map<string, int32_t>&
           raise << "'" << to_string(inst) << "': don't use ':' when jumping to labels\n" << end();
         current_byte += 4;
       }
+      else if (has_operand_metadata(curr, "imm16")) {
+        if (*curr.data.rbegin() == ':')
+          raise << "'" << to_string(inst) << "': don't use ':' when jumping to labels\n" << end();
+        current_byte += 2;
+      }
       // automatically handle /disp8 and /imm8 here
       else if (*curr.data.rbegin() != ':') {
         ++current_byte;