From b2296be7cc1383301e2e72988dba3cc38f9415ce Mon Sep 17 00:00:00 2001 From: jesusc Date: Sun, 9 Jan 2005 15:00:53 +0000 Subject: [PATCH] MSVC 6 does not support macro variable arguments git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3630 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 4 ++++ src/pic16/gen.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1f8fb99b..e47753d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-08-04 Jesus Calvino-Fraga + + * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments + 2005-01-08 Raphael Neider * src/pic16/device.c (pic16_dump_usection) changed naming scheme for diff --git a/src/pic16/gen.c b/src/pic16/gen.c index 7646de4f..c0ba6354 100644 --- a/src/pic16/gen.c +++ b/src/pic16/gen.c @@ -4748,7 +4748,9 @@ static int genChkZeroes(operand *op, int lit, int size) } #endif +#if !defined(__BORLANDC__) && !defined(_MSC_VER) #define DEBUGpc(fmt,...) DEBUGpic16_emitcode("; =:=", "%s:%s:%d: " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) +#endif #define isAOP_LIT(x) (AOP_TYPE(x) == AOP_LIT) #define isAOP_REGlike(x) (AOP_TYPE(x) == AOP_REG || AOP_TYPE(x) == AOP_DIR || AOP_TYPE(x) == AOP_PCODE || AOP_TYPE(x) == AOP_STA) @@ -4831,7 +4833,9 @@ static void genCmp (operand *left,operand *right, * make sure that left is register (or the like) * *************************************************/ if (!isAOP_REGlike(left)) { + #if !defined(__BORLANDC__) && !defined(_MSC_VER) DEBUGpc ("swapping arguments (AOP_TYPEs %d/%d)", AOP_TYPE(left), AOP_TYPE(right)); + #endif assert (isAOP_LIT(left)); assert (isAOP_REGlike(right)); // swap left and right @@ -4867,7 +4871,9 @@ static void genCmp (operand *left,operand *right, if (isAOP_LIT(right)) { if (!sign) { // unsigned comparison to a literal + #if !defined(__BORLANDC__) && !defined(_MSC_VER) DEBUGpc ("unsigned compare: left %s lit(0x%X=%lu), size=%d", performedLt ? "<" : ">=", lit, lit, size+1); + #endif if (lit == 0) { // unsigned left < 0? always false if (performedLt) emitCLRC; else emitSETC; @@ -4875,7 +4881,9 @@ static void genCmp (operand *left,operand *right, } } else { // signed comparison to a literal + #if !defined(__BORLANDC__) && !defined(_MSC_VER) DEBUGpc ("signed compare: left %s lit(0x%X=%ld), size=%d, mask=%x", performedLt ? "<" : ">=", lit, lit, size+1, mask); + #endif if ((lit & mask) == ((0x80 << (size*8)) & mask)) { // signed left < 0x80000000? always false if (performedLt) emitCLRC; else emitSETC; -- 2.47.2