]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
x86-64: Return 10_REG if there is no scratch register
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 6 Feb 2024 18:57:24 +0000 (10:57 -0800)
committerH.J. Lu <(no_default)>
Tue, 6 Feb 2024 19:02:44 +0000 (11:02 -0800)
If we can't find a scratch register for large model profiling, return
R10_REG.

PR target/113689
* config/i386/i386.cc (x86_64_select_profile_regnum): Return
R10_REG after sorry.

gcc/config/i386/i386.cc

index f02c6c02ac629bbd09acaadc460d80ffebbdb7eb..10bd5347dcffab9016895835556920a05d19f7df 100644 (file)
@@ -22788,7 +22788,7 @@ x86_64_select_profile_regnum (bool r11_ok ATTRIBUTE_UNUSED)
   sorry ("no register available for profiling %<-mcmodel=large%s%>",
         ix86_cmodel == CM_LARGE_PIC ? " -fPIC" : "");
 
-  return INVALID_REGNUM;
+  return R10_REG;
 }
 
 /* Output assembler code to FILE to increment profiler label # LABELNO