]> git.gag.com Git - fw/sdcc/commitdiff
MSVC 6 does not support macro variable arguments
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 9 Jan 2005 15:00:53 +0000 (15:00 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 9 Jan 2005 15:00:53 +0000 (15:00 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3630 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/pic16/gen.c

index 1f8fb99b90160ddbdebc413bf54a9084760467e8..e47753d3f6844b1022fd9d652f348bf4eef1c69a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
+
+       * src/pic16/gen.c (DEBUGpc): MSVC 6 does not support macro variable arguments
+
 2005-01-08 Raphael Neider <rneider AT web.de>
 
        * src/pic16/device.c (pic16_dump_usection) changed naming scheme for
index 7646de4f02c0bcd0fc4a5d959a6580a29a87c1e3..c0ba6354cb0ad9b23d73e305e4b64e1137def97d 100644 (file)
@@ -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;