On 8/1/23 7:20 AM, Jan Beulich wrote: > On 28.07.2023 23:35, Shawn Anastasio wrote: >> @@ -11,16 +13,19 @@ ENTRY(start) >> FIXUP_ENDIAN >> >> /* set up the TOC pointer */ >> - LOAD_IMM32(%r2, .TOC.) >> + bcl 20, 31, .+4 >> +1: mflr %r12 >> + addis %r2, %r12, .TOC.-1b@ha >> + addi %r2, %r2, .TOC.-1b@l >> >> /* set up the initial stack */ >> - LOAD_IMM32(%r1, cpu0_boot_stack) >> + LOAD_REG_ADDR(%r1, cpu0_boot_stack) > > Question: Would perhaps make sense to use %sp and %rtoc in place of > %r1 and %r2 (not just here of course)?
In my opinion, usage of the aliased register names ends up making the code less clear.