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

Reply via email to