From 336c13369ae69cbdc6377fb0dc3fccb002edf70f Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Thu, 12 Jan 2023 11:27:24 -0800 Subject: [PATCH] Add explanation for xxxL macro definitions to xc.c Define alternative macros for CSTKPTR, PVAR, and IVAR that can be used in an lvalue context, since CSTKPTR = ...; would generate error: assignment to cast is illegal, lvalue casts are not supported A similar issue drives the PCMAC/PCMACL defines, although there it is that the rvalue is (pccache - 1) and the lvalue is (pccache) --- src/xc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xc.c b/src/xc.c index f07e64a..a4b82dd 100644 --- a/src/xc.c +++ b/src/xc.c @@ -134,6 +134,11 @@ LispPTR tscache asm("bx"); #define IVAR ((LispPTR *)IVar) #define BCE_CURRENTFX ((struct frameex2 *)((DLword *)PVAR - FRAMESIZE)) +/* Define alternative macros for CSTKPTR, PVAR, and IVAR that can be used + * in an lvalue context, since CSTKPTR = ...; would generate + * error: assignment to cast is illegal, lvalue casts are not supported + */ + #define CSTKPTRL (cspcache) #define PVARL PVar #define IVARL IVar