This is the mail archive of the gcc-bugs@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]

[Bug inline-asm/64733] MOV instruction error when inline assembly code is used in a C function


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

--- Comment #2 from aji at ti dot com ---
The issue is with this line of code:
asm volatile("mov X1, #0x10000003");

If I modify the mov instruction to take a variable input it works.

val = 0x10000003;
asm volatile("mov X1, %0":"=r"(val));

Just want to understand why is this?


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