Very interesting observation. The source-register address mode field As is only 2-bit wide. (That means it can only be 00, 01, 10, or 11). How did they manage to support 7 different address mode?
Maik Heese <[email protected]> wrote: 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 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users --------------------------------- Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
