summaryrefslogtreecommitdiff
path: root/src/core/arm/dyncom
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-05-29 15:09:26 -0700
committerGravatar Yuri Kunde Schlesner2015-05-29 15:09:26 -0700
commita489a846563fc64f236c7ede69ce0eb34af3521a (patch)
tree706e345043532d90cd8ca5c41af67fc31dfa7d2e /src/core/arm/dyncom
parentMerge pull request #817 from linkmauve/citra.ico (diff)
parentTravis: Add a check for trailing whitespace before any actual compilation. (diff)
downloadyuzu-a489a846563fc64f236c7ede69ce0eb34af3521a.tar.gz
yuzu-a489a846563fc64f236c7ede69ce0eb34af3521a.tar.xz
yuzu-a489a846563fc64f236c7ede69ce0eb34af3521a.zip
Merge pull request #818 from linkmauve/no-trailing-whitespace
Ban trailing whitespace from the entire project, forever
Diffstat (limited to 'src/core/arm/dyncom')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp32
-rw-r--r--src/core/arm/dyncom/arm_dyncom_thumb.cpp2
2 files changed, 17 insertions, 17 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index b5d1b43cd..b00eb49a9 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -134,7 +134,7 @@ static unsigned int DPO(Immediate)(ARMul_State* cpu, unsigned int sht_oper) {
134 unsigned int immed_8 = BITS(sht_oper, 0, 7); 134 unsigned int immed_8 = BITS(sht_oper, 0, 7);
135 unsigned int rotate_imm = BITS(sht_oper, 8, 11); 135 unsigned int rotate_imm = BITS(sht_oper, 8, 11);
136 unsigned int shifter_operand = ROTATE_RIGHT_32(immed_8, rotate_imm * 2); 136 unsigned int shifter_operand = ROTATE_RIGHT_32(immed_8, rotate_imm * 2);
137 if (rotate_imm == 0) 137 if (rotate_imm == 0)
138 cpu->shifter_carry_out = cpu->CFlag; 138 cpu->shifter_carry_out = cpu->CFlag;
139 else 139 else
140 cpu->shifter_carry_out = BIT(shifter_operand, 31); 140 cpu->shifter_carry_out = BIT(shifter_operand, 31);
@@ -521,7 +521,7 @@ static void MLnS(ImmediateOffset)(ARMul_State* cpu, unsigned int inst, unsigned
521 addr = CHECK_READ_REG15_WA(cpu, Rn) + offset_8; 521 addr = CHECK_READ_REG15_WA(cpu, Rn) + offset_8;
522 else 522 else
523 addr = CHECK_READ_REG15_WA(cpu, Rn) - offset_8; 523 addr = CHECK_READ_REG15_WA(cpu, Rn) - offset_8;
524 524
525 virt_addr = addr; 525 virt_addr = addr;
526} 526}
527 527
@@ -550,7 +550,7 @@ static void MLnS(ImmediatePreIndexed)(ARMul_State* cpu, unsigned int inst, unsig
550 550
551 if (U_BIT) 551 if (U_BIT)
552 addr = rn + offset_8; 552 addr = rn + offset_8;
553 else 553 else
554 addr = rn - offset_8; 554 addr = rn - offset_8;
555 555
556 virt_addr = addr; 556 virt_addr = addr;
@@ -1306,8 +1306,8 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(and)(unsigned int inst, int index)
1306 inst_cream->Rd = BITS(inst, 12, 15); 1306 inst_cream->Rd = BITS(inst, 12, 15);
1307 inst_cream->shifter_operand = BITS(inst, 0, 11); 1307 inst_cream->shifter_operand = BITS(inst, 0, 11);
1308 inst_cream->shtop_func = get_shtop(inst); 1308 inst_cream->shtop_func = get_shtop(inst);
1309 1309
1310 if (inst_cream->Rd == 15) 1310 if (inst_cream->Rd == 15)
1311 inst_base->br = INDIRECT_BRANCH; 1311 inst_base->br = INDIRECT_BRANCH;
1312 1312
1313 return inst_base; 1313 return inst_base;
@@ -1350,7 +1350,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(bic)(unsigned int inst, int index)
1350 inst_cream->shifter_operand = BITS(inst, 0, 11); 1350 inst_cream->shifter_operand = BITS(inst, 0, 11);
1351 inst_cream->shtop_func = get_shtop(inst); 1351 inst_cream->shtop_func = get_shtop(inst);
1352 1352
1353 if (inst_cream->Rd == 15) 1353 if (inst_cream->Rd == 15)
1354 inst_base->br = INDIRECT_BRANCH; 1354 inst_base->br = INDIRECT_BRANCH;
1355 return inst_base; 1355 return inst_base;
1356} 1356}
@@ -3269,7 +3269,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(yield)(unsigned int inst, int index)
3269#define VFP_INTERPRETER_STRUCT 3269#define VFP_INTERPRETER_STRUCT
3270#include "core/arm/skyeye_common/vfp/vfpinstr.cpp" 3270#include "core/arm/skyeye_common/vfp/vfpinstr.cpp"
3271#undef VFP_INTERPRETER_STRUCT 3271#undef VFP_INTERPRETER_STRUCT
3272 3272
3273#define VFP_INTERPRETER_TRANS 3273#define VFP_INTERPRETER_TRANS
3274#include "core/arm/skyeye_common/vfp/vfpinstr.cpp" 3274#include "core/arm/skyeye_common/vfp/vfpinstr.cpp"
3275#undef VFP_INTERPRETER_TRANS 3275#undef VFP_INTERPRETER_TRANS
@@ -3478,9 +3478,9 @@ const transop_fp_t arm_instruction_trans[] = {
3478 INTERPRETER_TRANSLATE(bbl), 3478 INTERPRETER_TRANSLATE(bbl),
3479 3479
3480 // All the thumb instructions should be placed the end of table 3480 // All the thumb instructions should be placed the end of table
3481 INTERPRETER_TRANSLATE(b_2_thumb), 3481 INTERPRETER_TRANSLATE(b_2_thumb),
3482 INTERPRETER_TRANSLATE(b_cond_thumb), 3482 INTERPRETER_TRANSLATE(b_cond_thumb),
3483 INTERPRETER_TRANSLATE(bl_1_thumb), 3483 INTERPRETER_TRANSLATE(bl_1_thumb),
3484 INTERPRETER_TRANSLATE(bl_2_thumb), 3484 INTERPRETER_TRANSLATE(bl_2_thumb),
3485 INTERPRETER_TRANSLATE(blx_1_thumb) 3485 INTERPRETER_TRANSLATE(blx_1_thumb)
3486}; 3486};
@@ -4338,7 +4338,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
4338 } 4338 }
4339 } 4339 }
4340 if (BIT(inst, 13)) { 4340 if (BIT(inst, 13)) {
4341 if (cpu->Mode == USER32MODE) 4341 if (cpu->Mode == USER32MODE)
4342 cpu->Reg[13] = ReadMemory32(cpu, addr); 4342 cpu->Reg[13] = ReadMemory32(cpu, addr);
4343 else 4343 else
4344 cpu->Reg_usr[0] = ReadMemory32(cpu, addr); 4344 cpu->Reg_usr[0] = ReadMemory32(cpu, addr);
@@ -4346,7 +4346,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
4346 addr += 4; 4346 addr += 4;
4347 } 4347 }
4348 if (BIT(inst, 14)) { 4348 if (BIT(inst, 14)) {
4349 if (cpu->Mode == USER32MODE) 4349 if (cpu->Mode == USER32MODE)
4350 cpu->Reg[14] = ReadMemory32(cpu, addr); 4350 cpu->Reg[14] = ReadMemory32(cpu, addr);
4351 else 4351 else
4352 cpu->Reg_usr[1] = ReadMemory32(cpu, addr); 4352 cpu->Reg_usr[1] = ReadMemory32(cpu, addr);
@@ -5148,7 +5148,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
5148 REV16_INST: 5148 REV16_INST:
5149 REVSH_INST: 5149 REVSH_INST:
5150 { 5150 {
5151 5151
5152 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { 5152 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
5153 rev_inst* const inst_cream = (rev_inst*)inst_base->component; 5153 rev_inst* const inst_cream = (rev_inst*)inst_base->component;
5154 5154
@@ -5721,7 +5721,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
5721 5721
5722 if (do_swap) 5722 if (do_swap)
5723 rm_val = (((rm_val & 0xFFFF) << 16) | (rm_val >> 16)); 5723 rm_val = (((rm_val & 0xFFFF) << 16) | (rm_val >> 16));
5724 5724
5725 const s32 product1 = (s16)(rn_val & 0xFFFF) * (s16)(rm_val & 0xFFFF); 5725 const s32 product1 = (s16)(rn_val & 0xFFFF) * (s16)(rm_val & 0xFFFF);
5726 const s32 product2 = (s16)((rn_val >> 16) & 0xFFFF) * (s16)((rm_val >> 16) & 0xFFFF); 5726 const s32 product2 = (s16)((rn_val >> 16) & 0xFFFF) * (s16)((rm_val >> 16) & 0xFFFF);
5727 s64 result; 5727 s64 result;
@@ -6583,7 +6583,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
6583 { 6583 {
6584 u32 lo_val = 0; 6584 u32 lo_val = 0;
6585 u32 hi_val = 0; 6585 u32 hi_val = 0;
6586 6586
6587 // UHADD16 6587 // UHADD16
6588 if (op2 == 0x00) { 6588 if (op2 == 0x00) {
6589 lo_val = (rn_val & 0xFFFF) + (rm_val & 0xFFFF); 6589 lo_val = (rn_val & 0xFFFF) + (rm_val & 0xFFFF);
@@ -6772,7 +6772,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
6772 6772
6773 u16 lo_val = 0; 6773 u16 lo_val = 0;
6774 u16 hi_val = 0; 6774 u16 hi_val = 0;
6775 6775
6776 // UQADD16 6776 // UQADD16
6777 if (op2 == 0x00) { 6777 if (op2 == 0x00) {
6778 lo_val = ARMul_UnsignedSaturatedAdd16(rn_val & 0xFFFF, rm_val & 0xFFFF); 6778 lo_val = ARMul_UnsignedSaturatedAdd16(rn_val & 0xFFFF, rm_val & 0xFFFF);
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.cpp b/src/core/arm/dyncom/arm_dyncom_thumb.cpp
index cdaf21450..2fc8170be 100644
--- a/src/core/arm/dyncom/arm_dyncom_thumb.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_thumb.cpp
@@ -184,7 +184,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) {
184 case 9: // LDR Rd,[PC,#imm8] 184 case 9: // LDR Rd,[PC,#imm8]
185 *ainstr = 0xE59F0000 // base 185 *ainstr = 0xE59F0000 // base
186 | ((tinstr & 0x0700) << (12 - 8)) // Rd 186 | ((tinstr & 0x0700) << (12 - 8)) // Rd
187 |((tinstr & 0x00FF) << (2 - 0)); // off8 187 |((tinstr & 0x00FF) << (2 - 0)); // off8
188 break; 188 break;
189 189
190 case 10: 190 case 10: