From: sandeep Date: Wed, 7 Nov 2001 01:22:20 +0000 (+0000) Subject: Another small improvement on cast remat X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1e585e75063a3929301a9a032e6400d2c93d07bd;p=fw%2Fsdcc Another small improvement on cast remat git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1518 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 570539b4..d934902f 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -8962,7 +8962,13 @@ genPointerGet (iCode * ic) /* we have to go by the storage class */ p_type = PTR_TYPE (SPEC_OCLS (etype)); } - + /* special case when cast remat */ + if (p_type == GPOINTER && OP_SYMBOL(left)->remat && + IS_CAST_ICODE(OP_SYMBOL(left)->rematiCode)) { + left = IC_RIGHT(OP_SYMBOL(left)->rematiCode); + type = type = operandType (left); + p_type = DCL_TYPE (type); + } /* now that we have the pointer type we assign the pointer values */ switch (p_type) @@ -9559,6 +9565,13 @@ genPointerSet (iCode * ic) /* we have to go by the storage class */ p_type = PTR_TYPE (SPEC_OCLS (etype)); } + /* special case when cast remat */ + if (p_type == GPOINTER && OP_SYMBOL(result)->remat && + IS_CAST_ICODE(OP_SYMBOL(result)->rematiCode)) { + result = IC_RIGHT(OP_SYMBOL(result)->rematiCode); + type = type = operandType (result); + p_type = DCL_TYPE (type); + } /* now that we have the pointer type we assign the pointer values */