6 ms·
Here's the times13 function in CCL on x86-64. (Note that #x68 is 13 shifted left 3 times to allow tag bits in the LS 3 bit positions. Also the below could be op
by dreamcompiler 7y ago
Here's the times13 function in CCL on x86-64. (Note that #x68 is 13 shifted left 3 times to allow tag bits in the LS 3 bit positions. Also the below could be optimized a lot more but this is the default compilation.)
? (defun times13 (x) (* 13 x))
TIMES13
? (disassemble 'times13)
;;; (defun times13 (x) (* 13 x))
(recover-fn-from-rip) ; [0]
(cmpl ($ 8) (% nargs)) ; [7]
(jne L41) ; [10]
(pushq (% rbp)) ; [12]
(movq (% rsp) (% rbp)) ; [13]
(pushq (% arg_z)) ; [16]
;;; (* 13 x)
(movl ($ #x68) (% arg_y.l)) ; [17]
(movq (@ -8 (% rbp)) (% arg_z)) ; [22]
(movq (% rbp) (% rsp)) ; [26]
(popq (% rbp)) ; [29]
(jmp (@ .SPBUILTIN-TIMES)) ; [30]
;;; #<no source text>
(:align 3)
L41 ; [@56]
(uuo-error-wrong-number-of-args) ; [41]
NIL