1 Oct 2010 16:13
28 Oct 2010 11:59
RFA: XStormy16: Fix implementation of MOVF instruction
Nick Clifton <nickc <at> redhat.com>
2010-10-28 09:59:35 GMT
2010-10-28 09:59:35 GMT
Hi Guys,
The patch below fixes the emulation of the XStormy16's MOVF
instruction. There were two problems - firstly when memory addresses
were being aligned they were also being truncated to 16-bits. (The
MOVF instruction allows access to a 32-bit address space). Secondly
the pre-decrement and post-increment addressing modes were not
propagating the carry into the base register.
Tested by running lots of different xstormy16 programs under SID.
OK to apply ?
Cheers
Nick Clifton
cgen/ChangeLog
2010-10-28 Nick Clifton <nickc <at> redhat.com>
* cpu/xstormy16.cpu (alignfix-mem-far): New macro. Like
alignfix-mem, but works with 32-bit addresses.
(set-alignfix-mem-far): New macro. Like set-alignfix-mem but
works with 32-bit addresses.
(movfgrgri, movfgrgripostinc, movfgrgripredec, movfgrgrii,
movfgrgriipostinc, movfgrgriipredec): Use alignfix-mem-far.
(movfgrigr, movfgripostincgr, movfgripredecgr): Use
set-alignfix-mem-far.
(movfgrgriipostinc, movfgriipostincgr): Propagate addition to
source register into base register.
(movfgrgriipredec, movfgriipredecgr): Propagate subtraction from
(Continue reading)
RSS Feed