diff options
| author | 2015-07-25 20:52:10 -0400 | |
|---|---|---|
| committer | 2015-07-25 20:52:10 -0400 | |
| commit | 4bb1a5ca47c4135e867cd611c0e097f570bc721d (patch) | |
| tree | 7928d289f223941e64bb2a0e918401611a3998a5 /src | |
| parent | dyncom: Move helper functions to their own header (diff) | |
| download | yuzu-4bb1a5ca47c4135e867cd611c0e097f570bc721d.tar.gz yuzu-4bb1a5ca47c4135e867cd611c0e097f570bc721d.tar.xz yuzu-4bb1a5ca47c4135e867cd611c0e097f570bc721d.zip | |
dyncom: Get rid of skyeye typedefs
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/debugger/disassembler.cpp | 2 | ||||
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 9 | ||||
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_thumb.cpp | 22 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/armdefs.h | 51 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfp.cpp | 10 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfp.h | 10 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfp_helper.h | 2 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfpdouble.cpp | 12 |
8 files changed, 56 insertions, 62 deletions
diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index b41c40a0e..60c18c429 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp | |||
| @@ -219,7 +219,7 @@ void DisassemblerWidget::OnToggleStartStop() { | |||
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | void DisassemblerWidget::OnDebugModeEntered() { | 221 | void DisassemblerWidget::OnDebugModeEntered() { |
| 222 | ARMword next_instr = Core::g_app_core->GetPC(); | 222 | u32 next_instr = Core::g_app_core->GetPC(); |
| 223 | 223 | ||
| 224 | if (model->GetBreakPoints().IsAddressBreakPoint(next_instr)) | 224 | if (model->GetBreakPoints().IsAddressBreakPoint(next_instr)) |
| 225 | emu_thread->SetRunning(false); | 225 | emu_thread->SetRunning(false); |
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index d9db0daa0..a81bb8e91 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -51,22 +51,21 @@ typedef unsigned int (*shtop_fp_t)(ARMul_State* cpu, unsigned int sht_oper); | |||
| 51 | // Defines a reservation granule of 2 words, which protects the first 2 words starting at the tag. | 51 | // Defines a reservation granule of 2 words, which protects the first 2 words starting at the tag. |
| 52 | // This is the smallest granule allowed by the v7 spec, and is coincidentally just large enough to | 52 | // This is the smallest granule allowed by the v7 spec, and is coincidentally just large enough to |
| 53 | // support LDR/STREXD. | 53 | // support LDR/STREXD. |
| 54 | static const ARMword RESERVATION_GRANULE_MASK = 0xFFFFFFF8; | 54 | static const u32 RESERVATION_GRANULE_MASK = 0xFFFFFFF8; |
| 55 | 55 | ||
| 56 | // Exclusive memory access | 56 | // Exclusive memory access |
| 57 | static int exclusive_detect(ARMul_State* state, ARMword addr) { | 57 | static int exclusive_detect(ARMul_State* state, u32 addr) { |
| 58 | if(state->exclusive_tag == (addr & RESERVATION_GRANULE_MASK)) | 58 | if(state->exclusive_tag == (addr & RESERVATION_GRANULE_MASK)) |
| 59 | return 0; | 59 | return 0; |
| 60 | else | 60 | else |
| 61 | return -1; | 61 | return -1; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static void add_exclusive_addr(ARMul_State* state, ARMword addr){ | 64 | static void add_exclusive_addr(ARMul_State* state, u32 addr){ |
| 65 | state->exclusive_tag = addr & RESERVATION_GRANULE_MASK; | 65 | state->exclusive_tag = addr & RESERVATION_GRANULE_MASK; |
| 66 | return; | ||
| 67 | } | 66 | } |
| 68 | 67 | ||
| 69 | static void remove_exclusive(ARMul_State* state, ARMword addr){ | 68 | static void remove_exclusive(ARMul_State* state, u32 addr){ |
| 70 | state->exclusive_tag = 0xFFFFFFFF; | 69 | state->exclusive_tag = 0xFFFFFFFF; |
| 71 | } | 70 | } |
| 72 | 71 | ||
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.cpp b/src/core/arm/dyncom/arm_dyncom_thumb.cpp index 13cc34be4..2860af376 100644 --- a/src/core/arm/dyncom/arm_dyncom_thumb.cpp +++ b/src/core/arm/dyncom/arm_dyncom_thumb.cpp | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | 15 | tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { |
| 16 | tdstate valid = t_uninitialized; | 16 | tdstate valid = t_uninitialized; |
| 17 | ARMword tinstr = instr; | 17 | u32 tinstr = instr; |
| 18 | 18 | ||
| 19 | // The endian should be judge here | 19 | // The endian should be judge here |
| 20 | if((addr & 0x3) != 0) | 20 | if((addr & 0x3) != 0) |
| @@ -37,7 +37,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 37 | 37 | ||
| 38 | case 3: // ADD/SUB | 38 | case 3: // ADD/SUB |
| 39 | { | 39 | { |
| 40 | static const ARMword subset[4] = { | 40 | static const u32 subset[4] = { |
| 41 | 0xE0900000, // ADDS Rd,Rs,Rn | 41 | 0xE0900000, // ADDS Rd,Rs,Rn |
| 42 | 0xE0500000, // SUBS Rd,Rs,Rn | 42 | 0xE0500000, // SUBS Rd,Rs,Rn |
| 43 | 0xE2900000, // ADDS Rd,Rs,#imm3 | 43 | 0xE2900000, // ADDS Rd,Rs,#imm3 |
| @@ -56,7 +56,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 56 | case 6: // ADD | 56 | case 6: // ADD |
| 57 | case 7: // SUB | 57 | case 7: // SUB |
| 58 | { | 58 | { |
| 59 | static const ARMword subset[4] = { | 59 | static const u32 subset[4] = { |
| 60 | 0xE3B00000, // MOVS Rd,#imm8 | 60 | 0xE3B00000, // MOVS Rd,#imm8 |
| 61 | 0xE3500000, // CMP Rd,#imm8 | 61 | 0xE3500000, // CMP Rd,#imm8 |
| 62 | 0xE2900000, // ADDS Rd,Rd,#imm8 | 62 | 0xE2900000, // ADDS Rd,Rd,#imm8 |
| @@ -85,7 +85,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | static const struct { | 87 | static const struct { |
| 88 | ARMword opcode; | 88 | u32 opcode; |
| 89 | otype type; | 89 | otype type; |
| 90 | } subset[16] = { | 90 | } subset[16] = { |
| 91 | { 0xE0100000, t_norm }, // ANDS Rd,Rd,Rs | 91 | { 0xE0100000, t_norm }, // ANDS Rd,Rd,Rs |
| @@ -130,8 +130,8 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 130 | break; | 130 | break; |
| 131 | } | 131 | } |
| 132 | } else { | 132 | } else { |
| 133 | ARMword Rd = ((tinstr & 0x0007) >> 0); | 133 | u32 Rd = ((tinstr & 0x0007) >> 0); |
| 134 | ARMword Rs = ((tinstr & 0x0078) >> 3); | 134 | u32 Rs = ((tinstr & 0x0078) >> 3); |
| 135 | 135 | ||
| 136 | if (tinstr & (1 << 7)) | 136 | if (tinstr & (1 << 7)) |
| 137 | Rd += 8; | 137 | Rd += 8; |
| @@ -185,7 +185,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 185 | case 10: | 185 | case 10: |
| 186 | case 11: | 186 | case 11: |
| 187 | { | 187 | { |
| 188 | static const ARMword subset[8] = { | 188 | static const u32 subset[8] = { |
| 189 | 0xE7800000, // STR Rd,[Rb,Ro] | 189 | 0xE7800000, // STR Rd,[Rb,Ro] |
| 190 | 0xE18000B0, // STRH Rd,[Rb,Ro] | 190 | 0xE18000B0, // STRH Rd,[Rb,Ro] |
| 191 | 0xE7C00000, // STRB Rd,[Rb,Ro] | 191 | 0xE7C00000, // STRB Rd,[Rb,Ro] |
| @@ -208,7 +208,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 208 | case 14: // STRB Rd,[Rb,#imm5] | 208 | case 14: // STRB Rd,[Rb,#imm5] |
| 209 | case 15: // LDRB Rd,[Rb,#imm5] | 209 | case 15: // LDRB Rd,[Rb,#imm5] |
| 210 | { | 210 | { |
| 211 | static const ARMword subset[4] = { | 211 | static const u32 subset[4] = { |
| 212 | 0xE5800000, // STR Rd,[Rb,#imm5] | 212 | 0xE5800000, // STR Rd,[Rb,#imm5] |
| 213 | 0xE5900000, // LDR Rd,[Rb,#imm5] | 213 | 0xE5900000, // LDR Rd,[Rb,#imm5] |
| 214 | 0xE5C00000, // STRB Rd,[Rb,#imm5] | 214 | 0xE5C00000, // STRB Rd,[Rb,#imm5] |
| @@ -275,7 +275,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 275 | | BITS(tinstr, 0, 3) // imm4 field; | 275 | | BITS(tinstr, 0, 3) // imm4 field; |
| 276 | | (BITS(tinstr, 4, 7) << 8); // beginning 4 bits of imm12 | 276 | | (BITS(tinstr, 4, 7) << 8); // beginning 4 bits of imm12 |
| 277 | } else if ((tinstr & 0x0F00) == 0x0200) { | 277 | } else if ((tinstr & 0x0F00) == 0x0200) { |
| 278 | static const ARMword subset[4] = { | 278 | static const u32 subset[4] = { |
| 279 | 0xE6BF0070, // SXTH | 279 | 0xE6BF0070, // SXTH |
| 280 | 0xE6AF0070, // SXTB | 280 | 0xE6AF0070, // SXTB |
| 281 | 0xE6FF0070, // UXTH | 281 | 0xE6FF0070, // UXTH |
| @@ -299,7 +299,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 299 | | (BIT(tinstr, 4) << 18); // enable bit | 299 | | (BIT(tinstr, 4) << 18); // enable bit |
| 300 | } | 300 | } |
| 301 | } else if ((tinstr & 0x0F00) == 0x0a00) { | 301 | } else if ((tinstr & 0x0F00) == 0x0a00) { |
| 302 | static const ARMword subset[3] = { | 302 | static const u32 subset[3] = { |
| 303 | 0xE6BF0F30, // REV | 303 | 0xE6BF0F30, // REV |
| 304 | 0xE6BF0FB0, // REV16 | 304 | 0xE6BF0FB0, // REV16 |
| 305 | 0xE6FF0FB0, // REVSH | 305 | 0xE6FF0FB0, // REVSH |
| @@ -309,7 +309,7 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) { | |||
| 309 | | (BITS(tinstr, 0, 2) << 12) // Rd | 309 | | (BITS(tinstr, 0, 2) << 12) // Rd |
| 310 | | BITS(tinstr, 3, 5); // Rm | 310 | | BITS(tinstr, 3, 5); // Rm |
| 311 | } else { | 311 | } else { |
| 312 | static const ARMword subset[4] = { | 312 | static const u32 subset[4] = { |
| 313 | 0xE92D0000, // STMDB sp!,{rlist} | 313 | 0xE92D0000, // STMDB sp!,{rlist} |
| 314 | 0xE92D4000, // STMDB sp!,{rlist,lr} | 314 | 0xE92D4000, // STMDB sp!,{rlist,lr} |
| 315 | 0xE8BD0000, // LDMIA sp!,{rlist} | 315 | 0xE8BD0000, // LDMIA sp!,{rlist} |
diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.h index f183b5098..d5f4f3068 100644 --- a/src/core/arm/skyeye_common/armdefs.h +++ b/src/core/arm/skyeye_common/armdefs.h | |||
| @@ -44,50 +44,45 @@ enum { | |||
| 44 | ABORT_BASE_UPDATED = 2 | 44 | ABORT_BASE_UPDATED = 2 |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | typedef u64 ARMdword; // must be 64 bits wide | ||
| 48 | typedef u32 ARMword; // must be 32 bits wide | ||
| 49 | typedef u16 ARMhword; // must be 16 bits wide | ||
| 50 | typedef u8 ARMbyte; // must be 8 bits wide | ||
| 51 | |||
| 52 | #define VFP_REG_NUM 64 | 47 | #define VFP_REG_NUM 64 |
| 53 | struct ARMul_State | 48 | struct ARMul_State |
| 54 | { | 49 | { |
| 55 | ARMword Emulate; // To start and stop emulation | 50 | u32 Emulate; // To start and stop emulation |
| 56 | 51 | ||
| 57 | // Order of the following register should not be modified | 52 | // Order of the following register should not be modified |
| 58 | ARMword Reg[16]; // The current register file | 53 | u32 Reg[16]; // The current register file |
| 59 | ARMword Cpsr; // The current PSR | 54 | u32 Cpsr; // The current PSR |
| 60 | ARMword Spsr_copy; | 55 | u32 Spsr_copy; |
| 61 | ARMword phys_pc; | 56 | u32 phys_pc; |
| 62 | ARMword Reg_usr[2]; | 57 | u32 Reg_usr[2]; |
| 63 | ARMword Reg_svc[2]; // R13_SVC R14_SVC | 58 | u32 Reg_svc[2]; // R13_SVC R14_SVC |
| 64 | ARMword Reg_abort[2]; // R13_ABORT R14_ABORT | 59 | u32 Reg_abort[2]; // R13_ABORT R14_ABORT |
| 65 | ARMword Reg_undef[2]; // R13 UNDEF R14 UNDEF | 60 | u32 Reg_undef[2]; // R13 UNDEF R14 UNDEF |
| 66 | ARMword Reg_irq[2]; // R13_IRQ R14_IRQ | 61 | u32 Reg_irq[2]; // R13_IRQ R14_IRQ |
| 67 | ARMword Reg_firq[7]; // R8---R14 FIRQ | 62 | u32 Reg_firq[7]; // R8---R14 FIRQ |
| 68 | ARMword Spsr[7]; // The exception psr's | 63 | u32 Spsr[7]; // The exception psr's |
| 69 | ARMword Mode; // The current mode | 64 | u32 Mode; // The current mode |
| 70 | ARMword Bank; // The current register bank | 65 | u32 Bank; // The current register bank |
| 71 | ARMword exclusive_tag; // The address for which the local monitor is in exclusive access mode | 66 | u32 exclusive_tag; // The address for which the local monitor is in exclusive access mode |
| 72 | ARMword exclusive_state; | 67 | u32 exclusive_state; |
| 73 | ARMword exclusive_result; | 68 | u32 exclusive_result; |
| 74 | ARMword CP15[CP15_REGISTER_COUNT]; | 69 | u32 CP15[CP15_REGISTER_COUNT]; |
| 75 | 70 | ||
| 76 | // FPSID, FPSCR, and FPEXC | 71 | // FPSID, FPSCR, and FPEXC |
| 77 | ARMword VFP[VFP_SYSTEM_REGISTER_COUNT]; | 72 | u32 VFP[VFP_SYSTEM_REGISTER_COUNT]; |
| 78 | // VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). | 73 | // VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). |
| 79 | // VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), | 74 | // VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), |
| 80 | // and only 32 singleword registers are accessible (S0-S31). | 75 | // and only 32 singleword registers are accessible (S0-S31). |
| 81 | ARMword ExtReg[VFP_REG_NUM]; | 76 | u32 ExtReg[VFP_REG_NUM]; |
| 82 | /* ---- End of the ordered registers ---- */ | 77 | /* ---- End of the ordered registers ---- */ |
| 83 | 78 | ||
| 84 | ARMword NFlag, ZFlag, CFlag, VFlag, IFFlags; // Dummy flags for speed | 79 | u32 NFlag, ZFlag, CFlag, VFlag, IFFlags; // Dummy flags for speed |
| 85 | unsigned int shifter_carry_out; | 80 | unsigned int shifter_carry_out; |
| 86 | 81 | ||
| 87 | // Add armv6 flags dyf:2010-08-09 | 82 | // Add armv6 flags dyf:2010-08-09 |
| 88 | ARMword GEFlag, EFlag, AFlag, QFlag; | 83 | u32 GEFlag, EFlag, AFlag, QFlag; |
| 89 | 84 | ||
| 90 | ARMword TFlag; // Thumb state | 85 | u32 TFlag; // Thumb state |
| 91 | 86 | ||
| 92 | unsigned long long NumInstrs; // The number of instructions executed | 87 | unsigned long long NumInstrs; // The number of instructions executed |
| 93 | unsigned NumInstrsToExecute; | 88 | unsigned NumInstrsToExecute; |
diff --git a/src/core/arm/skyeye_common/vfp/vfp.cpp b/src/core/arm/skyeye_common/vfp/vfp.cpp index 1ffc1f9af..ed9ade886 100644 --- a/src/core/arm/skyeye_common/vfp/vfp.cpp +++ b/src/core/arm/skyeye_common/vfp/vfp.cpp | |||
| @@ -43,7 +43,7 @@ void VFPInit(ARMul_State* state) | |||
| 43 | state->VFP[VFP_MVFR1] = 0; | 43 | state->VFP[VFP_MVFR1] = 0; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void VMOVBRS(ARMul_State* state, ARMword to_arm, ARMword t, ARMword n, ARMword* value) | 46 | void VMOVBRS(ARMul_State* state, u32 to_arm, u32 t, u32 n, u32* value) |
| 47 | { | 47 | { |
| 48 | if (to_arm) | 48 | if (to_arm) |
| 49 | { | 49 | { |
| @@ -55,7 +55,7 @@ void VMOVBRS(ARMul_State* state, ARMword to_arm, ARMword t, ARMword n, ARMword* | |||
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void VMOVBRRD(ARMul_State* state, ARMword to_arm, ARMword t, ARMword t2, ARMword n, ARMword* value1, ARMword* value2) | 58 | void VMOVBRRD(ARMul_State* state, u32 to_arm, u32 t, u32 t2, u32 n, u32* value1, u32* value2) |
| 59 | { | 59 | { |
| 60 | if (to_arm) | 60 | if (to_arm) |
| 61 | { | 61 | { |
| @@ -68,7 +68,7 @@ void VMOVBRRD(ARMul_State* state, ARMword to_arm, ARMword t, ARMword t2, ARMword | |||
| 68 | state->ExtReg[n*2] = *value1; | 68 | state->ExtReg[n*2] = *value1; |
| 69 | } | 69 | } |
| 70 | } | 70 | } |
| 71 | void VMOVBRRSS(ARMul_State* state, ARMword to_arm, ARMword t, ARMword t2, ARMword n, ARMword* value1, ARMword* value2) | 71 | void VMOVBRRSS(ARMul_State* state, u32 to_arm, u32 t, u32 t2, u32 n, u32* value1, u32* value2) |
| 72 | { | 72 | { |
| 73 | if (to_arm) | 73 | if (to_arm) |
| 74 | { | 74 | { |
| @@ -82,7 +82,7 @@ void VMOVBRRSS(ARMul_State* state, ARMword to_arm, ARMword t, ARMword t2, ARMwor | |||
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void VMOVI(ARMul_State* state, ARMword single, ARMword d, ARMword imm) | 85 | void VMOVI(ARMul_State* state, u32 single, u32 d, u32 imm) |
| 86 | { | 86 | { |
| 87 | if (single) | 87 | if (single) |
| 88 | { | 88 | { |
| @@ -95,7 +95,7 @@ void VMOVI(ARMul_State* state, ARMword single, ARMword d, ARMword imm) | |||
| 95 | state->ExtReg[d*2] = 0; | 95 | state->ExtReg[d*2] = 0; |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | void VMOVR(ARMul_State* state, ARMword single, ARMword d, ARMword m) | 98 | void VMOVR(ARMul_State* state, u32 single, u32 d, u32 m) |
| 99 | { | 99 | { |
| 100 | if (single) | 100 | if (single) |
| 101 | { | 101 | { |
diff --git a/src/core/arm/skyeye_common/vfp/vfp.h b/src/core/arm/skyeye_common/vfp/vfp.h index 80ca93ccd..88908da9f 100644 --- a/src/core/arm/skyeye_common/vfp/vfp.h +++ b/src/core/arm/skyeye_common/vfp/vfp.h | |||
| @@ -36,8 +36,8 @@ void vfp_raise_exceptions(ARMul_State* state, u32 exceptions, u32 inst, u32 fpsc | |||
| 36 | u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr); | 36 | u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr); |
| 37 | u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr); | 37 | u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr); |
| 38 | 38 | ||
| 39 | void VMOVBRS(ARMul_State* state, ARMword to_arm, ARMword t, ARMword n, ARMword* value); | 39 | void VMOVBRS(ARMul_State* state, u32 to_arm, u32 t, u32 n, u32* value); |
| 40 | void VMOVBRRD(ARMul_State* state, ARMword to_arm, ARMword t, ARMword t2, ARMword n, ARMword* value1, ARMword* value2); | 40 | void VMOVBRRD(ARMul_State* state, u32 to_arm, u32 t, u32 t2, u32 n, u32* value1, u32* value2); |
| 41 | void VMOVBRRSS(ARMul_State* state, ARMword to_arm, ARMword t, ARMword t2, ARMword n, ARMword* value1, ARMword* value2); | 41 | void VMOVBRRSS(ARMul_State* state, u32 to_arm, u32 t, u32 t2, u32 n, u32* value1, u32* value2); |
| 42 | void VMOVI(ARMul_State* state, ARMword single, ARMword d, ARMword imm); | 42 | void VMOVI(ARMul_State* state, u32 single, u32 d, u32 imm); |
| 43 | void VMOVR(ARMul_State* state, ARMword single, ARMword d, ARMword imm); | 43 | void VMOVR(ARMul_State* state, u32 single, u32 d, u32 imm); |
diff --git a/src/core/arm/skyeye_common/vfp/vfp_helper.h b/src/core/arm/skyeye_common/vfp/vfp_helper.h index 2007d6dc4..f318e486a 100644 --- a/src/core/arm/skyeye_common/vfp/vfp_helper.h +++ b/src/core/arm/skyeye_common/vfp/vfp_helper.h | |||
| @@ -415,7 +415,7 @@ struct op { | |||
| 415 | u32 flags; | 415 | u32 flags; |
| 416 | }; | 416 | }; |
| 417 | 417 | ||
| 418 | static inline u32 fls(ARMword x) | 418 | static inline u32 fls(u32 x) |
| 419 | { | 419 | { |
| 420 | int r = 32; | 420 | int r = 32; |
| 421 | 421 | ||
diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp index f91049585..1d844a66e 100644 --- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp | |||
| @@ -70,9 +70,9 @@ static void vfp_double_dump(const char *str, struct vfp_double *d) | |||
| 70 | 70 | ||
| 71 | static void vfp_double_normalise_denormal(struct vfp_double *vd) | 71 | static void vfp_double_normalise_denormal(struct vfp_double *vd) |
| 72 | { | 72 | { |
| 73 | int bits = 31 - fls((ARMword)(vd->significand >> 32)); | 73 | int bits = 31 - fls((u32)(vd->significand >> 32)); |
| 74 | if (bits == 31) | 74 | if (bits == 31) |
| 75 | bits = 63 - fls((ARMword)vd->significand); | 75 | bits = 63 - fls((u32)vd->significand); |
| 76 | 76 | ||
| 77 | vfp_double_dump("normalise_denormal: in", vd); | 77 | vfp_double_dump("normalise_denormal: in", vd); |
| 78 | 78 | ||
| @@ -109,9 +109,9 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double *vd, | |||
| 109 | exponent = vd->exponent; | 109 | exponent = vd->exponent; |
| 110 | significand = vd->significand; | 110 | significand = vd->significand; |
| 111 | 111 | ||
| 112 | shift = 32 - fls((ARMword)(significand >> 32)); | 112 | shift = 32 - fls((u32)(significand >> 32)); |
| 113 | if (shift == 32) | 113 | if (shift == 32) |
| 114 | shift = 64 - fls((ARMword)significand); | 114 | shift = 64 - fls((u32)significand); |
| 115 | if (shift) { | 115 | if (shift) { |
| 116 | exponent -= shift; | 116 | exponent -= shift; |
| 117 | significand <<= shift; | 117 | significand <<= shift; |
| @@ -566,7 +566,7 @@ static u32 vfp_double_ftoui(ARMul_State* state, int sd, int unused, int dm, u32 | |||
| 566 | /* | 566 | /* |
| 567 | * 2^0 <= m < 2^32-2^8 | 567 | * 2^0 <= m < 2^32-2^8 |
| 568 | */ | 568 | */ |
| 569 | d = (ARMword)((vdm.significand << 1) >> shift); | 569 | d = (u32)((vdm.significand << 1) >> shift); |
| 570 | rem = vdm.significand << (65 - shift); | 570 | rem = vdm.significand << (65 - shift); |
| 571 | 571 | ||
| 572 | if (rmode == FPSCR_ROUND_NEAREST) { | 572 | if (rmode == FPSCR_ROUND_NEAREST) { |
| @@ -647,7 +647,7 @@ static u32 vfp_double_ftosi(ARMul_State* state, int sd, int unused, int dm, u32 | |||
| 647 | int shift = 1023 + 63 - vdm.exponent; /* 58 */ | 647 | int shift = 1023 + 63 - vdm.exponent; /* 58 */ |
| 648 | u64 rem, incr = 0; | 648 | u64 rem, incr = 0; |
| 649 | 649 | ||
| 650 | d = (ARMword)((vdm.significand << 1) >> shift); | 650 | d = (u32)((vdm.significand << 1) >> shift); |
| 651 | rem = vdm.significand << (65 - shift); | 651 | rem = vdm.significand << (65 - shift); |
| 652 | 652 | ||
| 653 | if (rmode == FPSCR_ROUND_NEAREST) { | 653 | if (rmode == FPSCR_ROUND_NEAREST) { |