Skip to content

Ghidra is a software reverse engineering (SRE) framework

8048: Avoid use of macro expansion

Marcus Comstedt3dfb8bc97421
diff --git a/Ghidra/Processors/8048/data/languages/8048.slaspec b/Ghidra/Processors/8048/data/languages/8048.slaspec
index e75f207db2..b29638e7bf 100644
--- a/Ghidra/Processors/8048/data/languages/8048.slaspec
+++ b/Ghidra/Processors/8048/data/languages/8048.slaspec
@@ -9,10 +9,7 @@
@ifdef INTERNAL_REGISTERS
-@define RegType variables
@define SINGLE_REGISTER_BANK
-@else
-@define RegType names
@endif
@@ -67,8 +64,13 @@ define token aopword (16)
define token ImmedByte (8) data=(0,7);
define token AddrOne (8) addr8=(0,7);
-attach $(RegType) rn [ R0 R1 R2 R3 R4 R5 R6 R7 ];
-attach $(RegType) ri [ R0 R1 ];
+@ifdef INTERNAL_REGISTERS
+attach variables rn [ R0 R1 R2 R3 R4 R5 R6 R7 ];
+attach variables ri [ R0 R1 ];
+@else
+attach names rn [ R0 R1 R2 R3 R4 R5 R6 R7 ];
+attach names ri [ R0 R1 ];
+@endif
attach names dfb [ MB0 MB1 ];
attach names bs [ RB0 RB1 ];
attach names pp [ BUS P1 P2 _ ];