boot2

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

__set_thread_area.s (350B)


      1 /* tcc-build riscv64 __set_thread_area.
      2  *
      3  * Replaces upstream's three-line stub which uses the `ret` pseudo
      4  * tcc-asm doesn't recognize. Behaviorally identical: copy a0 into the
      5  * thread-pointer register tp, return 0.
      6  */
      7 
      8 	.global __set_thread_area
      9 	.type   __set_thread_area, %function
     10 __set_thread_area:
     11 	mv tp, a0
     12 	li a0, 0
     13 	jalr zero, ra, 0