This is the mail archive of the binutils@sources.redhat.com 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: Thumb32 assembler (42/69)


On Tuesday 26 April 2005 10:55, Zack Weinberg wrote:
> constant handling is deferred to md_apply_fix3 so that code is not
> duplicated between there and the encoder functions.
>...
> @@ -10839,11 +10754,11 @@
> ???????? ? ? aligned (since the final address produced must be, and
> ???????? ? ? we can only describe word-aligned immediate offsets). ?*/
> ?
> -??????? ?if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3)
> +??????? ?if (value & 3)
> ???????? ? ?as_bad_where (fixP->fx_file, fixP->fx_line,
> -??????????????????????? ?_("invalid offset, target not word aligned

Breaks the following assembly fragment: 

        .text
        .code 16
        .align 2
        .global _start
        .thumb_func
_start:
        ldr r0, foo
        ldr r0, foo
        ldr r0, [pc, #4]
        ldr r0, [pc, #4]
foo:
        .word 42

Paul


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