boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

riscv64-load-ptr-zext.after (674B)


      1             } else if (bt == VT_LLONG || bt == VT_PTR || bt == VT_FUNC) {
      2                 /* A 32bit unsigned constant being loaded into a 64-bit
      3                    type slot (long long, pointer, or function pointer).
      4                    `lui` always sign-extends bits 63:32, so for any value
      5                    with bit 31 set (e.g. seed-kernel ARCH_KERNEL_HEAP_END
      6                    = 0x8b000000UL cast to u8*) the upper bits would come
      7                    out as 0xffffffff.  Stock tcc 0.9.26 only handles the
      8                    VT_LLONG case here; widen the check to cover pointers
      9                    and function pointers too. */
     10                 zext = 1;
     11             }