|[hatari-devel] Re: [hatari-users] DSP emulation - MPY #immediate|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
As Laurent hasn't commented this, maybe he's not reading
the users mailing list. -> I forward this to hatari-devel.
On perjantai 25 tammikuu 2013, Douglas Little wrote:
> I think I see a bug (?) in the DSP56k emulation. I'm not absolutely sure
> yet but I checked what I could against the DSP56001 User Manual before
> When assembling the 'multiply immediate 2^-n' (i.e. the n-bit right
> shift) instruction e.g.
> mpy x0, #4, a
> move a0,D ; D = (x0>>4)
> mpy x0, #(24-4), a
> move a1,D ; D = (x0<<4)
> ...Hatari issues an illegal instruction error when executing the MPY
> opcode. The disassembly looks like this:
> p:08bb 0114d0 (00 cyc) dc $0114d0 <--- MPY x0,#20,a
> p:08bc 0af080 000902 (07 cyc) jmp p:$0902
> The encoding for this instruction can be found on page A231 of the
> DSP56000 Family Manual and $0114d0 seems to be the correct opcode
> encoding. The same opcode can be found in the DSP56001 User Manual.
> There is no hurry for this but would nice to be able to use this
> instruction. It's the only way to shift N bits without clobbering an
> extra register with another move :-)