Please clarify whether you are using msp430-as (from mspgcc) or msp430-elf-as (from upstream binutils). Several bugs like this were fixed for mspgcc, but I don't believe RH picked up the fixes. There's discussion in the archive around February 2012 on this, and it's fully documented on the mspgcc wiki but SourceForge isn't serving up those pages right now.
Peter On Mon, Mar 24, 2014 at 4:53 AM, Kees Schoenmakers <ksli...@gmail.com> wrote: > Hello All, > > I have a project which is build with IAR in the past and contains a > couple of assembly sources. > When building it with the lastest binutils(msp430-as) I am struck with > a bug in calculation of offsets. ALL versions of msp430-as, the latest > included, generate faulty code here. > > I simplified one code sample to > > intern1: mov #1,r15 > dec r14 > jz lab1 > nop > jmp lab2 > > intern2: dec r15 > jnz intern2 > ret > > lab1: mov #2,r14 > call intern1 > call intern2 > ret > > lab2: mov #3,r13 > ret > .end > > When I assemble it with > msp430-as -c bug430as.S > > the resulting code shows weird offsets for the 'jumps' (jmp, jz jnz), > even the calls... > > What is happening here? In the final linked binary with a lot of .c > and .S files the offsets are also wrong in the same way. > Another project, solely of .c files runs well.... > > Kees > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users