boot2

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

001-return-imm.scm (301B)


      1 ;; tests/cc-cg/01-return-imm.scm — function returning a non-zero immediate.
      2 ;; Verifies cg-push-imm carries the literal value through to %li.
      3 
      4 (let ((cg (cg-init)))
      5   (cg-fn-begin cg "main" '() %t-i32)
      6   (cg-push-imm cg %t-i32 42)
      7   (cg-return cg)
      8   (cg-fn-end cg)
      9   (write-bv-fd 1 (cg-finish cg)))