diff options
Diffstat (limited to 'src/core/arm/interpreter/armsupp.cpp')
| -rw-r--r-- | src/core/arm/interpreter/armsupp.cpp | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index b2bbedc18..e531dceda 100644 --- a/src/core/arm/interpreter/armsupp.cpp +++ b/src/core/arm/interpreter/armsupp.cpp | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | //#include "ansidecl.h" | 21 | //#include "ansidecl.h" |
| 22 | #include "skyeye_defs.h" | 22 | #include "skyeye_defs.h" |
| 23 | #include "core/hle/mrc.h" | 23 | #include "core/hle/coprocessor.h" |
| 24 | #include "core/arm/disassembler/arm_disasm.h" | 24 | #include "core/arm/disassembler/arm_disasm.h" |
| 25 | 25 | ||
| 26 | unsigned xscale_cp15_cp_access_allowed (ARMul_State * state, unsigned reg, | 26 | unsigned xscale_cp15_cp_access_allowed (ARMul_State * state, unsigned reg, |
| @@ -661,39 +661,40 @@ ARMul_STC (ARMul_State * state, ARMword instr, ARMword address) | |||
| 661 | void | 661 | void |
| 662 | ARMul_MCR (ARMul_State * state, ARMword instr, ARMword source) | 662 | ARMul_MCR (ARMul_State * state, ARMword instr, ARMword source) |
| 663 | { | 663 | { |
| 664 | unsigned cpab; | 664 | HLE::CallMCR(instr, source); |
| 665 | //unsigned cpab; | ||
| 665 | 666 | ||
| 666 | //printf("SKYEYE ARMul_MCR, CPnum is %x, source %x\n",CPNum, source); | 667 | ////printf("SKYEYE ARMul_MCR, CPnum is %x, source %x\n",CPNum, source); |
| 667 | if (!CP_ACCESS_ALLOWED (state, CPNum)) { | 668 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { |
| 668 | //chy 2004-07-19 should fix in the future ????!!!! | 669 | // //chy 2004-07-19 should fix in the future ????!!!! |
| 669 | //printf("SKYEYE ARMul_MCR, ACCESS_not ALLOWed, UndefinedInstr CPnum is %x, source %x\n",CPNum, source); | 670 | // //printf("SKYEYE ARMul_MCR, ACCESS_not ALLOWed, UndefinedInstr CPnum is %x, source %x\n",CPNum, source); |
| 670 | ARMul_UndefInstr (state, instr); | 671 | // ARMul_UndefInstr (state, instr); |
| 671 | return; | 672 | // return; |
| 672 | } | 673 | //} |
| 673 | 674 | ||
| 674 | cpab = (state->MCR[CPNum]) (state, ARMul_FIRST, instr, source); | 675 | //cpab = (state->MCR[CPNum]) (state, ARMul_FIRST, instr, source); |
| 675 | 676 | ||
| 676 | while (cpab == ARMul_BUSY) { | 677 | //while (cpab == ARMul_BUSY) { |
| 677 | ARMul_Icycles (state, 1, 0); | 678 | // ARMul_Icycles (state, 1, 0); |
| 678 | 679 | ||
| 679 | if (IntPending (state)) { | 680 | // if (IntPending (state)) { |
| 680 | cpab = (state->MCR[CPNum]) (state, ARMul_INTERRUPT, | 681 | // cpab = (state->MCR[CPNum]) (state, ARMul_INTERRUPT, |
| 681 | instr, 0); | 682 | // instr, 0); |
| 682 | return; | 683 | // return; |
| 683 | } | 684 | // } |
| 684 | else | 685 | // else |
| 685 | cpab = (state->MCR[CPNum]) (state, ARMul_BUSY, instr, | 686 | // cpab = (state->MCR[CPNum]) (state, ARMul_BUSY, instr, |
| 686 | source); | 687 | // source); |
| 687 | } | 688 | //} |
| 688 | 689 | ||
| 689 | if (cpab == ARMul_CANT) { | 690 | //if (cpab == ARMul_CANT) { |
| 690 | printf ("SKYEYE ARMul_MCR, CANT, UndefinedInstr %x CPnum is %x, source %x\n", instr, CPNum, source); | 691 | // printf ("SKYEYE ARMul_MCR, CANT, UndefinedInstr %x CPnum is %x, source %x\n", instr, CPNum, source); |
| 691 | ARMul_Abort (state, ARMul_UndefinedInstrV); | 692 | // ARMul_Abort (state, ARMul_UndefinedInstrV); |
| 692 | } | 693 | //} |
| 693 | else { | 694 | //else { |
| 694 | BUSUSEDINCPCN; | 695 | // BUSUSEDINCPCN; |
| 695 | ARMul_Ccycles (state, 1, 0); | 696 | // ARMul_Ccycles (state, 1, 0); |
| 696 | } | 697 | //} |
| 697 | } | 698 | } |
| 698 | 699 | ||
| 699 | /* This function does the Busy-Waiting for an MCRR instruction. */ | 700 | /* This function does the Busy-Waiting for an MCRR instruction. */ |
| @@ -739,7 +740,7 @@ ARMul_MRC (ARMul_State * state, ARMword instr) | |||
| 739 | { | 740 | { |
| 740 | unsigned cpab; | 741 | unsigned cpab; |
| 741 | 742 | ||
| 742 | ARMword result = HLE::CallMRC((HLE::ARM11_MRC_OPERATION)BITS(20, 27)); | 743 | ARMword result = HLE::CallMRC(instr); |
| 743 | 744 | ||
| 744 | ////printf("SKYEYE ARMul_MRC, CPnum is %x, instr %x\n",CPNum, instr); | 745 | ////printf("SKYEYE ARMul_MRC, CPnum is %x, instr %x\n",CPNum, instr); |
| 745 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { | 746 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { |