From: sandeep Date: Mon, 13 Nov 2000 22:26:47 +0000 (+0000) Subject: Fixed some BITFIELD related problems X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=b7ca8e4df96e9c06976aec8f0ffad8ba227485fb;p=fw%2Fsdcc Fixed some BITFIELD related problems git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@498 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index 788187d5..cc5aff3f 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -1558,6 +1558,10 @@ ast *decorateType (ast *tree) /* otherwise just copy the type information */ COPYTYPE(TTYPE(tree),TETYPE(tree),tree->opval.val->type); + if (funcInChain(tree->opval.val->type)) { + tree->hasVargs = tree->opval.val->sym->hasVargs; + tree->args = copyValueChain(tree->opval.val->sym->args) ; + } return tree ; } diff --git a/src/SDCCcse.c b/src/SDCCcse.c index 3d1a234d..f0859751 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -1295,7 +1295,8 @@ int cseBBlock ( eBBlock *ebb, int computeOnly, /* update the spill location for this */ updateSpillLocation (ic); - if (POINTER_SET(ic)) { + if (POINTER_SET(ic) && + !(IS_BITFIELD(OP_SYMBOL(IC_RESULT(ic))->etype))) { pdop = NULL ; applyToSetFTrue (cseSet,findCheaperOp,IC_RESULT(ic),&pdop); if (pdop && IS_ITEMP(pdop) && !computeOnly) diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 53284941..e2780d51 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -856,8 +856,6 @@ int compStructSize (int su, structdef *sdef ) else /* does not fit */ { bitOffset = 0 ; - loop->offset++; /* go to the next byte */ - sum++ ; SPEC_BSTR(loop->etype) = bitOffset ; sum += (loop->bitVar / 8) ; bitOffset += (loop->bitVar % 8);