Re: Use of register keyword for Globals

2025-05-23 Thread Joel Sherrill via Gcc
On Fri, May 23, 2025 at 12:33 PM Richard Biener wrote: > > > Am 23.05.2025 um 18:32 schrieb Joel Sherrill : > >  > > > On Fri, May 23, 2025 at 10:12 AM Richard Biener < > richard.guent...@gmail.com> wrote: > >> >> >> > Am 23.05.2025 um 17:06 schrieb Joel Sherrill via Gcc : >> > >> > Hi >> > >>

Re: Use of register keyword for Globals

2025-05-23 Thread Joel Sherrill via Gcc
On Fri, May 23, 2025 at 10:12 AM Richard Biener wrote: > > > > Am 23.05.2025 um 17:06 schrieb Joel Sherrill via Gcc : > > > > Hi > > > > In the SPARC port of RTEMS, there is a global variable assigned to a > > register for performance reasons. This is the near decade old line of > code: > > > >

Re: Use of register keyword for Globals

2025-05-23 Thread LIU Hao via Gcc
在 2025-5-23 23:03, Joel Sherrill via Gcc 写道: Hi In the SPARC port of RTEMS, there is a global variable assigned to a register for performance reasons. This is the near decade old line of code: register struct Per_CPU_Control *_SPARC_Per_CPU_current __asm__( "g6" ); +1 for this. On ARM64, Win

Re: Use of register keyword for Globals

2025-05-23 Thread Richard Biener via Gcc
> Am 23.05.2025 um 17:06 schrieb Joel Sherrill via Gcc : > > Hi > > In the SPARC port of RTEMS, there is a global variable assigned to a > register for performance reasons. This is the near decade old line of code: > > register struct Per_CPU_Control *_SPARC_Per_CPU_current __asm__( "g6" );

Use of register keyword for Globals

2025-05-23 Thread Joel Sherrill via Gcc
Hi In the SPARC port of RTEMS, there is a global variable assigned to a register for performance reasons. This is the near decade old line of code: register struct Per_CPU_Control *_SPARC_Per_CPU_current __asm__( "g6" ); Per https://gcc.gnu.org/onlinedocs/gcc/Global-Register-Variables.html, this