diff options
author | Frank Ch. Eigler <fche@redhat.com> | 1998-04-07 00:01:31 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 1998-04-07 00:01:31 +0000 |
commit | 2ebb2a6855019589b697d55d06f3b5d7f7c99040 (patch) | |
tree | 3cc0cf80aa625e8234c8b5bebbb0af6c48295e6e /sim/mips/interp.c | |
parent | 0eebcbd7ab81d03d8629148e2ec89c15b2c686dd (diff) | |
download | gdb-2ebb2a6855019589b697d55d06f3b5d7f7c99040.zip gdb-2ebb2a6855019589b697d55d06f3b5d7f7c99040.tar.gz gdb-2ebb2a6855019589b697d55d06f3b5d7f7c99040.tar.bz2 |
* R5900 COP2 is now ready for testing. Let loose the dogs!
Mon Apr 6 19:55:56 1998 Frank Ch. Eigler <fche@cygnus.com>
* interp.c (cop_[ls]q): Replaced stub with proper COP2 code.
* sim-main.h (LOADADDRMASK): Redefine to allow 128-bit accesses
for TARGET_SKY.
* r5900.igen (SQC2): Thinko.
Diffstat (limited to 'sim/mips/interp.c')
-rw-r--r-- | sim/mips/interp.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c index dac3a60..7368695 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -2971,9 +2971,22 @@ cop_lq (SIM_DESC sd, 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)); @@ -3059,9 +3072,22 @@ cop_sq (SIM_DESC sd, 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)); |