#790 "!constbyte" left to asm-source

closed-fixed
Erik Petrich
None
5
2013-05-25
2004-07-17
Mika Rasimus
No

sdcc --int-long-reent --stack-auto --use-stdout
_Testi.c
------------------------------------------------
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long LONG;

typedef struct _STMEM STMEM;
typedef struct _CNSTMEM CNSTMEM;
typedef struct _ARKISTOINTISET ARKISTOINTISET;

struct _ARKISTOINTISET
{
BYTE ref[4];
};
struct _STMEM
{
ARKISTOINTISET ark;
};
struct _CNSTMEM
{
BYTE dirs[(4+1)/2];
};

void printAlarm(void);
BYTE usrPrintAlarm(void);
void printT(code char *);

volatile code at 0x00 STMEM stmem={ 0 };
volatile code at 0x80 CNSTMEM cnstmem={ 0 };
xdata STMEM bstmem;

void main(void)
{
printAlarm();
}

void printAlarm(void)
{
BYTE apu, apu2, apu3, n;
for (n=0; n<4; n++)
{
if (bstmem.ark.ref[n]<0xff)
{
apu2=cnstmem.dirs[n>>1];
if (n&1) apu2>>=4; else apu2&=0x0f;
apu3=bstmem.ark.ref[n]>>(apu2&0x03);
if ((apu2&0x8) && (apu<(bstmem.ark.ref[n]-
apu3)))
printT("A");
else if ((apu2&0x4) &&(apu>(bstmem.ark.ref[n]
+apu3)))
printT("Y");
else printT("-");
}
};
}
------------------------

Produces:
;_Testi.c:45: if ((apu2&0x8) && (apu<(bstmem.ark.ref
[n]-apu3)))
; genAnd
mov a,r3
anl a,#!constbyte

Discussion

  • Erik Petrich
    Erik Petrich
    2004-08-06

    Logged In: YES
    user_id=635249

    Fixed in src/mcs51/gen.c 1.205

     
  • Erik Petrich
    Erik Petrich
    2004-08-06

    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed