/* restore the register bank */
if ( /* FUNC_REGBANK (sym->type) || */ IFFUNC_ISISR (sym->type))
{
- if (/* !FUNC_REGBANK (sym->type) || */ !IFFUNC_ISISR (sym->type)
+ if (!FUNC_REGBANK (sym->type) || !IFFUNC_ISISR (sym->type)
|| !options.useXstack)
{
/* Special case of ISR using non-zero bank with useXstack
if (blen < 8)
{
emitPtrByteGet (rname, ptype, FALSE);
- AccRsh (bstr);
+ AccRol (8 - bstr);
emitcode ("anl", "a,#0x%02x", ((unsigned char) -1) >> (8 - blen));
if (!SPEC_USIGN (etype))
{
/* signed bitfield */
symbol *tlbl = newiTempLabel (NULL);
- emitcode ("jnb", "acc.%d,%05d$", blen - 1, tlbl->key + 100);
+ emitcode ("jnb", "acc.%d,%05d$", rlen - 1, tlbl->key + 100);
emitcode ("orl", "a,#0x%02x", (unsigned char) (0xff << rlen));
emitcode ("", "%05d$:", tlbl->key + 100);
}
/* if the result is a bit (and not a bitfield) */
// if (AOP_TYPE (result) == AOP_CRY)
- if (IS_BITVAR (OP_SYMBOL (result)->type)
- && !IS_BITFIELD (OP_SYMBOL (result)->type) )
+ if (IS_BIT (OP_SYMBOL (result)->type))
+ /* not for bitfields */
{
/* if the right size is a literal then
we know what the value is */
char regsInUse[80];
int i;
+ #if 0
for (i=0; i<8; i++) {
sprintf (®sInUse[i],
- "%c", ic->riu & (1<<i) ? i+'0' : '-');
- }
+ "%c", ic->riu & (1<<i) ? i+'0' : '-'); /* show riu */
regsInUse[i]=0;
+ #else
+ strcpy (regsInUse, "--------");
+ for (i=0; i < 8; i++) {
+ if (bitVectBitValue (ic->rMask, i))
+ {
+ int offset = regs8051[i].offset;
+ regsInUse[offset] = offset + '0'; /* show rMask */
+ }
+ #endif
+ }
emitcode("", "; [%s] ic:%d: %s", regsInUse, ic->seq, printILine(ic));
}
/* if the result is marked as