Эх сурвалжийг харах

arm_dyncom_interpreter: Rename anonymous enum to TransExtData

archshift 10 жил өмнө
parent
commit
5297f5dfc9

+ 7 - 7
src/core/arm/dyncom/arm_dyncom_interpreter.cpp

@@ -24,7 +24,7 @@
 
 #include "core/gdbstub/gdbstub.h"
 
-enum {
+enum class TransExtData {
     COND            = (1 << 0),
     NON_BRANCH      = (1 << 1),
     DIRECT_BRANCH   = (1 << 2),
@@ -853,14 +853,14 @@ static int InterpreterTranslateBlock(ARMul_State* cpu, int& bb_start, u32 addr)
     // Go on next, until terminal instruction
     // Save start addr of basicblock in CreamCache
     ARM_INST_PTR inst_base = nullptr;
-    int ret = NON_BRANCH;
+    TransExtData ret = TransExtData::NON_BRANCH;
     int size = 0; // instruction size of basic block
     bb_start = top;
 
     u32 phys_addr = addr;
     u32 pc_start = cpu->Reg[15];
 
-    while (ret == NON_BRANCH) {
+    while (ret == TransExtData::NON_BRANCH) {
         unsigned int inst_size = InterpreterTranslateInstruction(cpu, phys_addr, inst_base);
 
         size++;
@@ -868,7 +868,7 @@ static int InterpreterTranslateBlock(ARMul_State* cpu, int& bb_start, u32 addr)
         phys_addr += inst_size;
 
         if ((phys_addr & 0xfff) == 0) {
-            inst_base->br = END_OF_PAGE;
+            inst_base->br = TransExtData::END_OF_PAGE;
         }
         ret = inst_base->br;
     };
@@ -889,8 +889,8 @@ static int InterpreterTranslateSingle(ARMul_State* cpu, int& bb_start, u32 addr)
 
     InterpreterTranslateInstruction(cpu, phys_addr, inst_base);
 
-    if (inst_base->br == NON_BRANCH) {
-        inst_base->br = SINGLE_STEP;
+    if (inst_base->br == TransExtData::NON_BRANCH) {
+        inst_base->br = TransExtData::SINGLE_STEP;
     }
 
     cpu->instruction_cache[pc_start] = bb_start;
@@ -935,7 +935,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
     #define SET_PC          (cpu->Reg[15] = cpu->Reg[15] + 8 + inst_cream->signed_immed_24)
     #define SHIFTER_OPERAND inst_cream->shtop_func(cpu, inst_cream->shifter_operand)
 
-    #define FETCH_INST if (inst_base->br != NON_BRANCH) goto DISPATCH; \
+    #define FETCH_INST if (inst_base->br != TransExtData::NON_BRANCH) goto DISPATCH; \
                        inst_base = (arm_inst *)&inst_buf[ptr]
 
     #define INC_PC(l)   ptr += sizeof(arm_inst) + l

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 113 - 115
src/core/arm/dyncom/arm_dyncom_trans.inc


+ 1 - 1
src/core/arm/dyncom/arm_dyncom_trans_struct.inc

@@ -1,7 +1,7 @@
 struct arm_inst {
     unsigned int idx;
     unsigned int cond;
-    int br;
+    TransExtData br;
     char component[0];
 };
 

+ 32 - 32
src/core/arm/skyeye_common/vfp/vfpinstr.cpp

@@ -26,7 +26,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmla)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -75,7 +75,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmls)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -124,7 +124,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vnmla)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -174,7 +174,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vnmls)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -223,7 +223,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vnmul)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -272,7 +272,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmul)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -321,7 +321,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vadd)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -370,7 +370,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vsub)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -419,7 +419,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vdiv)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -470,7 +470,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovi)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single = BIT(inst, 8) == 0;
     inst_cream->d      = (inst_cream->single ? BITS(inst,12,15)<<1 | BIT(inst,22) : BITS(inst,12,15) | BIT(inst,22)<<4);
@@ -518,7 +518,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovr)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single = BIT(inst, 8) == 0;
     inst_cream->d      = (inst_cream->single ? BITS(inst,12,15)<<1 | BIT(inst,22) : BITS(inst,12,15) | BIT(inst,22)<<4);
@@ -560,7 +560,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vabs)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -610,7 +610,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vneg)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -659,7 +659,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vsqrt)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -708,7 +708,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vcmp)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -757,7 +757,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vcmp2)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -806,7 +806,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbds)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -857,7 +857,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbff)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -906,7 +906,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbfi)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->dp_operation = BIT(inst, 8);
     inst_cream->instr = inst;
@@ -962,7 +962,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrs)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->to_arm = BIT(inst, 20) == 1;
     inst_cream->t      = BITS(inst, 12, 15);
@@ -1006,7 +1006,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmsr)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->reg = BITS(inst, 16, 19);
     inst_cream->Rt  = BITS(inst, 12, 15);
@@ -1069,7 +1069,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrc)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->d     = BITS(inst, 16, 19)|BIT(inst, 7)<<4;
     inst_cream->t     = BITS(inst, 12, 15);
@@ -1115,7 +1115,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmrs)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->reg = BITS(inst, 16, 19);
     inst_cream->Rt  = BITS(inst, 12, 15);
@@ -1200,7 +1200,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbcr)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->d     = BITS(inst, 16, 19)|BIT(inst, 7)<<4;
     inst_cream->t     = BITS(inst, 12, 15);
@@ -1253,7 +1253,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrrss)(unsigned int inst, int inde
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->to_arm = BIT(inst, 20) == 1;
     inst_cream->t      = BITS(inst, 12, 15);
@@ -1301,7 +1301,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrrd)(unsigned int inst, int index
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->to_arm = BIT(inst, 20) == 1;
     inst_cream->t      = BITS(inst, 12, 15);
@@ -1354,7 +1354,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vstr)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single = BIT(inst, 8) == 0;
     inst_cream->add    = BIT(inst, 23);
@@ -1420,7 +1420,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vpush)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single  = BIT(inst, 8) == 0;
     inst_cream->d       = (inst_cream->single ? BITS(inst, 12, 15)<<1|BIT(inst, 22) : BITS(inst, 12, 15)|BIT(inst, 22)<<4);
@@ -1495,7 +1495,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vstm)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single = BIT(inst, 8) == 0;
     inst_cream->add    = BIT(inst, 23);
@@ -1580,7 +1580,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vpop)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single  = BIT(inst, 8) == 0;
     inst_cream->d       = (inst_cream->single ? (BITS(inst, 12, 15)<<1)|BIT(inst, 22) : BITS(inst, 12, 15)|(BIT(inst, 22)<<4));
@@ -1653,7 +1653,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vldr)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single = BIT(inst, 8) == 0;
     inst_cream->add    = BIT(inst, 23);
@@ -1722,7 +1722,7 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(vldm)(unsigned int inst, int index)
 
     inst_base->cond = BITS(inst, 28, 31);
     inst_base->idx  = index;
-    inst_base->br   = NON_BRANCH;
+    inst_base->br   = TransExtData::NON_BRANCH;
 
     inst_cream->single = BIT(inst, 8) == 0;
     inst_cream->add    = BIT(inst, 23);

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно