base/asm-common.h: Implement the `r' decorator for `MEM' accesses.
[catacomb] / base / asm-common.h
index 4fe7243..040250b 100644 (file)
@@ -279,22 +279,24 @@ name:
 #  define _DECOR_rn_r(reg) reg
 #endif
 
+#define _DECOR_mem_b(addr) byte ptr addr
+#define _DECOR_mem_w(addr) word ptr addr
+#define _DECOR_mem_d(addr) dword ptr addr
+#if CPUFAM_AMD64
+#  define _DECOR_mem_q(addr) qword ptr addr
+#endif
+
 #if CPUFAM_X86
 #  define _DECOR_abcd_r(reg) e##reg##x
 #  define _DECOR_xp_r(reg) e##reg
 #  define _DECOR_ip_r(reg) e##reg
+#  define _DECOR_mem_r(addr) dword ptr addr
 #endif
 #if CPUFAM_AMD64
 #  define _DECOR_abcd_r(reg) r##reg##x
 #  define _DECOR_xp_r(reg) r##reg
 #  define _DECOR_ip_r(reg) r##reg
-#endif
-
-#define _DECOR_mem_b(addr) byte ptr addr
-#define _DECOR_mem_w(addr) word ptr addr
-#define _DECOR_mem_d(addr) dword ptr addr
-#if CPUFAM_AMD64
-#  define _DECOR_mem_q(addr) qword ptr addr
+#  define _DECOR_mem_r(addr) qword ptr addr
 #endif
 
 // R_r(decor) applies decoration decor to register r, which is an internal