boot2

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

riscv64-cvt-int-zext.before (701B)


      1                 if ((sbt & VT_BTYPE) != VT_LLONG &&
      2                     (sbt & VT_BTYPE) != VT_PTR &&
      3                     (sbt & VT_BTYPE) != VT_FUNC) {
      4                     /* need to convert from 32bit to 64bit */
      5                     gv(RC_INT);
      6                     if (sbt != (VT_INT | VT_UNSIGNED)) {
      7 #if defined(TCC_TARGET_ARM64) || defined(TCC_TARGET_RISCV64)
      8                         gen_cvt_sxtw();
      9 #elif defined(TCC_TARGET_X86_64)
     10                         int r = gv(RC_INT);
     11                         /* x86_64 specific: movslq */
     12                         o(0x6348);
     13                         o(0xc0 + (REG_VALUE(r) << 3) + REG_VALUE(r));
     14 #else
     15 #error
     16 #endif
     17                     }
     18                 }