[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is there a declaration that will allow an inlined multiply?
- To: email@example.com
- Subject: Is there a declaration that will allow an inlined multiply?
- From: firstname.lastname@example.org (Rob Browning)
- Date: Sat, 4 Mar 1995 15:27:41 -0600
- Sender: email@example.com
No matter how many declarations I apply to the following function, I can't
get it to inline multiplication. Is that just impossible? I don't want to
have to resort to c++.
(defun sqr (x)
(declare (optimize (speed 3) (space 0)
(safety 0) (debug 0)
(declare (type (unsigned-byte 16) x)) (declare (inline *))
(the (unsigned-byte 16)
(* (the (unsigned-byte 16) x)
(the (unsigned-byte 16) x))))
? (disassemble #'sqr)
0 (SPUSH VSP)
2 (VPUSH D0)
4 (MOVE.L @VSP D0)
6 (MOVE.L @VSP D1)
8 (SPOP VSP)
10 (JMP_SUBPRIM $SP-TIMES2)