Changeset 9932
 Timestamp:
 Jul 10, 2008, 2:00:38 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/source/level0/PPC/ppchash.lisp
r1957 r9932 28 28 ;;; This should stay in LAP so that it's fast 29 29 ;;; Equivalent to cl:mod when both args are positive fixnums 30 #+ppc32target31 30 (defppclapfunction fastmod ((number arg_y) (divisor arg_z)) 32 (divwu imm0 number divisor) 33 (mullw arg_z imm0 divisor) 31 #+ppc32target 32 (progn 33 (divwu imm0 number divisor) 34 (mullw arg_z imm0 divisor)) 35 #+ppc64target 36 (progn 37 (divdu imm0 number divisor) 38 (mulld arg_z imm0 divisor)) 34 39 (subf arg_z arg_z number) 35 40 (blr)) 36 41 37 #+ppc64target 38 (defppclapfunction fastmod ((number arg_y) (divisor arg_z)) 39 (divdu imm0 number divisor) 40 (mulld arg_z imm0 divisor) 41 (subf arg_z arg_z number) 42 43 (defppclapfunction fastmod3 ((number arg_x) (divisor arg_y) (recip arg_z)) 44 (unboxfixnum imm0 number) 45 #+ppc32target 46 (progn 47 (mulhw imm1 imm0 recip) 48 (mullw imm0 imm1 divisor)) 49 #+ppc64target 50 (progn 51 (mulhd imm1 imm0 recip) 52 (mulld imm0 imm1 divisor)) 53 (sub number number imm0) 54 (sub number number divisor) 55 (srari imm0 number (1 target::nbitsinword)) 56 (and divisor divisor imm0) 57 (add arg_z number divisor) 42 58 (blr)) 43 59
Note: See TracChangeset
for help on using the changeset viewer.