On 3/23/21 1:38 AM, Rena via Gcc-help wrote: > I'm building patches for a GameCube game, which sets r2 and r13 at > startup and never changes them. Is there any way to tell gcc to assume > these registers have specific values, so that it can optimize code > that references memory in the areas they point to? That depends on exactly what you mean. Does https://gcc.gnu.org/onlinedocs/gcc/Global-Register-Variables.html do what you want? -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671