summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/arm/dyncom/arm_dyncom_dec.cpp28
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp196
2 files changed, 191 insertions, 33 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_dec.cpp b/src/core/arm/dyncom/arm_dyncom_dec.cpp
index 12181d0ec..3887189f1 100644
--- a/src/core/arm/dyncom/arm_dyncom_dec.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_dec.cpp
@@ -181,7 +181,11 @@ const ISEITEM arm_instruction[] = {
181 { "ldrt", 3, 0, 26, 27, 0x00000001, 24, 24, 0x00000000, 20, 22, 0x00000003 }, 181 { "ldrt", 3, 0, 26, 27, 0x00000001, 24, 24, 0x00000000, 20, 22, 0x00000003 },
182 { "mrc", 3, 6, 24, 27, 0x0000000e, 20, 20, 0x00000001, 4, 4, 0x00000001 }, 182 { "mrc", 3, 6, 24, 27, 0x0000000e, 20, 20, 0x00000001, 4, 4, 0x00000001 },
183 { "mcr", 3, 0, 24, 27, 0x0000000e, 20, 20, 0x00000000, 4, 4, 0x00000001 }, 183 { "mcr", 3, 0, 24, 27, 0x0000000e, 20, 20, 0x00000000, 4, 4, 0x00000001 },
184 { "msr", 2, 0, 23, 27, 0x00000006, 20, 21, 0x00000002 }, 184 { "msr", 3, 0, 23, 27, 0x00000006, 20, 21, 0x00000002, 22, 22, 0x00000001 },
185 { "msr", 4, 0, 23, 27, 0x00000006, 20, 21, 0x00000002, 22, 22, 0x00000000, 16, 19, 0x00000004 },
186 { "msr", 5, 0, 23, 27, 0x00000006, 20, 21, 0x00000002, 22, 22, 0x00000000, 19, 19, 0x00000001, 16, 17, 0x00000000 },
187 { "msr", 4, 0, 23, 27, 0x00000006, 20, 21, 0x00000002, 22, 22, 0x00000000, 16, 17, 0x00000001 },
188 { "msr", 4, 0, 23, 27, 0x00000006, 20, 21, 0x00000002, 22, 22, 0x00000000, 17, 17, 0x00000001 },
185 { "ldrb", 3, 0, 26, 27, 0x00000001, 22, 22, 0x00000001, 20, 20, 0x00000001 }, 189 { "ldrb", 3, 0, 26, 27, 0x00000001, 22, 22, 0x00000001, 20, 20, 0x00000001 },
186 { "strb", 3, 0, 26, 27, 0x00000001, 22, 22, 0x00000001, 20, 20, 0x00000000 }, 190 { "strb", 3, 0, 26, 27, 0x00000001, 22, 22, 0x00000001, 20, 20, 0x00000000 },
187 { "ldr", 4, 0, 28, 31, 0x0000000e, 26, 27, 0x00000001, 22, 22, 0x00000000, 20, 20, 0x00000001 }, 191 { "ldr", 4, 0, 28, 31, 0x0000000e, 26, 27, 0x00000001, 22, 22, 0x00000000, 20, 20, 0x00000001 },
@@ -190,12 +194,17 @@ const ISEITEM arm_instruction[] = {
190 { "cdp", 2, 0, 24, 27, 0x0000000e, 4, 4, 0x00000000 }, 194 { "cdp", 2, 0, 24, 27, 0x0000000e, 4, 4, 0x00000000 },
191 { "stc", 2, 0, 25, 27, 0x00000006, 20, 20, 0x00000000 }, 195 { "stc", 2, 0, 25, 27, 0x00000006, 20, 20, 0x00000000 },
192 { "ldc", 2, 0, 25, 27, 0x00000006, 20, 20, 0x00000001 }, 196 { "ldc", 2, 0, 25, 27, 0x00000006, 20, 20, 0x00000001 },
193 { "swi", 1, 0, 24, 27, 0x0000000f },
194 { "bbl", 1, 0, 25, 27, 0x00000005 },
195 { "ldrexd", 2, ARMV6K, 20, 27, 0x0000001B, 4, 7, 0x00000009 }, 197 { "ldrexd", 2, ARMV6K, 20, 27, 0x0000001B, 4, 7, 0x00000009 },
196 { "strexd", 2, ARMV6K, 20, 27, 0x0000001A, 4, 7, 0x00000009 }, 198 { "strexd", 2, ARMV6K, 20, 27, 0x0000001A, 4, 7, 0x00000009 },
197 { "ldrexh", 2, ARMV6K, 20, 27, 0x0000001F, 4, 7, 0x00000009 }, 199 { "ldrexh", 2, ARMV6K, 20, 27, 0x0000001F, 4, 7, 0x00000009 },
198 { "strexh", 2, ARMV6K, 20, 27, 0x0000001E, 4, 7, 0x00000009 }, 200 { "strexh", 2, ARMV6K, 20, 27, 0x0000001E, 4, 7, 0x00000009 },
201 { "nop", 5, ARMV6K, 23, 27, 0x00000006, 22, 22, 0x00000000, 20, 21, 0x00000002, 16, 19, 0x00000000, 0, 7, 0x00000000 },
202 { "yield", 5, ARMV6K, 23, 27, 0x00000006, 22, 22, 0x00000000, 20, 21, 0x00000002, 16, 19, 0x00000000, 0, 7, 0x00000001 },
203 { "wfe", 5, ARMV6K, 23, 27, 0x00000006, 22, 22, 0x00000000, 20, 21, 0x00000002, 16, 19, 0x00000000, 0, 7, 0x00000002 },
204 { "wfi", 5, ARMV6K, 23, 27, 0x00000006, 22, 22, 0x00000000, 20, 21, 0x00000002, 16, 19, 0x00000000, 0, 7, 0x00000003 },
205 { "sev", 5, ARMV6K, 23, 27, 0x00000006, 22, 22, 0x00000000, 20, 21, 0x00000002, 16, 19, 0x00000000, 0, 7, 0x00000004 },
206 { "swi", 1, 0, 24, 27, 0x0000000f },
207 { "bbl", 1, 0, 25, 27, 0x00000005 },
199}; 208};
200 209
201const ISEITEM arm_exclusion_code[] = { 210const ISEITEM arm_exclusion_code[] = {
@@ -375,6 +384,10 @@ const ISEITEM arm_exclusion_code[] = {
375 { "mrc", 0, 6, 0 }, 384 { "mrc", 0, 6, 0 },
376 { "mcr", 0, 0, 0 }, 385 { "mcr", 0, 0, 0 },
377 { "msr", 0, 0, 0 }, 386 { "msr", 0, 0, 0 },
387 { "msr", 0, 0, 0 },
388 { "msr", 0, 0, 0 },
389 { "msr", 0, 0, 0 },
390 { "msr", 0, 0, 0 },
378 { "ldrb", 0, 0, 0 }, 391 { "ldrb", 0, 0, 0 },
379 { "strb", 0, 0, 0 }, 392 { "strb", 0, 0, 0 },
380 { "ldr", 0, 0, 0 }, 393 { "ldr", 0, 0, 0 },
@@ -383,12 +396,17 @@ const ISEITEM arm_exclusion_code[] = {
383 { "cdp", 0, 0, 0 }, 396 { "cdp", 0, 0, 0 },
384 { "stc", 0, 0, 0 }, 397 { "stc", 0, 0, 0 },
385 { "ldc", 0, 0, 0 }, 398 { "ldc", 0, 0, 0 },
386 { "swi", 0, 0, 0 },
387 { "bbl", 0, 0, 0 },
388 { "ldrexd", 0, ARMV6K, 0 }, 399 { "ldrexd", 0, ARMV6K, 0 },
389 { "strexd", 0, ARMV6K, 0 }, 400 { "strexd", 0, ARMV6K, 0 },
390 { "ldrexh", 0, ARMV6K, 0 }, 401 { "ldrexh", 0, ARMV6K, 0 },
391 { "strexh", 0, ARMV6K, 0 }, 402 { "strexh", 0, ARMV6K, 0 },
403 { "nop", 0, ARMV6K, 0 },
404 { "yield", 0, ARMV6K, 0 },
405 { "wfe", 0, ARMV6K, 0 },
406 { "wfi", 0, ARMV6K, 0 },
407 { "sev", 0, ARMV6K, 0 },
408 { "swi", 0, 0, 0 },
409 { "bbl", 0, 0, 0 },
392 410
393 { "bl_1_thumb", 0, INVALID, 0 }, // Should be table[-4] 411 { "bl_1_thumb", 0, INVALID, 0 }, // Should be table[-4]
394 { "bl_2_thumb", 0, INVALID, 0 }, // Should be located at the end of the table[-3] 412 { "bl_2_thumb", 0, INVALID, 0 }, // Should be located at the end of the table[-3]
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 034f4d570..66282a7e6 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -2037,6 +2037,19 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(orr)(unsigned int inst, int index)
2037 return inst_base; 2037 return inst_base;
2038} 2038}
2039 2039
2040// NOP introduced in ARMv6K.
2041static ARM_INST_PTR INTERPRETER_TRANSLATE(nop)(unsigned int inst, int index)
2042{
2043 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst));
2044
2045 inst_base->cond = BITS(inst, 28, 31);
2046 inst_base->idx = index;
2047 inst_base->br = NON_BRANCH;
2048 inst_base->load_r15 = 0;
2049
2050 return inst_base;
2051}
2052
2040static ARM_INST_PTR INTERPRETER_TRANSLATE(pkhbt)(unsigned int inst, int index) 2053static ARM_INST_PTR INTERPRETER_TRANSLATE(pkhbt)(unsigned int inst, int index)
2041{ 2054{
2042 arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(pkh_inst)); 2055 arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(pkh_inst));
@@ -2328,6 +2341,18 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(setend)(unsigned int inst, int index)
2328 return inst_base; 2341 return inst_base;
2329} 2342}
2330 2343
2344static ARM_INST_PTR INTERPRETER_TRANSLATE(sev)(unsigned int inst, int index)
2345{
2346 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst));
2347
2348 inst_base->cond = BITS(inst, 28, 31);
2349 inst_base->idx = index;
2350 inst_base->br = NON_BRANCH;
2351 inst_base->load_r15 = 0;
2352
2353 return inst_base;
2354}
2355
2331static ARM_INST_PTR INTERPRETER_TRANSLATE(shadd8)(unsigned int inst, int index) 2356static ARM_INST_PTR INTERPRETER_TRANSLATE(shadd8)(unsigned int inst, int index)
2332{ 2357{
2333 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst) + sizeof(generic_arm_inst)); 2358 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst) + sizeof(generic_arm_inst));
@@ -3332,6 +3357,40 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(uxtb16)(unsigned int inst, int index)
3332 return INTERPRETER_TRANSLATE(uxtab16)(inst, index); 3357 return INTERPRETER_TRANSLATE(uxtab16)(inst, index);
3333} 3358}
3334 3359
3360static ARM_INST_PTR INTERPRETER_TRANSLATE(wfe)(unsigned int inst, int index)
3361{
3362 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst));
3363
3364 inst_base->cond = BITS(inst, 28, 31);
3365 inst_base->idx = index;
3366 inst_base->br = NON_BRANCH;
3367 inst_base->load_r15 = 0;
3368
3369 return inst_base;
3370}
3371static ARM_INST_PTR INTERPRETER_TRANSLATE(wfi)(unsigned int inst, int index)
3372{
3373 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst));
3374
3375 inst_base->cond = BITS(inst, 28, 31);
3376 inst_base->idx = index;
3377 inst_base->br = NON_BRANCH;
3378 inst_base->load_r15 = 0;
3379
3380 return inst_base;
3381}
3382static ARM_INST_PTR INTERPRETER_TRANSLATE(yield)(unsigned int inst, int index)
3383{
3384 arm_inst* const inst_base = (arm_inst*)AllocBuffer(sizeof(arm_inst));
3385
3386 inst_base->cond = BITS(inst, 28, 31);
3387 inst_base->idx = index;
3388 inst_base->br = NON_BRANCH;
3389 inst_base->load_r15 = 0;
3390
3391 return inst_base;
3392}
3393
3335// Floating point VFPv3 structures and instructions 3394// Floating point VFPv3 structures and instructions
3336 3395
3337#define VFP_INTERPRETER_STRUCT 3396#define VFP_INTERPRETER_STRUCT
@@ -3521,6 +3580,10 @@ const transop_fp_t arm_instruction_trans[] = {
3521 INTERPRETER_TRANSLATE(mrc), 3580 INTERPRETER_TRANSLATE(mrc),
3522 INTERPRETER_TRANSLATE(mcr), 3581 INTERPRETER_TRANSLATE(mcr),
3523 INTERPRETER_TRANSLATE(msr), 3582 INTERPRETER_TRANSLATE(msr),
3583 INTERPRETER_TRANSLATE(msr),
3584 INTERPRETER_TRANSLATE(msr),
3585 INTERPRETER_TRANSLATE(msr),
3586 INTERPRETER_TRANSLATE(msr),
3524 INTERPRETER_TRANSLATE(ldrb), 3587 INTERPRETER_TRANSLATE(ldrb),
3525 INTERPRETER_TRANSLATE(strb), 3588 INTERPRETER_TRANSLATE(strb),
3526 INTERPRETER_TRANSLATE(ldr), 3589 INTERPRETER_TRANSLATE(ldr),
@@ -3529,12 +3592,17 @@ const transop_fp_t arm_instruction_trans[] = {
3529 INTERPRETER_TRANSLATE(cdp), 3592 INTERPRETER_TRANSLATE(cdp),
3530 INTERPRETER_TRANSLATE(stc), 3593 INTERPRETER_TRANSLATE(stc),
3531 INTERPRETER_TRANSLATE(ldc), 3594 INTERPRETER_TRANSLATE(ldc),
3532 INTERPRETER_TRANSLATE(swi),
3533 INTERPRETER_TRANSLATE(bbl),
3534 INTERPRETER_TRANSLATE(ldrexd), 3595 INTERPRETER_TRANSLATE(ldrexd),
3535 INTERPRETER_TRANSLATE(strexd), 3596 INTERPRETER_TRANSLATE(strexd),
3536 INTERPRETER_TRANSLATE(ldrexh), 3597 INTERPRETER_TRANSLATE(ldrexh),
3537 INTERPRETER_TRANSLATE(strexh), 3598 INTERPRETER_TRANSLATE(strexh),
3599 INTERPRETER_TRANSLATE(nop),
3600 INTERPRETER_TRANSLATE(yield),
3601 INTERPRETER_TRANSLATE(wfe),
3602 INTERPRETER_TRANSLATE(wfi),
3603 INTERPRETER_TRANSLATE(sev),
3604 INTERPRETER_TRANSLATE(swi),
3605 INTERPRETER_TRANSLATE(bbl),
3538 3606
3539 // All the thumb instructions should be placed the end of table 3607 // All the thumb instructions should be placed the end of table
3540 INTERPRETER_TRANSLATE(b_2_thumb), 3608 INTERPRETER_TRANSLATE(b_2_thumb),
@@ -3708,7 +3776,8 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
3708 #define FETCH_INST if (inst_base->br != NON_BRANCH) goto DISPATCH; \ 3776 #define FETCH_INST if (inst_base->br != NON_BRANCH) goto DISPATCH; \
3709 inst_base = (arm_inst *)&inst_buf[ptr] 3777 inst_base = (arm_inst *)&inst_buf[ptr]
3710 3778
3711 #define INC_PC(l) ptr += sizeof(arm_inst) + l 3779 #define INC_PC(l) ptr += sizeof(arm_inst) + l
3780 #define INC_PC_STUB ptr += sizeof(arm_inst)
3712 3781
3713// GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback to a 3782// GCC and Clang have a C++ extension to support a lookup table of labels. Otherwise, fallback to a
3714// clunky switch statement. 3783// clunky switch statement.
@@ -3897,28 +3966,37 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
3897 case 172: goto MRC_INST; \ 3966 case 172: goto MRC_INST; \
3898 case 173: goto MCR_INST; \ 3967 case 173: goto MCR_INST; \
3899 case 174: goto MSR_INST; \ 3968 case 174: goto MSR_INST; \
3900 case 175: goto LDRB_INST; \ 3969 case 175: goto MSR_INST; \
3901 case 176: goto STRB_INST; \ 3970 case 176: goto MSR_INST; \
3902 case 177: goto LDR_INST; \ 3971 case 177: goto MSR_INST; \
3903 case 178: goto LDRCOND_INST ; \ 3972 case 178: goto MSR_INST; \
3904 case 179: goto STR_INST; \ 3973 case 179: goto LDRB_INST; \
3905 case 180: goto CDP_INST; \ 3974 case 180: goto STRB_INST; \
3906 case 181: goto STC_INST; \ 3975 case 181: goto LDR_INST; \
3907 case 182: goto LDC_INST; \ 3976 case 182: goto LDRCOND_INST ; \
3908 case 183: goto SWI_INST; \ 3977 case 183: goto STR_INST; \
3909 case 184: goto BBL_INST; \ 3978 case 184: goto CDP_INST; \
3910 case 185: goto LDREXD_INST; \ 3979 case 185: goto STC_INST; \
3911 case 186: goto STREXD_INST; \ 3980 case 186: goto LDC_INST; \
3912 case 187: goto LDREXH_INST; \ 3981 case 187: goto LDREXD_INST; \
3913 case 188: goto STREXH_INST; \ 3982 case 188: goto STREXD_INST; \
3914 case 189: goto B_2_THUMB ; \ 3983 case 189: goto LDREXH_INST; \
3915 case 190: goto B_COND_THUMB ; \ 3984 case 190: goto STREXH_INST; \
3916 case 191: goto BL_1_THUMB ; \ 3985 case 191: goto NOP_INST; \
3917 case 192: goto BL_2_THUMB ; \ 3986 case 192: goto YIELD_INST; \
3918 case 193: goto BLX_1_THUMB ; \ 3987 case 193: goto WFE_INST; \
3919 case 194: goto DISPATCH; \ 3988 case 194: goto WFI_INST; \
3920 case 195: goto INIT_INST_LENGTH; \ 3989 case 195: goto SEV_INST; \
3921 case 196: goto END; \ 3990 case 196: goto SWI_INST; \
3991 case 197: goto BBL_INST; \
3992 case 198: goto B_2_THUMB ; \
3993 case 199: goto B_COND_THUMB ; \
3994 case 200: goto BL_1_THUMB ; \
3995 case 201: goto BL_2_THUMB ; \
3996 case 202: goto BLX_1_THUMB ; \
3997 case 203: goto DISPATCH; \
3998 case 204: goto INIT_INST_LENGTH; \
3999 case 205: goto END; \
3922 } 4000 }
3923#endif 4001#endif
3924 4002
@@ -3964,9 +4042,11 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
3964 &&MCRR_INST,&&MRRC_INST,&&CMP_INST,&&TST_INST,&&TEQ_INST,&&CMN_INST,&&SMULL_INST,&&UMULL_INST,&&UMLAL_INST,&&SMLAL_INST,&&MUL_INST, 4042 &&MCRR_INST,&&MRRC_INST,&&CMP_INST,&&TST_INST,&&TEQ_INST,&&CMN_INST,&&SMULL_INST,&&UMULL_INST,&&UMLAL_INST,&&SMLAL_INST,&&MUL_INST,
3965 &&MLA_INST,&&SSAT_INST,&&USAT_INST,&&MRS_INST,&&MSR_INST,&&AND_INST,&&BIC_INST,&&LDM_INST,&&EOR_INST,&&ADD_INST,&&RSB_INST,&&RSC_INST, 4043 &&MLA_INST,&&SSAT_INST,&&USAT_INST,&&MRS_INST,&&MSR_INST,&&AND_INST,&&BIC_INST,&&LDM_INST,&&EOR_INST,&&ADD_INST,&&RSB_INST,&&RSC_INST,
3966 &&SBC_INST,&&ADC_INST,&&SUB_INST,&&ORR_INST,&&MVN_INST,&&MOV_INST,&&STM_INST,&&LDM_INST,&&LDRSH_INST,&&STM_INST,&&LDM_INST,&&LDRSB_INST, 4044 &&SBC_INST,&&ADC_INST,&&SUB_INST,&&ORR_INST,&&MVN_INST,&&MOV_INST,&&STM_INST,&&LDM_INST,&&LDRSH_INST,&&STM_INST,&&LDM_INST,&&LDRSB_INST,
3967 &&STRD_INST,&&LDRH_INST,&&STRH_INST,&&LDRD_INST,&&STRT_INST,&&STRBT_INST,&&LDRBT_INST,&&LDRT_INST,&&MRC_INST,&&MCR_INST,&&MSR_INST, 4045 &&STRD_INST,&&LDRH_INST,&&STRH_INST,&&LDRD_INST,&&STRT_INST,&&STRBT_INST,&&LDRBT_INST,&&LDRT_INST,&&MRC_INST,&&MCR_INST,
3968 &&LDRB_INST,&&STRB_INST,&&LDR_INST,&&LDRCOND_INST, &&STR_INST,&&CDP_INST,&&STC_INST,&&LDC_INST,&&SWI_INST,&&BBL_INST,&&LDREXD_INST, 4046 &&MSR_INST, &&MSR_INST, &&MSR_INST, &&MSR_INST, &&MSR_INST,
3969 &&STREXD_INST,&&LDREXH_INST,&&STREXH_INST,&&B_2_THUMB, &&B_COND_THUMB,&&BL_1_THUMB, &&BL_2_THUMB, &&BLX_1_THUMB, &&DISPATCH, 4047 &&LDRB_INST,&&STRB_INST,&&LDR_INST,&&LDRCOND_INST, &&STR_INST,&&CDP_INST,&&STC_INST,&&LDC_INST, &&LDREXD_INST,
4048 &&STREXD_INST,&&LDREXH_INST,&&STREXH_INST, &&NOP_INST, &&YIELD_INST, &&WFE_INST, &&WFI_INST, &&SEV_INST, &&SWI_INST,&&BBL_INST,
4049 &&B_2_THUMB, &&B_COND_THUMB,&&BL_1_THUMB, &&BL_2_THUMB, &&BLX_1_THUMB, &&DISPATCH,
3970 &&INIT_INST_LENGTH,&&END 4050 &&INIT_INST_LENGTH,&&END
3971 }; 4051 };
3972#endif 4052#endif
@@ -5019,6 +5099,14 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
5019 GOTO_NEXT_INST; 5099 GOTO_NEXT_INST;
5020 } 5100 }
5021 5101
5102 NOP_INST:
5103 {
5104 cpu->Reg[15] += GET_INST_SIZE(cpu);
5105 INC_PC_STUB;
5106 FETCH_INST;
5107 GOTO_NEXT_INST;
5108 }
5109
5022 PKHBT_INST: 5110 PKHBT_INST:
5023 { 5111 {
5024 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) { 5112 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
@@ -5502,6 +5590,19 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
5502 GOTO_NEXT_INST; 5590 GOTO_NEXT_INST;
5503 } 5591 }
5504 5592
5593 SEV_INST:
5594 {
5595 // Stubbed, as SEV is a hint instruction.
5596 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
5597 LOG_TRACE(Core_ARM11, "SEV executed.");
5598 }
5599
5600 cpu->Reg[15] += GET_INST_SIZE(cpu);
5601 INC_PC_STUB;
5602 FETCH_INST;
5603 GOTO_NEXT_INST;
5604 }
5605
5505 SHADD8_INST: 5606 SHADD8_INST:
5506 SHADD16_INST: 5607 SHADD16_INST:
5507 SHADDSUBX_INST: 5608 SHADDSUBX_INST:
@@ -6965,6 +7066,45 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
6965 GOTO_NEXT_INST; 7066 GOTO_NEXT_INST;
6966 } 7067 }
6967 7068
7069 WFE_INST:
7070 {
7071 // Stubbed, as WFE is a hint instruction.
7072 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
7073 LOG_TRACE(Core_ARM11, "WFE executed.");
7074 }
7075
7076 cpu->Reg[15] += GET_INST_SIZE(cpu);
7077 INC_PC_STUB;
7078 FETCH_INST;
7079 GOTO_NEXT_INST;
7080 }
7081
7082 WFI_INST:
7083 {
7084 // Stubbed, as WFI is a hint instruction.
7085 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
7086 LOG_TRACE(Core_ARM11, "WFI executed.");
7087 }
7088
7089 cpu->Reg[15] += GET_INST_SIZE(cpu);
7090 INC_PC_STUB;
7091 FETCH_INST;
7092 GOTO_NEXT_INST;
7093 }
7094
7095 YIELD_INST:
7096 {
7097 // Stubbed, as YIELD is a hint instruction.
7098 if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
7099 LOG_TRACE(Core_ARM11, "YIELD executed.");
7100 }
7101
7102 cpu->Reg[15] += GET_INST_SIZE(cpu);
7103 INC_PC_STUB;
7104 FETCH_INST;
7105 GOTO_NEXT_INST;
7106 }
7107
6968 #define VFP_INTERPRETER_IMPL 7108 #define VFP_INTERPRETER_IMPL
6969 #include "core/arm/skyeye_common/vfp/vfpinstr.cpp" 7109 #include "core/arm/skyeye_common/vfp/vfpinstr.cpp"
6970 #undef VFP_INTERPRETER_IMPL 7110 #undef VFP_INTERPRETER_IMPL