ARM as.

Ramana Radhakrishnan ramana.radhakrishnan@linaro.org
Thu Jun 28 13:12:00 GMT 2012


On 28 June 2012 14:09, Dave Pawson <dave.pawson@gmail.com> wrote:
> Sorry John.
> Nothing there I can learn from
>

Surely, you want to have GCC targeting ARM rather than your host
compiler for this purpose :)

Ramana

> DaveP
>
>
>
> On 28 June 2012 13:51, John Reiser <jreiser@bitwagon.com> wrote:
>>> I want to store a byte from r1 into the memory address held by r0
>>
>> Learn by example:
>> $ cat foo.c
>> void f(char *p, char c)
>> {
>>        *p = c;
>> }
>> $ gcc -S -O foo.c
>> $ cat foo.s
>
> .LFB0:
>        .cfi_startproc
>        pushq   %rbp
>        .cfi_def_cfa_offset 16
>        .cfi_offset 6, -16
>        movq    %rsp, %rbp
>        .cfi_def_cfa_register 6
>        movq    %rdi, -8(%rbp)
>        movl    %esi, %eax
>        movb    %al, -12(%rbp)
>        movq    -8(%rbp), %rax
>        movzbl  -12(%rbp), %edx
>        movb    %dl, (%rax)
>        popq    %rbp
>        .cfi_def_cfa 7, 8
>        ret
>        .cfi_endproc
>
>
>
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> Docbook FAQ.
> http://www.dpawson.co.uk



More information about the Binutils mailing list