diff options
author | Frank Ch. Eigler <fche@redhat.com> | 1998-03-28 00:35:43 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 1998-03-28 00:35:43 +0000 |
commit | b59e0b681533288e6817d4e0fc2353197471c469 (patch) | |
tree | b38ec44b4405ae7401396d2ee088946d2363a44d /sim/mips | |
parent | 666973d7d77b5022522a701298c9e5f9ea233efa (diff) | |
download | gdb-b59e0b681533288e6817d4e0fc2353197471c469.zip gdb-b59e0b681533288e6817d4e0fc2353197471c469.tar.gz gdb-b59e0b681533288e6817d4e0fc2353197471c469.tar.bz2 |
* Modified sky PKE behavior according to new SCEI specs.
Diffstat (limited to 'sim/mips')
-rw-r--r-- | sim/mips/sky-pke.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sim/mips/sky-pke.c b/sim/mips/sky-pke.c index a0db39a..0d3473e 100644 --- a/sim/mips/sky-pke.c +++ b/sim/mips/sky-pke.c @@ -1982,20 +1982,12 @@ pke_code_unpack(struct pke_device* me, unsigned_4 pkecode) switch(PKE_REG_MASK_GET(me, MODE, MDE)) { case PKE_MODE_ADDROW: /* add row registers to output data */ + case PKE_MODE_ACCROW: /* same .. later conditionally accumulate */ for(i=0; i<4; i++) /* exploit R0..R3 contiguity */ unpacked_data[i] += me->regs[PKE_REG_R0 + i][0]; break; - case PKE_MODE_ACCROW: /* add row registers to output data; accumulate */ - for(i=0; i<4; i++) - { - /* exploit R0..R3 contiguity */ - unpacked_data[i] += me->regs[PKE_REG_R0 + i][0]; - me->regs[PKE_REG_R0 + i][0] = unpacked_data[i]; - } - break; - case PKE_MODE_INPUT: /* pass data through */ default: /* specified as undefined */ ; @@ -2016,6 +2008,11 @@ pke_code_unpack(struct pke_device* me, unsigned_4 pkecode) { case PKE_MASKREG_INPUT: masked_value = & unpacked_data[i]; + + /* conditionally accumulate */ + if(PKE_REG_MASK_GET(me, MODE, MDE) == PKE_MODE_ACCROW) + me->regs[PKE_REG_R0 + i][0] = unpacked_data[i]; + break; case PKE_MASKREG_ROW: /* exploit R0..R3 contiguity */ @@ -2044,6 +2041,11 @@ pke_code_unpack(struct pke_device* me, unsigned_4 pkecode) { /* no mask - just copy over entire unpacked quadword */ memcpy(vu_new_data, unpacked_data, sizeof(unpacked_data)); + + /* conditionally store accumulated row results */ + if(PKE_REG_MASK_GET(me, MODE, MDE) == PKE_MODE_ACCROW) + for(i=0; i<4; i++) + me->regs[PKE_REG_R0 + i][0] = unpacked_data[i]; } /* write new VU data word at address; reverse words if needed */ |