This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gnu assembler question for ARM


> What did you try?  IIRC you want something like "[pc, . - .Label + 8]".

This version does not work.

Anyway, when I try to load integers (using the standard ldr) the following 2 options are ok:

----------------------------------------
myint:    .word    4
asm_test:
    ldr    r0, [pc, #myint - . - 8]

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


and 

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

myint:    .word    4
asm_test:
    ldr    r0, myint
    mov    pc, lr
----------------------------------------


With the maverickcrunck specific opcodes, only this one works:

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


myvar:    .float    3.0
asm_test:
    cfldrs  c0, [pc, #-12]
    cfstrs  c0, [r0, #0]
    mov    pc, lr
----------------------------------------



All the other attempts fail with the following error:

> asm.S:22: Error: offset expected -- `cfldrs c0,[pc,#myvar-.+8]'

It's really strange, from what I understand it should be possible, but it does not work...

If you want to try, gcc>4 supports the -mcpu=ep9312 architecture...

Best regards
Andrea



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]