Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
On Fri, Feb 2, 2024 at 4:07 AM wrote: > > On 2 February 2024 00:02:54 CET, "H.J. Lu" wrote: > >On Thu, Feb 1, 2024 at 10:32 AM Jakub Jelinek wrote: > >> > >> On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: > >> > --- a/gcc/config/i386/i386.cc > >> > +++ b/gcc/config/i386/i386.cc > >> >

Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread rep . dot . nop
On 2 February 2024 00:02:54 CET, "H.J. Lu" wrote: >On Thu, Feb 1, 2024 at 10:32 AM Jakub Jelinek wrote: >> >> On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: >> > --- a/gcc/config/i386/i386.cc >> > +++ b/gcc/config/i386/i386.cc >> > @@ -22749,6 +22749,31 @@ current_fentry_section (const

Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-01 Thread H.J. Lu
On Thu, Feb 1, 2024 at 10:32 AM Jakub Jelinek wrote: > > On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: > > --- a/gcc/config/i386/i386.cc > > +++ b/gcc/config/i386/i386.cc > > @@ -22749,6 +22749,31 @@ current_fentry_section (const char **name) > >return true; > > } > > > > +/* Retur

Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -22749,6 +22749,31 @@ current_fentry_section (const char **name) >return true; > } > > +/* Return an unused caller-saved register at entry for profile. */ > + > +sta

[PATCH] x86-64: Find a scratch register for large model profiling

2024-02-01 Thread H.J. Lu
2 scratch registers, %r10 and %r11, are available at function entry for large model profiling. But %r10 may be used by stack realignment and we can't use %r10 in this case. Add x86_64_select_profile_regnum to find a scratch register for large model profiling and sorry if we can't find one. gcc/