diff options
| author | 2015-07-21 03:51:36 -0400 | |
|---|---|---|
| committer | 2015-07-21 03:56:29 -0400 | |
| commit | c2689b8c2c6f0ac023eddb25d98da6bc1fa95205 (patch) | |
| tree | 4d5380eb7b032f0090370ea34556558e59eb5742 /src/core/hle/svc.cpp | |
| parent | Merge pull request #959 from Subv/home (diff) | |
| download | yuzu-c2689b8c2c6f0ac023eddb25d98da6bc1fa95205.tar.gz yuzu-c2689b8c2c6f0ac023eddb25d98da6bc1fa95205.tar.xz yuzu-c2689b8c2c6f0ac023eddb25d98da6bc1fa95205.zip | |
dyncom: Pass SVC immediates directly.
Previously it would just re-read the already decoded instruction and extract the immediate value.
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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(); |