|Re: [hatari-devel] Re: [hatari-users] DSP emulation - MPY #immediate|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
I'm not reading it.
I'll subscribe immediatly.
I've just answeared to Doug and Thomas, I copy my answear here for
I've given a look at the mpy instruction again.
Are you sure of you here ?
I've tested the opcode $0114d0 in a DSP simulator I have here, and it
returns me the correct opcode (ie mpy x0,#20,a)
But, it seems not to be a DSP 56001 instruction.
I don't think we use the same doc. Be careful, there's one doc on
internet which clams to be for 56001 but is for DSP 56000 or something
I've done a quick try with qasm V0.13b and it return me an error on this
 mpy x0,#20,a
error at line 90: operand error
NB: I use it often to do some DSP tests and it generally compiles.
Are you sure your opcode compiles and run on a real falcon ?
Le 27/01/2013 17:36, Eero Tamminen a écrit :
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 :-)