[Bug inline-asm/91111] [7/8 Regression] arm64 Linux kernel panics at boot due to unexpected register assignment in inline asm

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 3 10:41:00 GMT 2019


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If you are looking for a workaround, perhaps replacing
  register long x0 asm ("x0") = (long)v;
with
  register long x0 asm ("x0");
  asm ("" : "=r" (x0) : "0" (v));
(i.e. affectively hiding from the compiler that x0 is set to v) will do the
job.


More information about the Gcc-bugs mailing list