summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2015-01-04 21:38:20 -0500
committerGravatar bunnei2015-01-04 21:38:20 -0500
commitfe76d2b2fe406b93f5dd49dd0e3cfcdfd3694bb0 (patch)
treeb73b2a1f3348cb78c34674a3d705239aaf287ebf /src
parentMerge pull request #403 from yuriks/shutdown-system (diff)
parentskyeye: Remove duplicate typedefs (diff)
downloadyuzu-fe76d2b2fe406b93f5dd49dd0e3cfcdfd3694bb0.tar.gz
yuzu-fe76d2b2fe406b93f5dd49dd0e3cfcdfd3694bb0.tar.xz
yuzu-fe76d2b2fe406b93f5dd49dd0e3cfcdfd3694bb0.zip
Merge pull request #405 from lioncash/type
skyeye: Remove duplicate typedefs
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp8
-rw-r--r--src/core/arm/dyncom/arm_dyncom_run.h12
-rw-r--r--src/core/arm/dyncom/arm_dyncom_thumb.h8
-rw-r--r--src/core/arm/skyeye_common/skyeye_types.h30
4 files changed, 17 insertions, 41 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index e3a8b1f6e..5e89c724e 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -1079,7 +1079,7 @@ typedef struct _cdp_inst {
1079 unsigned int cp_num; 1079 unsigned int cp_num;
1080 unsigned int opcode_2; 1080 unsigned int opcode_2;
1081 unsigned int CRm; 1081 unsigned int CRm;
1082 uint32 inst; 1082 unsigned int inst;
1083}cdp_inst; 1083}cdp_inst;
1084 1084
1085typedef struct _uxtb_inst { 1085typedef struct _uxtb_inst {
@@ -3458,7 +3458,7 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr
3458 tdstate ret = thumb_translate (addr, inst, arm_inst, inst_size); 3458 tdstate ret = thumb_translate (addr, inst, arm_inst, inst_size);
3459 if(ret == t_branch){ 3459 if(ret == t_branch){
3460 // TODO: FIXME, endian should be judged 3460 // TODO: FIXME, endian should be judged
3461 uint32 tinstr; 3461 u32 tinstr;
3462 if((addr & 0x3) != 0) 3462 if((addr & 0x3) != 0)
3463 tinstr = inst >> 16; 3463 tinstr = inst >> 16;
3464 else 3464 else
@@ -3471,7 +3471,7 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr
3471 case 26: 3471 case 26:
3472 case 27: 3472 case 27:
3473 if (((tinstr & 0x0F00) != 0x0E00) && ((tinstr & 0x0F00) != 0x0F00)){ 3473 if (((tinstr & 0x0F00) != 0x0E00) && ((tinstr & 0x0F00) != 0x0F00)){
3474 uint32 cond = (tinstr & 0x0F00) >> 8; 3474 u32 cond = (tinstr & 0x0F00) >> 8;
3475 inst_index = table_length - 4; 3475 inst_index = table_length - 4;
3476 *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index); 3476 *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index);
3477 } else { 3477 } else {
@@ -6625,7 +6625,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
6625 BLX_1_THUMB: 6625 BLX_1_THUMB:
6626 { 6626 {
6627 // BLX 1 for armv5t and above 6627 // BLX 1 for armv5t and above
6628 uint32 tmp = cpu->Reg[15]; 6628 u32 tmp = cpu->Reg[15];
6629 blx_1_thumb *inst_cream = (blx_1_thumb *)inst_base->component; 6629 blx_1_thumb *inst_cream = (blx_1_thumb *)inst_base->component;
6630 cpu->Reg[15] = (cpu->Reg[14] + inst_cream->imm) & 0xFFFFFFFC; 6630 cpu->Reg[15] = (cpu->Reg[14] + inst_cream->imm) & 0xFFFFFFFC;
6631 cpu->Reg[14] = ((tmp + 2) | 1); 6631 cpu->Reg[14] = ((tmp + 2) | 1);
diff --git a/src/core/arm/dyncom/arm_dyncom_run.h b/src/core/arm/dyncom/arm_dyncom_run.h
index aeabeac16..c70522274 100644
--- a/src/core/arm/dyncom/arm_dyncom_run.h
+++ b/src/core/arm/dyncom/arm_dyncom_run.h
@@ -24,8 +24,8 @@
24void switch_mode(arm_core_t *core, uint32_t mode); 24void switch_mode(arm_core_t *core, uint32_t mode);
25 25
26/* FIXME, we temporarily think thumb instruction is always 16 bit */ 26/* FIXME, we temporarily think thumb instruction is always 16 bit */
27static inline uint32 GET_INST_SIZE(arm_core_t* core){ 27static inline u32 GET_INST_SIZE(arm_core_t* core) {
28 return core->TFlag? 2 : 4; 28 return core->TFlag? 2 : 4;
29} 29}
30 30
31/** 31/**
@@ -36,8 +36,8 @@ static inline uint32 GET_INST_SIZE(arm_core_t* core){
36* 36*
37* @return 37* @return
38*/ 38*/
39static inline addr_t CHECK_READ_REG15_WA(arm_core_t* core, int Rn){ 39static inline addr_t CHECK_READ_REG15_WA(arm_core_t* core, int Rn) {
40 return (Rn == 15)? ((core->Reg[15] & ~0x3) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; 40 return (Rn == 15)? ((core->Reg[15] & ~0x3) + GET_INST_SIZE(core) * 2) : core->Reg[Rn];
41} 41}
42 42
43/** 43/**
@@ -48,8 +48,8 @@ static inline addr_t CHECK_READ_REG15_WA(arm_core_t* core, int Rn){
48* 48*
49* @return 49* @return
50*/ 50*/
51static inline uint32 CHECK_READ_REG15(arm_core_t* core, int Rn){ 51static inline u32 CHECK_READ_REG15(arm_core_t* core, int Rn) {
52 return (Rn == 15)? ((core->Reg[15] & ~0x1) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; 52 return (Rn == 15)? ((core->Reg[15] & ~0x1) + GET_INST_SIZE(core) * 2) : core->Reg[Rn];
53} 53}
54 54
55#endif 55#endif
diff --git a/src/core/arm/dyncom/arm_dyncom_thumb.h b/src/core/arm/dyncom/arm_dyncom_thumb.h
index 5541de9d1..bf69b2fd4 100644
--- a/src/core/arm/dyncom/arm_dyncom_thumb.h
+++ b/src/core/arm/dyncom/arm_dyncom_thumb.h
@@ -37,10 +37,10 @@ enum tdstate {
37 t_uninitialized, 37 t_uninitialized,
38}; 38};
39 39
40tdstate 40tdstate thumb_translate(addr_t addr, u32 instr, u32* ainstr, u32* inst_size);
41thumb_translate(addr_t addr, uint32_t instr, uint32_t* ainstr, uint32_t* inst_size); 41
42static inline uint32 get_thumb_instr(uint32 instr, addr_t pc){ 42static inline u32 get_thumb_instr(u32 instr, addr_t pc) {
43 uint32 tinstr; 43 u32 tinstr;
44 if ((pc & 0x3) != 0) 44 if ((pc & 0x3) != 0)
45 tinstr = instr >> 16; 45 tinstr = instr >> 16;
46 else 46 else
diff --git a/src/core/arm/skyeye_common/skyeye_types.h b/src/core/arm/skyeye_common/skyeye_types.h
index e7f022f19..fc7d8d922 100644
--- a/src/core/arm/skyeye_common/skyeye_types.h
+++ b/src/core/arm/skyeye_common/skyeye_types.h
@@ -22,34 +22,10 @@
22 * 12/16/2006 Michael.Kang <blackfin.kang@gmail.com> 22 * 12/16/2006 Michael.Kang <blackfin.kang@gmail.com>
23 */ 23 */
24 24
25#ifndef __SKYEYE_TYPES_H 25#pragma once
26#define __SKYEYE_TYPES_H
27 26
28#include <stdint.h> 27#include <cstdint>
29
30/*default machine word length */
31
32#ifndef __BEOS__
33/* To avoid the type conflict with the qemu */
34#ifndef QEMU
35typedef uint8_t uint8;
36typedef uint16_t uint16;
37typedef uint32_t uint32;
38typedef uint64_t uint64;
39
40typedef int8_t sint8;
41typedef int16_t sint16;
42typedef int32_t sint32;
43typedef int64_t sint64;
44#endif
45 28
46typedef uint32_t address_t; 29typedef uint32_t address_t;
47typedef uint32_t uinteger_t;
48typedef int32_t integer_t;
49
50typedef uint32_t physical_address_t; 30typedef uint32_t physical_address_t;
51typedef uint32_t generic_address_t; 31typedef uint32_t generic_address_t;
52
53#endif
54
55#endif