summaryrefslogtreecommitdiff
path: root/opcodes.inc.m4
diff options
context:
space:
mode:
authorAstrid Smith2010-11-12 22:34:36 -0800
committerAstrid Smith2010-11-12 22:34:36 -0800
commitfef8e437581e649d4bbc867d28f7e6ef98617bd4 (patch)
tree3a74c5c7c1447fc0f71d7dc58b85d857b4f9efa7 /opcodes.inc.m4
parent7306a2d260594efefe5761fc617a4e2aba97c41f (diff)
Added support for local labels in opcodes
I tried to use A68k's local label support, but I believe it was broken. Now I can use it, finally. :)
Diffstat (limited to 'opcodes.inc.m4')
-rw-r--r--opcodes.inc.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/opcodes.inc.m4 b/opcodes.inc.m4
index d7343e8..cbaafb9 100644
--- a/opcodes.inc.m4
+++ b/opcodes.inc.m4
@@ -2,6 +2,10 @@ dnl # change the comments to match the assembler. Prevents/reduces
dnl # confusion, since m4 likes to use ' as a quoting character.
changecom(;)dnl
define(`OPCODE',` START
+dnl # This little bit of trickery lets me define a local label.
+dnl # Calling local(end) inside of OPCODE(10, ...) will expand to
+dnl # end_10, and is undefined everywhere else.
+define(`local',$`'1_``$1'')dnl
`emu_op_'$1`:'
$2
TIME $3