Previous 15994 Revisions Next

r9868 Saturday 1st January, 2011 at 09:49:44 UTC by MooglyGuy
Debug cruft removal services
[src/emu/cpu/rsp]rspdrc.c

src/emu/cpu/rsp/rspdrc.c
r9867r9868
123123   UINT32            vres[8];               /* used for temporary vector results */
124124
125125   /* register mappings */
126   drcuml_parameter   regmap[34];               /* parameter to register mappings for all 32 integer registers */
126   drcuml_parameter   regmap[32];               /* parameter to register mappings for all 32 integer registers */
127127
128128   /* subroutines */
129129   drcuml_codehandle *   entry;                  /* entry point */
r9867r9868
676676   rsp->impstate->drcfe = drcfe_init(device, &feconfig, rsp);
677677
678678   /* compute the register parameters */
679   for (regnum = 0; regnum < 34; regnum++)
679   for (regnum = 0; regnum < 32; regnum++)
680680   {
681681      rsp->impstate->regmap[regnum].type = (regnum == 0) ? DRCUML_PTYPE_IMMEDIATE : DRCUML_PTYPE_MEMORY;
682682      rsp->impstate->regmap[regnum].value = (regnum == 0) ? 0 : (FPTR)&rsp->r[regnum];
683683   }
684684
685   /*
686   drcbe_info beinfo;
687   drcuml_get_backend_info(rsp->impstate->drcuml, &beinfo);
688   if (beinfo.direct_iregs > 2)
689   {
690      rsp->impstate->regmap[30].type = DRCUML_PTYPE_INT_REGISTER;
691      rsp->impstate->regmap[30].value = DRCUML_REG_I2;
692   }
693   if (beinfo.direct_iregs > 3)
694   {
695      rsp->impstate->regmap[31].type = DRCUML_PTYPE_INT_REGISTER;
696      rsp->impstate->regmap[31].value = DRCUML_REG_I3;
697   }
698   if (beinfo.direct_iregs > 4)
699   {
700      rsp->impstate->regmap[2].type = DRCUML_PTYPE_INT_REGISTER;
701      rsp->impstate->regmap[2].value = DRCUML_REG_I4;
702   }
703   if (beinfo.direct_iregs > 5)
704   {
705      rsp->impstate->regmap[3].type = DRCUML_PTYPE_INT_REGISTER;
706      rsp->impstate->regmap[3].value = DRCUML_REG_I5;
707   }
708   if (beinfo.direct_iregs > 6)
709   {
710      rsp->impstate->regmap[4].type = DRCUML_PTYPE_INT_REGISTER;
711      rsp->impstate->regmap[4].value = DRCUML_REG_I6;
712   }
713   */
714
685715   /* mark the cache dirty so it is updated on next execute */
686716   rsp->impstate->cache_dirty = TRUE;
687717}
r9867r9868
715745   return ret;
716746}
717747
718static void dumpvecs(rsp_state *rsp)
719{
720   /*
721   char fuck[1024];
722   rsp_dasm_one(fuck, rsp->pc, IREAD32(rsp, rsp->pc));
723   printf("%08x: %s\n", rsp->pc, fuck);
724   printf("v0:  %08x %08x %08x %08x\n", rsp->v[ 0].l[0], rsp->v[ 0].l[1], rsp->v[ 0].l[2], rsp->v[ 0].l[3]);
725   printf("v1:  %08x %08x %08x %08x\n", rsp->v[ 1].l[0], rsp->v[ 1].l[1], rsp->v[ 1].l[2], rsp->v[ 1].l[3]);
726   printf("v2:  %08x %08x %08x %08x\n", rsp->v[ 2].l[0], rsp->v[ 2].l[1], rsp->v[ 2].l[2], rsp->v[ 2].l[3]);
727   printf("v3:  %08x %08x %08x %08x\n", rsp->v[ 3].l[0], rsp->v[ 3].l[1], rsp->v[ 3].l[2], rsp->v[ 3].l[3]);
728   printf("v4:  %08x %08x %08x %08x\n", rsp->v[ 4].l[0], rsp->v[ 4].l[1], rsp->v[ 4].l[2], rsp->v[ 4].l[3]);
729   printf("v5:  %08x %08x %08x %08x\n", rsp->v[ 5].l[0], rsp->v[ 5].l[1], rsp->v[ 5].l[2], rsp->v[ 5].l[3]);
730   printf("v6:  %08x %08x %08x %08x\n", rsp->v[ 6].l[0], rsp->v[ 6].l[1], rsp->v[ 6].l[2], rsp->v[ 6].l[3]);
731   printf("v7:  %08x %08x %08x %08x\n", rsp->v[ 7].l[0], rsp->v[ 7].l[1], rsp->v[ 7].l[2], rsp->v[ 7].l[3]);
732   printf("v8:  %08x %08x %08x %08x\n", rsp->v[ 8].l[0], rsp->v[ 8].l[1], rsp->v[ 8].l[2], rsp->v[ 8].l[3]);
733   printf("v9:  %08x %08x %08x %08x\n", rsp->v[ 9].l[0], rsp->v[ 9].l[1], rsp->v[ 9].l[2], rsp->v[ 9].l[3]);
734   printf("v10: %08x %08x %08x %08x\n", rsp->v[10].l[0], rsp->v[10].l[1], rsp->v[10].l[2], rsp->v[10].l[3]);
735   printf("v11: %08x %08x %08x %08x\n", rsp->v[11].l[0], rsp->v[11].l[1], rsp->v[11].l[2], rsp->v[11].l[3]);
736   printf("v12: %08x %08x %08x %08x\n", rsp->v[12].l[0], rsp->v[12].l[1], rsp->v[12].l[2], rsp->v[12].l[3]);
737   printf("v13: %08x %08x %08x %08x\n", rsp->v[13].l[0], rsp->v[13].l[1], rsp->v[13].l[2], rsp->v[13].l[3]);
738   printf("v14: %08x %08x %08x %08x\n", rsp->v[14].l[0], rsp->v[14].l[1], rsp->v[14].l[2], rsp->v[14].l[3]);
739   printf("v15: %08x %08x %08x %08x\n", rsp->v[15].l[0], rsp->v[15].l[1], rsp->v[15].l[2], rsp->v[15].l[3]);
740   printf("v16: %08x %08x %08x %08x\n", rsp->v[16].l[0], rsp->v[16].l[1], rsp->v[16].l[2], rsp->v[16].l[3]);
741   printf("v17: %08x %08x %08x %08x\n", rsp->v[17].l[0], rsp->v[17].l[1], rsp->v[17].l[2], rsp->v[17].l[3]);
742   printf("v18: %08x %08x %08x %08x\n", rsp->v[18].l[0], rsp->v[18].l[1], rsp->v[18].l[2], rsp->v[18].l[3]);
743   printf("v19: %08x %08x %08x %08x\n", rsp->v[19].l[0], rsp->v[19].l[1], rsp->v[19].l[2], rsp->v[19].l[3]);
744   printf("v20: %08x %08x %08x %08x\n", rsp->v[20].l[0], rsp->v[20].l[1], rsp->v[20].l[2], rsp->v[20].l[3]);
745   printf("v21: %08x %08x %08x %08x\n", rsp->v[21].l[0], rsp->v[21].l[1], rsp->v[21].l[2], rsp->v[21].l[3]);
746   printf("v22: %08x %08x %08x %08x\n", rsp->v[22].l[0], rsp->v[22].l[1], rsp->v[22].l[2], rsp->v[22].l[3]);
747   printf("v23: %08x %08x %08x %08x\n", rsp->v[23].l[0], rsp->v[23].l[1], rsp->v[23].l[2], rsp->v[23].l[3]);
748   printf("v24: %08x %08x %08x %08x\n", rsp->v[24].l[0], rsp->v[24].l[1], rsp->v[24].l[2], rsp->v[24].l[3]);
749   printf("v25: %08x %08x %08x %08x\n", rsp->v[25].l[0], rsp->v[25].l[1], rsp->v[25].l[2], rsp->v[25].l[3]);
750   printf("v26: %08x %08x %08x %08x\n", rsp->v[26].l[0], rsp->v[26].l[1], rsp->v[26].l[2], rsp->v[26].l[3]);
751   printf("v27: %08x %08x %08x %08x\n", rsp->v[27].l[0], rsp->v[27].l[1], rsp->v[27].l[2], rsp->v[27].l[3]);
752   printf("v28: %08x %08x %08x %08x\n", rsp->v[28].l[0], rsp->v[28].l[1], rsp->v[28].l[2], rsp->v[28].l[3]);
753   printf("v29: %08x %08x %08x %08x\n", rsp->v[29].l[0], rsp->v[29].l[1], rsp->v[29].l[2], rsp->v[29].l[3]);
754   printf("v30: %08x %08x %08x %08x\n", rsp->v[30].l[0], rsp->v[30].l[1], rsp->v[30].l[2], rsp->v[30].l[3]);
755   printf("v31: %08x %08x %08x %08x\n", rsp->v[31].l[0], rsp->v[31].l[1], rsp->v[31].l[2], rsp->v[31].l[3]);
756   printf("\n");
757   */
758}
759
760748static void cfunc_rsp_lbv(void *param)
761749{
762750   rsp_state *rsp = (rsp_state*)param;
r9867r9868
810798      VREG_B(dest, i) = READ8(rsp, ea);
811799      ea++;
812800   }
813
814   dumpvecs(rsp);
815801}
816802
817803static void cfunc_rsp_llv(void *param)
r9867r9868
942928      VREG_B(dest, i) = READ8(rsp, ea);
943929      ea++;
944930   }
945
946   dumpvecs(rsp);
947931}
948932
949933static void cfunc_rsp_lpv(void *param)
r9867r9868
973957   {
974958      VREG_S(dest, i) = READ8(rsp, ea + (((16-index) + i) & 0xf)) << 8;
975959   }
976
977   dumpvecs(rsp);
978960}
979961
980962static void cfunc_rsp_luv(void *param)
r9867r9868
1004986   {
1005987      VREG_S(dest, i) = READ8(rsp, ea + (((16-index) + i) & 0xf)) << 7;
1006988   }
1007
1008   dumpvecs(rsp);
1009989}
1010990
1011991static void cfunc_rsp_lhv(void *param)
r9867r9868
10351015   {
10361016      VREG_S(dest, i) = READ8(rsp, ea + (((16-index) + (i<<1)) & 0xf)) << 7;
10371017   }
1038
1039   dumpvecs(rsp);
10401018}
10411019
10421020static void cfunc_rsp_lfv(void *param)
r9867r9868
10731051      VREG_S(dest, i) = READ8(rsp, ea) << 7;
10741052      ea += 4;
10751053   }
1076
1077   dumpvecs(rsp);
10781054}
10791055
10801056static void cfunc_rsp_lwv(void *param)
r9867r9868
11091085      VREG_B(dest, i & 0xf) = READ8(rsp, ea);
11101086      ea += 4;
11111087   }
1112
1113   dumpvecs(rsp);
11141088}
11151089
11161090static void cfunc_rsp_ltv(void *param)
r9867r9868
11541128
11551129      ea += 2;
11561130   }
1157
1158   dumpvecs(rsp);
11591131}
11601132
11611133static int generate_lwc2(rsp_state *rsp, drcuml_block *block, compiler_state *compiler, const opcode_desc *desc)
r9867r9868
22892261   CLEAR_ZERO_FLAGS();
22902262   CLEAR_CARRY_FLAGS();
22912263   WRITEBACK_RESULT();
2292
2293   dumpvecs(rsp);
22942264}
22952265
22962266INLINE void cfunc_rsp_vsub(void *param)
r9867r9868
23272297   CLEAR_ZERO_FLAGS();
23282298   CLEAR_CARRY_FLAGS();
23292299   WRITEBACK_RESULT();
2330
2331   dumpvecs(rsp);
23322300}
23332301
23342302INLINE void cfunc_rsp_vabs(void *param)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team