diff options
| author | 2015-07-21 05:49:05 -0400 | |
|---|---|---|
| committer | 2015-07-21 05:49:05 -0400 | |
| commit | 043b2f882aa48488ba632621cd62c5784e1c8fab (patch) | |
| tree | bd812292360525f0172a469e11f81ac57339852d /src/core | |
| parent | Resolve issue accidentally left unaddressed in PR #930 (diff) | |
| parent | dyncom: Pass SVC immediates directly. (diff) | |
| download | yuzu-043b2f882aa48488ba632621cd62c5784e1c8fab.tar.gz yuzu-043b2f882aa48488ba632621cd62c5784e1c8fab.tar.xz yuzu-043b2f882aa48488ba632621cd62c5784e1c8fab.zip | |
Merge pull request #964 from lioncash/svc
dyncom: Pass SVC immediates directly.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/svc.cpp | 7 | ||||
| -rw-r--r-- | src/core/hle/svc.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index e40f3fa93..785f39566 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -6248,7 +6248,8 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) { | |||
| 6248 | SWI_INST: | 6248 | SWI_INST: |
| 6249 | { | 6249 | { |
| 6250 | if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { | 6250 | if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { |
| 6251 | SVC::CallSVC(Memory::Read32(cpu->Reg[15])); | 6251 | swi_inst* const inst_cream = (swi_inst*)inst_base->component; |
| 6252 | SVC::CallSVC(inst_cream->num & 0xFFFF); | ||
| 6252 | } | 6253 | } |
| 6253 | 6254 | ||
| 6254 | cpu->Reg[15] += GET_INST_SIZE(cpu); | 6255 | cpu->Reg[15] += GET_INST_SIZE(cpu); |
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 802ecc52a..bdede964e 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -833,8 +833,7 @@ static const FunctionDef SVC_Table[] = { | |||
| 833 | 833 | ||
| 834 | Common::Profiling::TimingCategory profiler_svc("SVC Calls"); | 834 | Common::Profiling::TimingCategory profiler_svc("SVC Calls"); |
| 835 | 835 | ||
| 836 | static const FunctionDef* GetSVCInfo(u32 opcode) { | 836 | static const FunctionDef* GetSVCInfo(u32 func_num) { |
| 837 | u32 func_num = opcode & 0xFFFFFF; // 8 bits | ||
| 838 | if (func_num >= ARRAY_SIZE(SVC_Table)) { | 837 | if (func_num >= ARRAY_SIZE(SVC_Table)) { |
| 839 | LOG_ERROR(Kernel_SVC, "unknown svc=0x%02X", func_num); | 838 | LOG_ERROR(Kernel_SVC, "unknown svc=0x%02X", func_num); |
| 840 | return nullptr; | 839 | return nullptr; |
| @@ -842,10 +841,10 @@ static const FunctionDef* GetSVCInfo(u32 opcode) { | |||
| 842 | return &SVC_Table[func_num]; | 841 | return &SVC_Table[func_num]; |
| 843 | } | 842 | } |
| 844 | 843 | ||
| 845 | void CallSVC(u32 opcode) { | 844 | void CallSVC(u32 immediate) { |
| 846 | Common::Profiling::ScopeTimer timer_svc(profiler_svc); | 845 | Common::Profiling::ScopeTimer timer_svc(profiler_svc); |
| 847 | 846 | ||
| 848 | const FunctionDef *info = GetSVCInfo(opcode); | 847 | const FunctionDef* info = GetSVCInfo(immediate); |
| 849 | if (info) { | 848 | if (info) { |
| 850 | if (info->func) { | 849 | if (info->func) { |
| 851 | info->func(); | 850 | info->func(); |
diff --git a/src/core/hle/svc.h b/src/core/hle/svc.h index 4389aa73d..12de9ffbe 100644 --- a/src/core/hle/svc.h +++ b/src/core/hle/svc.h | |||
| @@ -41,6 +41,6 @@ enum ArbitrationType { | |||
| 41 | 41 | ||
| 42 | namespace SVC { | 42 | namespace SVC { |
| 43 | 43 | ||
| 44 | void CallSVC(u32 opcode); | 44 | void CallSVC(u32 immediate); |
| 45 | 45 | ||
| 46 | } // namespace | 46 | } // namespace |