about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-05 10:25:24 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-05 10:25:24 -0700
commit99be75f147b32e21373ef98560a0acbd8e829475 (patch)
treeb405a8e9dcb2d7012c3455070bc4beba0b6fcdf5
parentc4021e4cef665c4f13a58292137c619b7aa308c7 (diff)
downloadmu-99be75f147b32e21373ef98560a0acbd8e829475.tar.gz
4491
-rw-r--r--subx/034discourage_raw_hex.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/subx/034discourage_raw_hex.cc b/subx/034discourage_raw_hex.cc
index cb097443..8d5eac7d 100644
--- a/subx/034discourage_raw_hex.cc
+++ b/subx/034discourage_raw_hex.cc
@@ -20,7 +20,18 @@ void warn_on_raw_jumps(/*const*/ program& p) {
   }
 }
 
+:(scenarios transform)
 :(scenario warn_on_hex_bytes_without_operands)
 == 0x1
 bb 2a 00 00 00  # copy 0x2a (42) to EBX
 +warn: 'bb 2a 00 00 00': using raw hex is not recommended
+
+:(scenario warn_on_non_operand_metadata)
+== 0x1
+bb 2a 00/foo 00/bar 00  # copy 0x2a (42) to EBX
++warn: 'bb 2a 00/foo 00/bar 00': using raw hex is not recommended
+
+:(scenario no_warn_on_instructions_without_operands)
+== 0x1
+55  # push EBP
+-warn: '55': using raw hex is not recommended