This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

ARM Inline Assembler and 64 bit variables


Hi all,

is it possible to use the inline assembler of GCC for arm elf target in 
conjunction with 64 bit variables?

I tried the following example (arithmetic average), but with little 
success! 

uint64_t        a,b,r;
asm(
        "adds   %A0,    %A1,    %A2"            "\n\t"
        "adds   %B0,    %B1,    %B2"            "\n\t"
        "mov    %B0,    %B0,    rrx"            "\n\t"
        "mov    %A0,    %A0,    rrx"
        : "=r" (r) : "r" (a), "r" (b) : "cc"
);

Grüße
Wolfgang Haidinger
---
Wolfgang Haidinger
B&R Industrie-Elektronik GmbH
BU Controls, Safety
Tel: +43 (0)7748 6586 1121
eMail: wolfgang.haidinger@br-automation.com


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