Files
jak-project/test/old_goal_tests/tests/test-asm-func.gc
T
2020-08-22 22:32:18 -04:00

19 lines
441 B
Plaintext

(test-setup 1234567 #f)
(defun test-asm-function ()
;; enable asm-func mode (DANGER)
(declare (asm-func))
;; now we have no prologue/epilogue.
;; most operations involving variables are unsafe.
;; create a "safe" variable which is the rax register
(rlet ((ret :reg rax :type integer))
;; set to a numeric constant
(set! ret 1234567)
)
;; and do a return manually
(.ret)
)
(test-asm-function)