switch (coproc_num)
{
case 2:
- /* XXX COP2 */
- break;
-
+ {
+ unsigned_16 xyzw;
+
+ while(vu0_busy())
+ vu0_issue(sd);
+
+ memcpy(& xyzw, & memword, sizeof(xyzw));
+ xyzw = H2T_16(xyzw);
+ /* one word at a time, argh! */
+ write_vu_vec_reg(&(vu0_device.regs), coproc_reg, 0, A4_16(& xyzw, 3));
+ write_vu_vec_reg(&(vu0_device.regs), coproc_reg, 1, A4_16(& xyzw, 2));
+ write_vu_vec_reg(&(vu0_device.regs), coproc_reg, 2, A4_16(& xyzw, 1));
+ write_vu_vec_reg(&(vu0_device.regs), coproc_reg, 3, A4_16(& xyzw, 0));
+ }
+ break;
+
default:
sim_io_printf(sd,"COP_LQ(%d,%d,??) at PC = 0x%s : TODO (architecture specific)\n",
coproc_num,coproc_reg,pr_addr(cia));
switch (coproc_num)
{
case 2:
- /* XXX COP2 */
- break;
+ {
+ unsigned_16 xyzw;
+ while(vu0_busy())
+ vu0_issue(sd);
+
+ /* one word at a time, argh! */
+ read_vu_vec_reg(&(vu0_device.regs), coproc_reg, 0, A4_16(& xyzw, 3));
+ read_vu_vec_reg(&(vu0_device.regs), coproc_reg, 1, A4_16(& xyzw, 2));
+ read_vu_vec_reg(&(vu0_device.regs), coproc_reg, 2, A4_16(& xyzw, 1));
+ read_vu_vec_reg(&(vu0_device.regs), coproc_reg, 3, A4_16(& xyzw, 0));
+ xyzw = T2H_16(xyzw);
+ return xyzw;
+ }
+ break;
+
default:
sim_io_printf(sd,"COP_SQ(%d,%d) at PC = 0x%s : TODO (architecture specific)\n",
coproc_num,coproc_reg,pr_addr(cia));
#define PSIZE (WITH_TARGET_ADDRESS_BITSIZE)
#endif
+/* start-sanitize-sky */
+#ifdef TARGET_SKY
+ /* 128-bit accesses are allowed */
+#undef LOADDRMASK
+#define LOADDRMASK AccessLength_QUADWORD
+#undef PSIZE
+#define PSIZE (WITH_TARGET_ADDRESS_BITSIZE)
+#endif /* TARGET_SKY */
+/* end-sanitize-sky */
+
+
INLINE_SIM_MAIN (int) address_translation PARAMS ((SIM_DESC sd, sim_cpu *, address_word cia, address_word vAddr, int IorD, int LorS, address_word *pAddr, int *CCA, int raw));
#define AddressTranslation(vAddr,IorD,LorS,pAddr,CCA,host,raw) \
address_translation (SD, CPU, cia, vAddr, IorD, LorS, pAddr, CCA, raw)