diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/CMakeLists.txt | 45 | ||||
| -rw-r--r-- | src/core/arm/interpreter/mmu/maverick.cpp | 4 | ||||
| -rw-r--r-- | src/core/arm/interpreter/vfp/vfp_helper.h | 4 | ||||
| -rw-r--r-- | src/core/arm/interpreter/vfp/vfpdouble.cpp | 8 | ||||
| -rw-r--r-- | src/core/arm/interpreter/vfp/vfpsingle.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/function_wrappers.h | 15 |
6 files changed, 54 insertions, 26 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index fdf68c386..14c598bf3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -43,4 +43,47 @@ set(SRCS core.cpp | |||
| 43 | hw/lcd.cpp | 43 | hw/lcd.cpp |
| 44 | hw/ndma.cpp) | 44 | hw/ndma.cpp) |
| 45 | 45 | ||
| 46 | add_library(core STATIC ${SRCS}) | 46 | set(HEADERS core.h |
| 47 | core_timing.h | ||
| 48 | loader.h | ||
| 49 | mem_map.h | ||
| 50 | system.h | ||
| 51 | arm/disassembler/arm_disasm.h | ||
| 52 | arm/disassembler/load_symbol_map.h | ||
| 53 | arm/interpreter/arm_interpreter.h | ||
| 54 | arm/interpreter/arm_regformat.h | ||
| 55 | arm/interpreter/armcpu.h | ||
| 56 | arm/interpreter/armdefs.h | ||
| 57 | arm/interpreter/armemu.h | ||
| 58 | arm/interpreter/armmmu.h | ||
| 59 | arm/interpreter/armos.h | ||
| 60 | arm/interpreter/skyeye_defs.h | ||
| 61 | arm/interpreter/mmu/arm1176jzf_s_mmu.h | ||
| 62 | arm/interpreter/mmu/cache.h | ||
| 63 | arm/interpreter/mmu/rb.h | ||
| 64 | arm/interpreter/mmu/sa_mmu.h | ||
| 65 | arm/interpreter/mmu/tlb.h | ||
| 66 | arm/interpreter/mmu/wb.h | ||
| 67 | arm/interpreter/vfp/asm_vfp.h | ||
| 68 | arm/interpreter/vfp/vfp.h | ||
| 69 | arm/interpreter/vfp/vfp_helper.h | ||
| 70 | elf/elf_reader.h | ||
| 71 | elf/elf_types.h | ||
| 72 | file_sys/directory_file_system.h | ||
| 73 | file_sys/file_sys.h | ||
| 74 | file_sys/meta_file_system.h | ||
| 75 | hle/config_mem.h | ||
| 76 | hle/coprocessor.h | ||
| 77 | hle/hle.h | ||
| 78 | hle/syscall.h | ||
| 79 | hle/function_wrappers.h | ||
| 80 | hle/service/apt.h | ||
| 81 | hle/service/gsp.h | ||
| 82 | hle/service/hid.h | ||
| 83 | hle/service/service.h | ||
| 84 | hle/service/srv.h | ||
| 85 | hw/hw.h | ||
| 86 | hw/lcd.h | ||
| 87 | hw/ndma.h) | ||
| 88 | |||
| 89 | add_library(core STATIC ${SRCS} ${HEADERS}) | ||
diff --git a/src/core/arm/interpreter/mmu/maverick.cpp b/src/core/arm/interpreter/mmu/maverick.cpp index 0e98ef22b..adcc2efb5 100644 --- a/src/core/arm/interpreter/mmu/maverick.cpp +++ b/src/core/arm/interpreter/mmu/maverick.cpp | |||
| @@ -86,12 +86,12 @@ static union | |||
| 86 | } reg_conv; | 86 | } reg_conv; |
| 87 | 87 | ||
| 88 | static void | 88 | static void |
| 89 | printf_nothing (void *foo, ...) | 89 | printf_nothing (const char *foo, ...) |
| 90 | { | 90 | { |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | static void | 93 | static void |
| 94 | cirrus_not_implemented (char *insn) | 94 | cirrus_not_implemented (const char *insn) |
| 95 | { | 95 | { |
| 96 | fprintf (stderr, "Cirrus instruction '%s' not implemented.\n", insn); | 96 | fprintf (stderr, "Cirrus instruction '%s' not implemented.\n", insn); |
| 97 | fprintf (stderr, "aborting!\n"); | 97 | fprintf (stderr, "aborting!\n"); |
diff --git a/src/core/arm/interpreter/vfp/vfp_helper.h b/src/core/arm/interpreter/vfp/vfp_helper.h index 80f9a93f4..b222e79f1 100644 --- a/src/core/arm/interpreter/vfp/vfp_helper.h +++ b/src/core/arm/interpreter/vfp/vfp_helper.h | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | #define pr_info //printf | 50 | #define pr_info //printf |
| 51 | #define pr_debug //printf | 51 | #define pr_debug //printf |
| 52 | 52 | ||
| 53 | static u32 fls(int x); | 53 | static u32 vfp_fls(int x); |
| 54 | #define do_div(n, base) {n/=base;} | 54 | #define do_div(n, base) {n/=base;} |
| 55 | 55 | ||
| 56 | /* From vfpinstr.h */ | 56 | /* From vfpinstr.h */ |
| @@ -508,7 +508,7 @@ struct op { | |||
| 508 | u32 flags; | 508 | u32 flags; |
| 509 | }; | 509 | }; |
| 510 | 510 | ||
| 511 | static inline u32 fls(int x) | 511 | static u32 vfp_fls(int x) |
| 512 | { | 512 | { |
| 513 | int r = 32; | 513 | int r = 32; |
| 514 | 514 | ||
diff --git a/src/core/arm/interpreter/vfp/vfpdouble.cpp b/src/core/arm/interpreter/vfp/vfpdouble.cpp index cd5b5afa4..7f975cbeb 100644 --- a/src/core/arm/interpreter/vfp/vfpdouble.cpp +++ b/src/core/arm/interpreter/vfp/vfpdouble.cpp | |||
| @@ -69,9 +69,9 @@ static void vfp_double_dump(const char *str, struct vfp_double *d) | |||
| 69 | 69 | ||
| 70 | static void vfp_double_normalise_denormal(struct vfp_double *vd) | 70 | static void vfp_double_normalise_denormal(struct vfp_double *vd) |
| 71 | { | 71 | { |
| 72 | int bits = 31 - fls(vd->significand >> 32); | 72 | int bits = 31 - vfp_fls(vd->significand >> 32); |
| 73 | if (bits == 31) | 73 | if (bits == 31) |
| 74 | bits = 63 - fls(vd->significand); | 74 | bits = 63 - vfp_fls(vd->significand); |
| 75 | 75 | ||
| 76 | vfp_double_dump("normalise_denormal: in", vd); | 76 | vfp_double_dump("normalise_denormal: in", vd); |
| 77 | 77 | ||
| @@ -108,9 +108,9 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double *vd, | |||
| 108 | exponent = vd->exponent; | 108 | exponent = vd->exponent; |
| 109 | significand = vd->significand; | 109 | significand = vd->significand; |
| 110 | 110 | ||
| 111 | shift = 32 - fls(significand >> 32); | 111 | shift = 32 - vfp_fls(significand >> 32); |
| 112 | if (shift == 32) | 112 | if (shift == 32) |
| 113 | shift = 64 - fls(significand); | 113 | shift = 64 - vfp_fls(significand); |
| 114 | if (shift) { | 114 | if (shift) { |
| 115 | exponent -= shift; | 115 | exponent -= shift; |
| 116 | significand <<= shift; | 116 | significand <<= shift; |
diff --git a/src/core/arm/interpreter/vfp/vfpsingle.cpp b/src/core/arm/interpreter/vfp/vfpsingle.cpp index 05279f5ce..602713cff 100644 --- a/src/core/arm/interpreter/vfp/vfpsingle.cpp +++ b/src/core/arm/interpreter/vfp/vfpsingle.cpp | |||
| @@ -69,7 +69,7 @@ static void vfp_single_dump(const char *str, struct vfp_single *s) | |||
| 69 | 69 | ||
| 70 | static void vfp_single_normalise_denormal(struct vfp_single *vs) | 70 | static void vfp_single_normalise_denormal(struct vfp_single *vs) |
| 71 | { | 71 | { |
| 72 | int bits = 31 - fls(vs->significand); | 72 | int bits = 31 - vfp_fls(vs->significand); |
| 73 | 73 | ||
| 74 | vfp_single_dump("normalise_denormal: in", vs); | 74 | vfp_single_dump("normalise_denormal: in", vs); |
| 75 | 75 | ||
| @@ -111,7 +111,7 @@ u32 vfp_single_normaliseround(ARMul_State* state, int sd, struct vfp_single *vs, | |||
| 111 | * bit 31, so we have VFP_SINGLE_LOW_BITS + 1 below the least | 111 | * bit 31, so we have VFP_SINGLE_LOW_BITS + 1 below the least |
| 112 | * significant bit. | 112 | * significant bit. |
| 113 | */ | 113 | */ |
| 114 | shift = 32 - fls(significand); | 114 | shift = 32 - vfp_fls(significand); |
| 115 | if (shift < 32 && shift) { | 115 | if (shift < 32 && shift) { |
| 116 | exponent -= shift; | 116 | exponent -= shift; |
| 117 | significand <<= shift; | 117 | significand <<= shift; |
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 18b01b14b..d934eafb4 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h | |||
| @@ -83,15 +83,6 @@ template<u32 func(int, void *)> void WrapU_IV() { | |||
| 83 | RETURN(retval); | 83 | RETURN(retval); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | template<float func()> void WrapF_V() { | ||
| 87 | RETURNF(func()); | ||
| 88 | } | ||
| 89 | |||
| 90 | // TODO: Not sure about the floating point parameter passing | ||
| 91 | template<float func(int, float, u32)> void WrapF_IFU() { | ||
| 92 | RETURNF(func(PARAM(0), PARAMF(0), PARAM(1))); | ||
| 93 | } | ||
| 94 | |||
| 95 | template<u32 func(u32)> void WrapU_U() { | 86 | template<u32 func(u32)> void WrapU_U() { |
| 96 | u32 retval = func(PARAM(0)); | 87 | u32 retval = func(PARAM(0)); |
| 97 | RETURN(retval); | 88 | RETURN(retval); |
| @@ -127,12 +118,6 @@ template<int func(u32, u32)> void WrapI_UU() { | |||
| 127 | RETURN(retval); | 118 | RETURN(retval); |
| 128 | } | 119 | } |
| 129 | 120 | ||
| 130 | template<int func(u32, float, float)> void WrapI_UFF() { | ||
| 131 | // Not sure about the float arguments. | ||
| 132 | int retval = func(PARAM(0), PARAMF(0), PARAMF(1)); | ||
| 133 | RETURN(retval); | ||
| 134 | } | ||
| 135 | |||
| 136 | template<int func(u32, u32, u32)> void WrapI_UUU() { | 121 | template<int func(u32, u32, u32)> void WrapI_UUU() { |
| 137 | int retval = func(PARAM(0), PARAM(1), PARAM(2)); | 122 | int retval = func(PARAM(0), PARAM(1), PARAM(2)); |
| 138 | RETURN(retval); | 123 | RETURN(retval); |