Dear All,

I think there is a bug in msp430-as,
which creates wrong binary code for:

*** @R0+, X(Rm)

my OS: CentOS release 4.5

I build my own toolchain using:
- binutils-2.18 from ftp://sources.redhat.com/pub/binutils/releases/
- gcc-3.2.3 from ftp://gcc.gnu.org/pub/gcc/releases/
- patch files gcc-3.3 from http://mspgcc.cvs.sourceforge.net/mspgcc/gcc/
- msp430-libc from mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc

-------------------------------------------------------------
my ASM program:

        MOV #0x1234, 2(R4)

        MOV @R0+,    2(R4)
.word 0x1234

-------------------------------------------------------------
and the disassebled code (msp430-as my.s -o my.o; msp430-objdump -d my.o):

my.o:     file format elf32-msp430

Disassembly of section .text:

00000000 <.text>:
   0:   b4 40 34 12     mov     #4660,  2(r4)   ;#0x1234
   4:   02 00
   6:   b4 40 02 00     mov     #2,     4660(r4);#0x0002
   a:   34 12

-------------------------------------------------------------

I think the two variants should be equivalent, but
the asm code of *** @R0+, X(Rm) creates wrong ordered
arguments in binary code.

Best regards,
Maik

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

Reply via email to