https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64733

            Bug ID: 64733
           Summary: MOV instruction error when inline assembly code is
                    used in a C function
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: inline-asm
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aji at ti dot com

I have a simple C program that calls ASM instructions:
example.c

int example() {
asm volatile("mov X0, #0x10000000"); 
asm volatile("mov X1, #0x10000003"); 

};

Compiling with following gcc command:
aarch64-none-elf-gcc -march=armv8-a -mtune=cortex-a53 -D DEBUG -c -DGCC
-falign-functions=16 -falign-jumps=8 -falign-loops=8 -fomit-frame-pointer
-funroll-loops -g -D AARCH64 example.c -o example.o

I get this error:
tmp/cctdobg6.s: Assembler messages:
/tmp/cctdobg6.s:22: Error: immediate cannot be moved by a single instruction

Reply via email to