diff --git a/js/src/nanojit/NativeSH4.cpp b/js/src/nanojit/NativeSH4.cpp index 18dd171e198..83f1b4398df 100644 --- a/js/src/nanojit/NativeSH4.cpp +++ b/js/src/nanojit/NativeSH4.cpp @@ -79,25 +79,25 @@ namespace nanojit #define FITS_SH4_add_imm(imm) (SH4_CHECK_RANGE_add_imm(imm)) inline void Assembler::SH4_add_imm(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_add_imm(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_add_imm(imm)); SH4_emit16((0x7 << 12) | ((Rx & 0xF) << 8) | ((imm & 0xFF) << 0)); asm_output("add_imm %d, R%d", imm, Rx); } inline void Assembler::SH4_add(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xC << 0)); asm_output("add R%d, R%d", Ry, Rx); } inline void Assembler::SH4_addc(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xE << 0)); asm_output("addc R%d, R%d", Ry, Rx); } inline void Assembler::SH4_addv(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xF << 0)); asm_output("addv R%d, R%d", Ry, Rx); } @@ -113,7 +113,7 @@ namespace nanojit } inline void Assembler::SH4_and(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x9 << 0)); asm_output("and R%d, R%d", Ry, Rx); } @@ -229,55 +229,55 @@ namespace nanojit } inline void Assembler::SH4_cmpeq(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x0 << 0)); asm_output("cmpeq R%d, R%d", Ry, Rx); } inline void Assembler::SH4_cmpge(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x3 << 0)); asm_output("cmpge R%d, R%d", Ry, Rx); } inline void Assembler::SH4_cmpgt(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x7 << 0)); asm_output("cmpgt R%d, R%d", Ry, Rx); } inline void Assembler::SH4_cmphi(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("cmphi R%d, R%d", Ry, Rx); } inline void Assembler::SH4_cmphs(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x2 << 0)); asm_output("cmphs R%d, R%d", Ry, Rx); } inline void Assembler::SH4_cmppl(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x5 << 0)); asm_output("cmppl R%d", Rx); } inline void Assembler::SH4_cmppz(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x1 << 0)); asm_output("cmppz R%d", Rx); } inline void Assembler::SH4_cmpstr(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xC << 0)); asm_output("cmpstr R%d, R%d", Ry, Rx); } inline void Assembler::SH4_div0s(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x7 << 0)); asm_output("div0s R%d, R%d", Ry, Rx); } @@ -289,91 +289,91 @@ namespace nanojit } inline void Assembler::SH4_div1(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x4 << 0)); asm_output("div1 R%d, R%d", Ry, Rx); } inline void Assembler::SH4_extsb(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xE << 0)); asm_output("extsb R%d, R%d", Ry, Rx); } inline void Assembler::SH4_extsw(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xF << 0)); asm_output("extsw R%d, R%d", Ry, Rx); } inline void Assembler::SH4_extub(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xC << 0)); asm_output("extub R%d, R%d", Ry, Rx); } inline void Assembler::SH4_extuw(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xD << 0)); asm_output("extuw R%d, R%d", Ry, Rx); } inline void Assembler::SH4_icbi_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0xE << 4) | (0x3 << 0)); asm_output("icbi_indRx R%d", Rx); } inline void Assembler::SH4_jmp_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0xB << 0)); asm_output("jmp_indRx R%d", Rx); } inline void Assembler::SH4_jsr_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0xB << 0)); asm_output("jsr_indRx R%d", Rx); } inline void Assembler::SH4_ldc_SR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0xE << 0)); asm_output("ldc_SR R%d", Rx); } inline void Assembler::SH4_ldc_GBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0xE << 0)); asm_output("ldc_GBR R%d", Rx); } inline void Assembler::SH4_ldc_SGR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0xA << 0)); asm_output("ldc_SGR R%d", Rx); } inline void Assembler::SH4_ldc_VBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0xE << 0)); asm_output("ldc_VBR R%d", Rx); } inline void Assembler::SH4_ldc_SSR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0xE << 0)); asm_output("ldc_SSR R%d", Rx); } inline void Assembler::SH4_ldc_SPC(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x4 << 4) | (0xE << 0)); asm_output("ldc_SPC R%d", Rx); } inline void Assembler::SH4_ldc_DBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0xF << 4) | (0xA << 0)); asm_output("ldc_DBR R%d", Rx); } @@ -383,49 +383,49 @@ namespace nanojit #define FITS_SH4_ldc_bank(imm) (SH4_CHECK_RANGE_ldc_bank(imm)) inline void Assembler::SH4_ldc_bank(Register Rx, int imm) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_ldc_bank(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_ldc_bank(imm)); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | ((imm & 0x7) << 4) | (0xE << 0)); asm_output("ldc_bank R%d, %d", Rx, imm); } inline void Assembler::SH4_ldcl_incRx_SR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x7 << 0)); asm_output("ldcl_incRx_SR R%d", Rx); } inline void Assembler::SH4_ldcl_incRx_GBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x7 << 0)); asm_output("ldcl_incRx_GBR R%d", Rx); } inline void Assembler::SH4_ldcl_incRx_VBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x7 << 0)); asm_output("ldcl_incRx_VBR R%d", Rx); } inline void Assembler::SH4_ldcl_incRx_SGR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0x6 << 0)); asm_output("ldcl_incRx_SGR R%d", Rx); } inline void Assembler::SH4_ldcl_incRx_SSR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0x7 << 0)); asm_output("ldcl_incRx_SSR R%d", Rx); } inline void Assembler::SH4_ldcl_incRx_SPC(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x4 << 4) | (0x7 << 0)); asm_output("ldcl_incRx_SPC R%d", Rx); } inline void Assembler::SH4_ldcl_incRx_DBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0xF << 4) | (0x6 << 0)); asm_output("ldcl_incRx_DBR R%d", Rx); } @@ -435,67 +435,67 @@ namespace nanojit #define FITS_SH4_ldcl_incRx_bank(imm) (SH4_CHECK_RANGE_ldcl_incRx_bank(imm)) inline void Assembler::SH4_ldcl_incRx_bank(Register Rx, int imm) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_ldcl_incRx_bank(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_ldcl_incRx_bank(imm)); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | ((imm & 0x7) << 4) | (0x7 << 0)); asm_output("ldcl_incRx_bank R%d, %d", Rx, imm); } inline void Assembler::SH4_lds_MACH(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0xA << 0)); asm_output("lds_MACH R%d", Rx); } inline void Assembler::SH4_lds_MACL(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0xA << 0)); asm_output("lds_MACL R%d", Rx); } inline void Assembler::SH4_lds_PR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0xA << 0)); asm_output("lds_PR R%d", Rx); } inline void Assembler::SH4_lds_FPUL(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Ry & 0xF) << 8) | (0x5 << 4) | (0xA << 0)); asm_output("lds_FPUL R%d", Ry); } inline void Assembler::SH4_lds_FPSCR(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Ry & 0xF) << 8) | (0x6 << 4) | (0xA << 0)); asm_output("lds_FPSCR R%d", Ry); } inline void Assembler::SH4_ldsl_incRx_MACH(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x6 << 0)); asm_output("ldsl_incRx_MACH R%d", Rx); } inline void Assembler::SH4_ldsl_incRx_MACL(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x6 << 0)); asm_output("ldsl_incRx_MACL R%d", Rx); } inline void Assembler::SH4_ldsl_incRx_PR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x6 << 0)); asm_output("ldsl_incRx_PR R%d", Rx); } inline void Assembler::SH4_ldsl_incRy_FPUL(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Ry & 0xF) << 8) | (0x5 << 4) | (0x6 << 0)); asm_output("ldsl_incRy_FPUL R%d", Ry); } inline void Assembler::SH4_ldsl_incRy_FPSCR(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Ry & 0xF) << 8) | (0x6 << 4) | (0x6 << 0)); asm_output("ldsl_incRy_FPSCR R%d", Ry); } @@ -507,7 +507,7 @@ namespace nanojit } inline void Assembler::SH4_macw_incRy_incRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xF << 0)); asm_output("macw_incRy_incRx R%d, R%d", Ry, Rx); } @@ -517,31 +517,31 @@ namespace nanojit #define FITS_SH4_mov_imm(imm) (SH4_CHECK_RANGE_mov_imm(imm)) inline void Assembler::SH4_mov_imm(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_mov_imm(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_mov_imm(imm)); SH4_emit16((0xE << 12) | ((Rx & 0xF) << 8) | ((imm & 0xFF) << 0)); asm_output("mov_imm %d, R%d", imm, Rx); } inline void Assembler::SH4_mov(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x3 << 0)); asm_output("mov R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movb_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x4 << 0)); asm_output("movb_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movb_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x4 << 0)); asm_output("movb_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movb_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x0 << 0)); asm_output("movb_indRx R%d, R%d", Ry, Rx); } @@ -551,7 +551,7 @@ namespace nanojit #define FITS_SH4_movb_dispRy_R0(imm) (SH4_CHECK_RANGE_movb_dispRy_R0(imm)) inline void Assembler::SH4_movb_dispRy_R0(int imm, Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15 && SH4_CHECK_RANGE_movb_dispRy_R0(imm)); + NanoAssert(1 && Ry <= 15 && SH4_CHECK_RANGE_movb_dispRy_R0(imm)); SH4_emit16((0x8 << 12) | (0x4 << 8) | ((Ry & 0xF) << 4) | ((imm & 0xF) << 0)); asm_output("movb_dispRy_R0 %d, R%d", imm, Ry); } @@ -567,19 +567,19 @@ namespace nanojit } inline void Assembler::SH4_movb_dispR0Ry(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xC << 0)); asm_output("movb_dispR0Ry R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movb_incRy(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x4 << 0)); asm_output("movb_incRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movb_indRy(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x0 << 0)); asm_output("movb_indRy R%d, R%d", Ry, Rx); } @@ -589,7 +589,7 @@ namespace nanojit #define FITS_SH4_movb_R0_dispRx(imm) (SH4_CHECK_RANGE_movb_R0_dispRx(imm)) inline void Assembler::SH4_movb_R0_dispRx(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_movb_R0_dispRx(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_movb_R0_dispRx(imm)); SH4_emit16((0x8 << 12) | (0x0 << 8) | ((Rx & 0xF) << 4) | ((imm & 0xF) << 0)); asm_output("movb_R0_dispRx %d, R%d", imm, Rx); } @@ -611,25 +611,25 @@ namespace nanojit #define FITS_SH4_movl_dispRx(imm) (SH4_CHECK_RANGE_movl_dispRx(imm) && SH4_CHECK_ALIGN_movl_dispRx(imm)) inline void Assembler::SH4_movl_dispRx(Register Ry, int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15 && SH4_CHECK_RANGE_movl_dispRx(imm) && SH4_CHECK_ALIGN_movl_dispRx(imm)); + NanoAssert(1 && Rx <= 15 && Ry <= 15 && SH4_CHECK_RANGE_movl_dispRx(imm) && SH4_CHECK_ALIGN_movl_dispRx(imm)); SH4_emit16((0x1 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (((imm & 0x3C) >> 2) << 0)); asm_output("movl_dispRx R%d, %d, R%d", Ry, imm, Rx); } inline void Assembler::SH4_movl_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("movl_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movl_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("movl_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movl_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x2 << 0)); asm_output("movl_indRx R%d, R%d", Ry, Rx); } @@ -641,7 +641,7 @@ namespace nanojit #define FITS_SH4_movl_dispRy(imm) (SH4_CHECK_RANGE_movl_dispRy(imm) && SH4_CHECK_ALIGN_movl_dispRy(imm)) inline void Assembler::SH4_movl_dispRy(int imm, Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15 && SH4_CHECK_RANGE_movl_dispRy(imm) && SH4_CHECK_ALIGN_movl_dispRy(imm)); + NanoAssert(1 && Rx <= 15 && Ry <= 15 && SH4_CHECK_RANGE_movl_dispRy(imm) && SH4_CHECK_ALIGN_movl_dispRy(imm)); SH4_emit16((0x5 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (((imm & 0x3C) >> 2) << 0)); asm_output("movl_dispRy %d, R%d, R%d", imm, Ry, Rx); } @@ -665,25 +665,25 @@ namespace nanojit #define FITS_SH4_movl_dispPC(imm) (SH4_CHECK_RANGE_movl_dispPC(imm) && SH4_CHECK_ALIGN_movl_dispPC(imm)) inline void Assembler::SH4_movl_dispPC(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_movl_dispPC(imm) && SH4_CHECK_ALIGN_movl_dispPC(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_movl_dispPC(imm) && SH4_CHECK_ALIGN_movl_dispPC(imm)); SH4_emit16((0xD << 12) | ((Rx & 0xF) << 8) | (((imm & 0x3FC) >> 2) << 0)); asm_output("movl_dispPC %d, R%d", imm, Rx); } inline void Assembler::SH4_movl_dispR0Ry(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xE << 0)); asm_output("movl_dispR0Ry R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movl_incRy(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("movl_incRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movl_indRy(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x2 << 0)); asm_output("movl_indRy R%d, R%d", Ry, Rx); } @@ -701,19 +701,19 @@ namespace nanojit } inline void Assembler::SH4_movw_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x5 << 0)); asm_output("movw_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movw_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x5 << 0)); asm_output("movw_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movw_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x1 << 0)); asm_output("movw_indRx R%d, R%d", Ry, Rx); } @@ -725,7 +725,7 @@ namespace nanojit #define FITS_SH4_movw_dispRy_R0(imm) (SH4_CHECK_RANGE_movw_dispRy_R0(imm) && SH4_CHECK_ALIGN_movw_dispRy_R0(imm)) inline void Assembler::SH4_movw_dispRy_R0(int imm, Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15 && SH4_CHECK_RANGE_movw_dispRy_R0(imm) && SH4_CHECK_ALIGN_movw_dispRy_R0(imm)); + NanoAssert(1 && Ry <= 15 && SH4_CHECK_RANGE_movw_dispRy_R0(imm) && SH4_CHECK_ALIGN_movw_dispRy_R0(imm)); SH4_emit16((0x8 << 12) | (0x5 << 8) | ((Ry & 0xF) << 4) | (((imm & 0x1E) >> 1) << 0)); asm_output("movw_dispRy_R0 %d, R%d", imm, Ry); } @@ -749,25 +749,25 @@ namespace nanojit #define FITS_SH4_movw_dispPC(imm) (SH4_CHECK_RANGE_movw_dispPC(imm) && SH4_CHECK_ALIGN_movw_dispPC(imm)) inline void Assembler::SH4_movw_dispPC(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_movw_dispPC(imm) && SH4_CHECK_ALIGN_movw_dispPC(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_movw_dispPC(imm) && SH4_CHECK_ALIGN_movw_dispPC(imm)); SH4_emit16((0x9 << 12) | ((Rx & 0xF) << 8) | (((imm & 0x1FE) >> 1) << 0)); asm_output("movw_dispPC %d, R%d", imm, Rx); } inline void Assembler::SH4_movw_dispR0Ry(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xD << 0)); asm_output("movw_dispR0Ry R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movw_incRy(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x5 << 0)); asm_output("movw_incRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_movw_indRy(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x1 << 0)); asm_output("movw_indRy R%d, R%d", Ry, Rx); } @@ -779,7 +779,7 @@ namespace nanojit #define FITS_SH4_movw_R0_dispRx(imm) (SH4_CHECK_RANGE_movw_R0_dispRx(imm) && SH4_CHECK_ALIGN_movw_R0_dispRx(imm)) inline void Assembler::SH4_movw_R0_dispRx(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_movw_R0_dispRx(imm) && SH4_CHECK_ALIGN_movw_R0_dispRx(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_movw_R0_dispRx(imm) && SH4_CHECK_ALIGN_movw_R0_dispRx(imm)); SH4_emit16((0x8 << 12) | (0x1 << 8) | ((Rx & 0xF) << 4) | (((imm & 0x1E) >> 1) << 0)); asm_output("movw_R0_dispRx %d, R%d", imm, Rx); } @@ -809,79 +809,79 @@ namespace nanojit } inline void Assembler::SH4_movcal_R0_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0xC << 4) | (0x3 << 0)); asm_output("movcal_R0_indRx R%d", Rx); } inline void Assembler::SH4_movcol_R0_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x7 << 4) | (0x3 << 0)); asm_output("movcol_R0_indRx R%d", Rx); } inline void Assembler::SH4_movlil_indRy_R0(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Ry & 0xF) << 8) | (0x6 << 4) | (0x3 << 0)); asm_output("movlil_indRy_R0 R%d", Ry); } inline void Assembler::SH4_movt(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x9 << 0)); asm_output("movt R%d", Rx); } inline void Assembler::SH4_movual_indRy_R0(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Ry & 0xF) << 8) | (0xA << 4) | (0x9 << 0)); asm_output("movual_indRy_R0 R%d", Ry); } inline void Assembler::SH4_movual_incRy_R0(Register Ry) { - NanoAssert(1 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Ry & 0xF) << 8) | (0xE << 4) | (0x9 << 0)); asm_output("movual_incRy_R0 R%d", Ry); } inline void Assembler::SH4_mulsw(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xF << 0)); asm_output("mulsw R%d, R%d", Ry, Rx); } inline void Assembler::SH4_muls(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xF << 0)); asm_output("muls R%d, R%d", Ry, Rx); } inline void Assembler::SH4_mull(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x7 << 0)); asm_output("mull R%d, R%d", Ry, Rx); } inline void Assembler::SH4_muluw(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xE << 0)); asm_output("muluw R%d, R%d", Ry, Rx); } inline void Assembler::SH4_mulu(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xE << 0)); asm_output("mulu R%d, R%d", Ry, Rx); } inline void Assembler::SH4_neg(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xB << 0)); asm_output("neg R%d, R%d", Ry, Rx); } inline void Assembler::SH4_negc(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xA << 0)); asm_output("negc R%d, R%d", Ry, Rx); } @@ -893,25 +893,25 @@ namespace nanojit } inline void Assembler::SH4_not(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x7 << 0)); asm_output("not R%d, R%d", Ry, Rx); } inline void Assembler::SH4_ocbi_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x9 << 4) | (0x3 << 0)); asm_output("ocbi_indRx R%d", Rx); } inline void Assembler::SH4_ocbp_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0xA << 4) | (0x3 << 0)); asm_output("ocbp_indRx R%d", Rx); } inline void Assembler::SH4_ocbwb_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0xB << 4) | (0x3 << 0)); asm_output("ocbwb_indRx R%d", Rx); } @@ -927,7 +927,7 @@ namespace nanojit } inline void Assembler::SH4_or(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xB << 0)); asm_output("or R%d, R%d", Ry, Rx); } @@ -943,37 +943,37 @@ namespace nanojit } inline void Assembler::SH4_pref_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x8 << 4) | (0x3 << 0)); asm_output("pref_indRx R%d", Rx); } inline void Assembler::SH4_prefi_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0xD << 4) | (0x3 << 0)); asm_output("prefi_indRx R%d", Rx); } inline void Assembler::SH4_rotcl(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x4 << 0)); asm_output("rotcl R%d", Rx); } inline void Assembler::SH4_rotcr(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x5 << 0)); asm_output("rotcr R%d", Rx); } inline void Assembler::SH4_rotl(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x4 << 0)); asm_output("rotl R%d", Rx); } inline void Assembler::SH4_rotr(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x5 << 0)); asm_output("rotr R%d", Rx); } @@ -1003,73 +1003,73 @@ namespace nanojit } inline void Assembler::SH4_shad(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xC << 0)); asm_output("shad R%d, R%d", Ry, Rx); } inline void Assembler::SH4_shld(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xD << 0)); asm_output("shld R%d, R%d", Ry, Rx); } inline void Assembler::SH4_shal(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x0 << 0)); asm_output("shal R%d", Rx); } inline void Assembler::SH4_shar(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x1 << 0)); asm_output("shar R%d", Rx); } inline void Assembler::SH4_shll(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x0 << 0)); asm_output("shll R%d", Rx); } inline void Assembler::SH4_shll16(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x8 << 0)); asm_output("shll16 R%d", Rx); } inline void Assembler::SH4_shll2(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x8 << 0)); asm_output("shll2 R%d", Rx); } inline void Assembler::SH4_shll8(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x8 << 0)); asm_output("shll8 R%d", Rx); } inline void Assembler::SH4_shlr(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x1 << 0)); asm_output("shlr R%d", Rx); } inline void Assembler::SH4_shlr16(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x9 << 0)); asm_output("shlr16 R%d", Rx); } inline void Assembler::SH4_shlr2(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x9 << 0)); asm_output("shlr2 R%d", Rx); } inline void Assembler::SH4_shlr8(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x9 << 0)); asm_output("shlr8 R%d", Rx); } @@ -1081,43 +1081,43 @@ namespace nanojit } inline void Assembler::SH4_stc_SR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x2 << 0)); asm_output("stc_SR R%d", Rx); } inline void Assembler::SH4_stc_GBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x2 << 0)); asm_output("stc_GBR R%d", Rx); } inline void Assembler::SH4_stc_VBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x2 << 0)); asm_output("stc_VBR R%d", Rx); } inline void Assembler::SH4_stc_SSR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0x2 << 0)); asm_output("stc_SSR R%d", Rx); } inline void Assembler::SH4_stc_SPC(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x4 << 4) | (0x2 << 0)); asm_output("stc_SPC R%d", Rx); } inline void Assembler::SH4_stc_SGR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0xA << 0)); asm_output("stc_SGR R%d", Rx); } inline void Assembler::SH4_stc_DBR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0xF << 4) | (0xA << 0)); asm_output("stc_DBR R%d", Rx); } @@ -1127,49 +1127,49 @@ namespace nanojit #define FITS_SH4_stc_bank(imm) (SH4_CHECK_RANGE_stc_bank(imm)) inline void Assembler::SH4_stc_bank(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_stc_bank(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_stc_bank(imm)); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((imm & 0x7) << 4) | (0x2 << 0)); asm_output("stc_bank %d, R%d", imm, Rx); } inline void Assembler::SH4_stcl_SR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x3 << 0)); asm_output("stcl_SR_decRx R%d", Rx); } inline void Assembler::SH4_stcl_VBR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x3 << 0)); asm_output("stcl_VBR_decRx R%d", Rx); } inline void Assembler::SH4_stcl_SSR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0x3 << 0)); asm_output("stcl_SSR_decRx R%d", Rx); } inline void Assembler::SH4_stcl_SPC_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x4 << 4) | (0x3 << 0)); asm_output("stcl_SPC_decRx R%d", Rx); } inline void Assembler::SH4_stcl_GBR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x3 << 0)); asm_output("stcl_GBR_decRx R%d", Rx); } inline void Assembler::SH4_stcl_SGR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x3 << 4) | (0x2 << 0)); asm_output("stcl_SGR_decRx R%d", Rx); } inline void Assembler::SH4_stcl_DBR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0xF << 4) | (0x2 << 0)); asm_output("stcl_DBR_decRx R%d", Rx); } @@ -1179,97 +1179,97 @@ namespace nanojit #define FITS_SH4_stcl_bank_decRx(imm) (SH4_CHECK_RANGE_stcl_bank_decRx(imm)) inline void Assembler::SH4_stcl_bank_decRx(int imm, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && SH4_CHECK_RANGE_stcl_bank_decRx(imm)); + NanoAssert(1 && Rx <= 15 && SH4_CHECK_RANGE_stcl_bank_decRx(imm)); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | ((imm & 0x7) << 4) | (0x3 << 0)); asm_output("stcl_bank_decRx %d, R%d", imm, Rx); } inline void Assembler::SH4_sts_MACH(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0xA << 0)); asm_output("sts_MACH R%d", Rx); } inline void Assembler::SH4_sts_MACL(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0xA << 0)); asm_output("sts_MACL R%d", Rx); } inline void Assembler::SH4_sts_PR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0xA << 0)); asm_output("sts_PR R%d", Rx); } inline void Assembler::SH4_sts_FPUL(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x5 << 4) | (0xA << 0)); asm_output("sts_FPUL R%d", Rx); } inline void Assembler::SH4_sts_FPSCR(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x6 << 4) | (0xA << 0)); asm_output("sts_FPSCR R%d", Rx); } inline void Assembler::SH4_stsl_MACH_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x2 << 0)); asm_output("stsl_MACH_decRx R%d", Rx); } inline void Assembler::SH4_stsl_MACL_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x2 << 0)); asm_output("stsl_MACL_decRx R%d", Rx); } inline void Assembler::SH4_stsl_PR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x2 << 0)); asm_output("stsl_PR_decRx R%d", Rx); } inline void Assembler::SH4_stsl_FPUL_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x5 << 4) | (0x2 << 0)); asm_output("stsl_FPUL_decRx R%d", Rx); } inline void Assembler::SH4_stsl_FPSCR_decRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x6 << 4) | (0x2 << 0)); asm_output("stsl_FPSCR_decRx R%d", Rx); } inline void Assembler::SH4_sub(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("sub R%d, R%d", Ry, Rx); } inline void Assembler::SH4_subc(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xA << 0)); asm_output("subc R%d, R%d", Ry, Rx); } inline void Assembler::SH4_subv(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xB << 0)); asm_output("subv R%d, R%d", Ry, Rx); } inline void Assembler::SH4_swapb(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("swapb R%d, R%d", Ry, Rx); } inline void Assembler::SH4_swapw(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x6 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x9 << 0)); asm_output("swapw R%d, R%d", Ry, Rx); } @@ -1281,7 +1281,7 @@ namespace nanojit } inline void Assembler::SH4_tasb_indRx(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0xB << 0)); asm_output("tasb_indRx R%d", Rx); } @@ -1307,7 +1307,7 @@ namespace nanojit } inline void Assembler::SH4_tst(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("tst R%d, R%d", Ry, Rx); } @@ -1333,7 +1333,7 @@ namespace nanojit } inline void Assembler::SH4_xor(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xA << 0)); asm_output("xor R%d, R%d", Ry, Rx); } @@ -1349,91 +1349,91 @@ namespace nanojit } inline void Assembler::SH4_xtrct(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x2 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xD << 0)); asm_output("xtrct R%d, R%d", Ry, Rx); } inline void Assembler::SH4_dt(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x4 << 12) | ((Rx & 0xF) << 8) | (0x1 << 4) | (0x0 << 0)); asm_output("dt R%d", Rx); } inline void Assembler::SH4_dmulsl(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xD << 0)); asm_output("dmulsl R%d, R%d", Ry, Rx); } inline void Assembler::SH4_dmulul(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x3 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x5 << 0)); asm_output("dmulul R%d, R%d", Ry, Rx); } inline void Assembler::SH4_macl_incRy_incRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx <= 15 && Ry <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | ((Ry & 0xF) << 4) | (0xF << 0)); asm_output("macl_incRy_incRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_braf(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x2 << 4) | (0x3 << 0)); asm_output("braf R%d", Rx); } inline void Assembler::SH4_bsrf(Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15); + NanoAssert(1 && Rx <= 15); SH4_emit16((0x0 << 12) | ((Rx & 0xF) << 8) | (0x0 << 4) | (0x3 << 0)); asm_output("bsrf R%d", Rx); } inline void Assembler::SH4_fabs(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x5 << 4) | (0xD << 0)); asm_output("fabs R%d", Rx); } inline void Assembler::SH4_fabs_double(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x5 << 4) | (0xD << 0)); asm_output("fabs_double R%d", Rx); } inline void Assembler::SH4_fadd(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x0 << 0)); asm_output("fadd R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fadd_double(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && (Ry - 16) >= 0 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && Ry >= 16 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x0 << 0)); asm_output("fadd_double R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fcmpeq(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x4 << 0)); asm_output("fcmpeq R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fcmpeq_double(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && (Ry - 16) >= 0 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && Ry >= 16 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x4 << 0)); asm_output("fcmpeq_double R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fcmpgt(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x5 << 0)); asm_output("fcmpgt R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fcmpgt_double(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && (Ry - 16) >= 0 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && Ry >= 16 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x5 << 0)); asm_output("fcmpgt_double R%d, R%d", Ry, Rx); } @@ -1451,13 +1451,13 @@ namespace nanojit } inline void Assembler::SH4_fdiv(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x3 << 0)); asm_output("fdiv R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fdiv_double(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && (Ry - 16) >= 0 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && Ry >= 16 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x3 << 0)); asm_output("fdiv_double R%d, R%d", Ry, Rx); } @@ -1469,217 +1469,217 @@ namespace nanojit } inline void Assembler::SH4_fldi0(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x8 << 4) | (0xD << 0)); asm_output("fldi0 R%d", Rx); } inline void Assembler::SH4_fldi1(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x9 << 4) | (0xD << 0)); asm_output("fldi1 R%d", Rx); } inline void Assembler::SH4_flds_FPUL(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x1 << 4) | (0xD << 0)); asm_output("flds_FPUL R%d", Rx); } inline void Assembler::SH4_float_FPUL(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x2 << 4) | (0xD << 0)); asm_output("float_FPUL R%d", Rx); } inline void Assembler::SH4_float_FPUL_double(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x2 << 4) | (0xD << 0)); asm_output("float_FPUL_double R%d", Rx); } inline void Assembler::SH4_fmac(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xE << 0)); asm_output("fmac R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xC << 0)); asm_output("fmov R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_Xdouble_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xC << 0)); asm_output("fmov_Xdouble_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_indRy(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("fmov_indRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_indRy_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("fmov_indRy_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xA << 0)); asm_output("fmov_indRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_Xdouble_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xA << 0)); asm_output("fmov_Xdouble_indRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_incRy(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x9 << 0)); asm_output("fmov_incRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_incRy_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x9 << 0)); asm_output("fmov_incRy_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xB << 0)); asm_output("fmov_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_Xdouble_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xB << 0)); asm_output("fmov_Xdouble_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_dispR0Ry(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("fmov_dispR0Ry R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_dispR0Ry_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("fmov_dispR0Ry_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x7 << 0)); asm_output("fmov_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmov_Xdouble_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x7 << 0)); asm_output("fmov_Xdouble_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovd_indRy_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("fmovd_indRy_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovd_Xdouble_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xA << 0)); asm_output("fmovd_Xdouble_indRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovd_incRy_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x9 << 0)); asm_output("fmovd_incRy_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovd_Xdouble_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xB << 0)); asm_output("fmovd_Xdouble_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovd_dispR0Ry_Xdouble(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("fmovd_dispR0Ry_Xdouble R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovd_Xdouble_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x7 << 0)); asm_output("fmovd_Xdouble_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovs_indRy(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x8 << 0)); asm_output("fmovs_indRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovs_indRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xA << 0)); asm_output("fmovs_indRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovs_incRy(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x9 << 0)); asm_output("fmovs_incRy R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovs_decRx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0xB << 0)); asm_output("fmovs_decRx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovs_dispR0Ry(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && Ry >= 0 && Ry <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | ((Ry & 0xF) << 4) | (0x6 << 0)); asm_output("fmovs_dispR0Ry R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmovs_dispR0Rx(Register Ry, Register Rx) { - NanoAssert(1 && Rx >= 0 && Rx <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | ((Rx & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x7 << 0)); asm_output("fmovs_dispR0Rx R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmul(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x2 << 0)); asm_output("fmul R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fmul_double(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && (Ry - 16) >= 0 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && Ry >= 16 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x2 << 0)); asm_output("fmul_double R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fneg(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x4 << 4) | (0xD << 0)); asm_output("fneg R%d", Rx); } inline void Assembler::SH4_fneg_double(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x4 << 4) | (0xD << 0)); asm_output("fneg_double R%d", Rx); } @@ -1709,49 +1709,49 @@ namespace nanojit } inline void Assembler::SH4_fsqrt(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x6 << 4) | (0xD << 0)); asm_output("fsqrt R%d", Rx); } inline void Assembler::SH4_fsqrt_double(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x6 << 4) | (0xD << 0)); asm_output("fsqrt_double R%d", Rx); } inline void Assembler::SH4_fsrra(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x7 << 4) | (0xD << 0)); asm_output("fsrra R%d", Rx); } inline void Assembler::SH4_fsts_FPUL(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x0 << 4) | (0xD << 0)); asm_output("fsts_FPUL R%d", Rx); } inline void Assembler::SH4_fsub(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && (Ry - 16) >= 0 && (Ry - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && Ry >= 16 && (Ry - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x1 << 0)); asm_output("fsub R%d, R%d", Ry, Rx); } inline void Assembler::SH4_fsub_double(Register Ry, Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && (Ry - 16) >= 0 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1) && Ry >= 16 && (Ry - 16) <= 15 && !((Ry - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (((Ry - 16) & 0xF) << 4) | (0x1 << 0)); asm_output("fsub_double R%d, R%d", Ry, Rx); } inline void Assembler::SH4_ftrc_FPUL(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x3 << 4) | (0xD << 0)); asm_output("ftrc_FPUL R%d", Rx); } inline void Assembler::SH4_ftrc_double_FPUL(Register Rx) { - NanoAssert(1 && (Rx - 16) >= 0 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); + NanoAssert(1 && Rx >= 16 && (Rx - 16) <= 15 && !((Rx - 16) & 0x1)); SH4_emit16((0xF << 12) | (((Rx - 16) & 0xF) << 8) | (0x3 << 4) | (0xD << 0)); asm_output("ftrc_double_FPUL R%d", Rx); }