b=481351; TM ARM crash in js_FastNewObject while logging in to gmail (bad constant-offset load codegen); r=graydon

This commit is contained in:
Vladimir Vukicevic 2009-03-04 22:36:22 -08:00
Родитель 059943a7df
Коммит 9f8eca0449
1 изменённых файлов: 6 добавлений и 12 удалений

Просмотреть файл

@ -497,20 +497,14 @@ typedef enum {
#define LDR_chk(_d,_b,_off,_chk) do { \
if (IsFpReg(_d)) { \
FLDD_chk(_d,_b,_off,_chk); \
} else if ((_off)<0) { \
} else if ((_off) > -4096 && (_off) < 4096) { \
if (_chk) underrunProtect(4); \
NanoAssert((_off)>-4096); \
*(--_nIns) = (NIns)( COND_AL | (0x51<<20) | ((_b)<<16) | ((_d)<<12) | ((-(_off))&0xFFF) ); \
*(--_nIns) = (NIns)( COND_AL | (((_off) < 0 ? 0x51 : 0x59)<<20) | ((_b)<<16) | ((_d)<<12) | (((_off) < 0 ? -(_off) : (_off))&0xFFF) ); \
} else { \
if (isS16(_off) || isU16(_off)) { \
if (_chk) underrunProtect(4); \
NanoAssert((_off)<4096); \
*(--_nIns) = (NIns)( COND_AL | (0x59<<20) | ((_b)<<16) | ((_d)<<12) | ((_off)&0xFFF) ); \
} else { \
if (_chk) underrunProtect(4+LD32_size); \
*(--_nIns) = (NIns)( COND_AL | (0x79<<20) | ((_b)<<16) | ((_d)<<12) | Scratch ); \
LD32_nochk(Scratch, _off); \
} \
if (_chk) underrunProtect(4+LD32_size); \
NanoAssert((_b) != IP); \
*(--_nIns) = (NIns)( COND_AL | (0x79<<20) | ((_b)<<16) | ((_d)<<12) | Scratch ); \
LD32_nochk(Scratch, _off); \
} \
asm_output("ldr %s, [%s, #%d]",gpn(_d),gpn(_b),(_off)); \
} while(0)