From 4ff9d579bfb438187bb69ed60a5b23b0c7a55dfd Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 4 Nov 2019 12:20:16 +0000 Subject: [PATCH] base/asm-common.h: Decorate pseudoregister `nil' as `nil'. This allows `nil' to be passed through macros which want to apply decoration transforms to their register arguments through to other macros which treat `nil' as a special marker that a register is absent or otherwise not to be used. --- base/asm-common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base/asm-common.h b/base/asm-common.h index d162a5d9..ebcba2c6 100644 --- a/base/asm-common.h +++ b/base/asm-common.h @@ -311,6 +311,7 @@ name: // R_r(decor) applies decoration decor to register r, which is an internal // register name. The internal register names are: `ip', `a', `b', `c', `d', // `si', `di', `bp', `sp', `r8'--`r15'. +#define R_nil(decor) nil #define R_ip(decor) _DECOR(ip, decor, ip) #define R_a(decor) _DECOR(abcd, decor, a) #define R_b(decor) _DECOR(abcd, decor, b) @@ -345,6 +346,8 @@ name: // assembler-level register name, in place of any decoration that register // name has already. +#define _REGFORM_nil(decor) R_nil(decor) + #define _REGFORM_ip(decor) R_ip(decor) #define _REGFORM_eip(decor) R_ip(decor) @@ -667,6 +670,8 @@ name: // Internal macros: `_REGFORM_r(decor)' applies decoration decor to register // name r. +#define _REGFORM_nil(decor) nil + #define _REGFORM_s0(decor) _DECOR(s, decor, 0) #define _REGFORM_s1(decor) _DECOR(s, decor, 1) #define _REGFORM_s2(decor) _DECOR(s, decor, 2) -- 2.11.0