public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: Return 10_REG if there is no scratch register
@ 2024-02-06 18:57 H.J. Lu
  2024-02-06 18:59 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2024-02-06 18:57 UTC (permalink / raw)
  To: gcc-patches

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index f02c6c02ac6..10bd5347dcf 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -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
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86-64: Return 10_REG if there is no scratch register
  2024-02-06 18:57 [PATCH] x86-64: Return 10_REG if there is no scratch register H.J. Lu
@ 2024-02-06 18:59 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2024-02-06 18:59 UTC (permalink / raw)
  To: H.J. Lu; +Cc: gcc-patches

On Tue, Feb 06, 2024 at 10:57:24AM -0800, H.J. Lu wrote:
> 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.

Ok, thanks.

	Jakub


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-06 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 18:57 [PATCH] x86-64: Return 10_REG if there is no scratch register H.J. Lu
2024-02-06 18:59 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).