nanojit/NativeARM.h: remove NJ_ARM_ARCH (code=bramley,r=stejohns,bug=541258)

--HG--
extra : convert_revision : cfcf246845a1fa07f60c791bdc471ed11a10351a
This commit is contained in:
Steven Johnson 2010-01-22 12:39:57 -08:00
parent 605b734ba8
commit 37c967beaf

View File

@ -467,42 +467,25 @@ enum {
// -------- // --------
// [_d_hi,_d] = _l * _r // [_d_hi,_d] = _l * _r
#define SMULL_dont_check_op1(_d, _d_hi, _l, _r) do { \ #define SMULL(_d, _d_hi, _l, _r) do { \
underrunProtect(4); \ underrunProtect(4); \
NanoAssert((ARM_ARCH >= 6) || ((_d) != (_l))); \ NanoAssert((ARM_ARCH >= 6) || ((_d ) != (_l))); \
NanoAssert((ARM_ARCH >= 6) || ((_d_hi) != (_l))); \
NanoAssert(IsGpReg(_d) && IsGpReg(_d_hi) && IsGpReg(_l) && IsGpReg(_r)); \ NanoAssert(IsGpReg(_d) && IsGpReg(_d_hi) && IsGpReg(_l) && IsGpReg(_r)); \
NanoAssert(((_d) != PC) && ((_d_hi) != PC) && ((_l) != PC) && ((_r) != PC));\ NanoAssert(((_d) != PC) && ((_d_hi) != PC) && ((_l) != PC) && ((_r) != PC)); \
*(--_nIns) = (NIns)( COND_AL | 0xc00090 | (_d_hi)<<16 | (_d)<<12 | (_r)<<8 | (_l) );\ *(--_nIns) = (NIns)( COND_AL | 0xc00090 | (_d_hi)<<16 | (_d)<<12 | (_r)<<8 | (_l) ); \
asm_output("smull %s, %s, %s, %s",gpn(_d),gpn(_d_hi),gpn(_l),gpn(_r)); \ asm_output("smull %s, %s, %s, %s",gpn(_d),gpn(_d_hi),gpn(_l),gpn(_r)); \
} while(0) } while(0)
#if NJ_ARM_ARCH >= NJ_ARM_V6
#define SMULL(_d, _d_hi, _l, _r) SMULL_dont_check_op1(_d, _d_hi, _l, _r)
#else
#define SMULL(_d, _d_hi, _l, _r) do { \
NanoAssert( (_d)!=(_l)); \
NanoAssert((_d_hi)!=(_l)); \
SMULL_dont_check_op1(_d, _d_hi, _l, _r); \
} while(0)
#endif
// _d = _l * _r // _d = _l * _r
#define MUL_dont_check_op1(_d, _l, _r) do { \ #define MUL(_d, _l, _r) do { \
underrunProtect(4); \ underrunProtect(4); \
NanoAssert((ARM_ARCH >= 6) || ((_d) != (_l))); \ NanoAssert((ARM_ARCH >= 6) || ((_d) != (_l))); \
NanoAssert(IsGpReg(_d) && IsGpReg(_l) && IsGpReg(_r)); \ NanoAssert(IsGpReg(_d) && IsGpReg(_l) && IsGpReg(_r)); \
NanoAssert(((_d) != PC) && ((_l) != PC) && ((_r) != PC)); \ NanoAssert(((_d) != PC) && ((_l) != PC) && ((_r) != PC)); \
*(--_nIns) = (NIns)( COND_AL | (_d)<<16 | (_r)<<8 | 0x90 | (_l) ); \ *(--_nIns) = (NIns)( COND_AL | (_d)<<16 | (_r)<<8 | 0x90 | (_l) ); \
asm_output("mul %s, %s, %s",gpn(_d),gpn(_l),gpn(_r)); } while(0) asm_output("mul %s, %s, %s",gpn(_d),gpn(_l),gpn(_r)); \
} while(0)
#if NJ_ARM_ARCH >= NJ_ARM_V6
#define MUL(_d, _l, _r) MUL_dont_check_op1(_d, _l, _r)
#else
#define MUL(_d, _l, _r) do { \
NanoAssert((_d)!=(_l)); \
MUL_dont_check_op1(_d, _l, _r); \
} while(0)
#endif
// RSBS _d, _r // RSBS _d, _r
// _d = 0 - _r // _d = 0 - _r