added option parms-in-bank1
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 30 Jan 2002 04:08:15 +0000 (04:08 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 30 Jan 2002 04:08:15 +0000 (04:08 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1860 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c
src/SDCCast.h

index d6d8a8f6d497ea2fb633f60d32842bcdc16a090e..4e92814703d6836911229db21266e698fb73ab4f 100644 (file)
@@ -753,6 +753,7 @@ processParms (ast * func,
   /* make a copy and change the regparm type to the defined parm */
   actParm->etype = getSpec (actParm->ftype = copyLinkChain (actParm->ftype));
   SPEC_REGPARM (actParm->etype) = SPEC_REGPARM (defParm->etype);
+  SPEC_ARGREG  (actParm->etype) = SPEC_ARGREG (defParm->etype);
   (*parmNumber)++;
   return 0;
 }
index d42b7c6c962d21c6fc129408f2710c00965ff580..fa0b62314c2c74f9f150e2d1402587a4efbef983 100644 (file)
@@ -91,6 +91,7 @@ typedef struct ast
        unsigned literalFromCast;       /* true if this is an EX_VALUE of LITERAL 
                                         * type resulting from a typecast.
                                         */
+       int argreg;                     /* argreg number when operand type == EX_OPERAND */
       }
     values;
 
@@ -142,6 +143,8 @@ ast;
 #define AST_VALUE(x)            (x->opval.val)
 #define AST_VALUES(x,y)        (x->values.y)
 #define AST_FOR(x,y) x->values.forVals.y
+#define AST_ARGREG(x) x->values.argreg
+
 #define  IS_AST_PARAM(x)       (IS_AST_OP(x) && x->opval.op == PARAM)
 
 #define  CAN_EVAL(x)   (     x ==  '[' || x == '.' || x == PTR_OP ||   \