Changeset 13846
 Timestamp:
 Jun 16, 2010, 9:44:31 AM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/arm/level0/ARM/armfloat.lisp
r13805 r13846 30 30 ;;; no error checks, no tweaks, no nuthin 31 31 32 #+later 32 33 33 (defarmlapfunction %makefloatfromfixnums ((float 4)(hi 0) (lo arg_x) (exp arg_y) (sign arg_z)) 34 (rlwinm imm0 sign 0 0 0) ; just leave sign bit 35 (rlwimi imm0 exp ( 20 arm::fixnumshift) 1 11) ; exp left 20 right 2 keep 11 bits 34 (and imm0 sign (:$ #x80000000)) ; just leave sign bit 36 35 (ldr imm1 (:@ vsp (:$ hi))) 37 (srawi imm1 imm1 arm::fixnumshift) ; fold into below? nah keep for later 38 (rlwimi imm0 imm1 ( 32 4) 12 31) ; right 4  keep 20  stuff into hi result 39 (rlwinm imm1 imm1 28 0 3) ; hi goes left 28  keep 4 hi bits 40 (rlwimi imm1 lo ( 32 arm::fixnumshift) 4 31) ; stuff in 28 bits of lo 36 (orr imm0 imm0 (:lsl exp (:$ ( 20 arm::fixnumshift)))) ; exp left 20 right 2 keep 11 bits 37 (unboxfixnum imm1 imm1) 38 (orr imm0 imm0 (:lsr imm1 (:$ 4))) 39 (and imm1 imm1 (:$ #xf0000000)) 40 (orr imm1 imm1 (:lsr lo (:$ arm::fixnumshift))) 41 41 (ldr temp0 (:@ vsp (:$ float))) ; the float 42 (stw imm0 arm::doublefloat.value temp0) 43 (stw imm1 arm::doublefloat.vallow temp0) 44 (la vsp 8 vsp) 45 (blr)) 46 47 48 #+later 42 (str imm0 (:@ temp0 (:$ arm::doublefloat.valhigh))) 43 (str imm1 (:@ temp0 (:$ arm::doublefloat.vallow))) 44 (add vsp vsp '2) 45 (bx lr)) 46 47 49 48 (defarmlapfunction %makeshortfloatfromfixnums ((float 0) (sig arg_x) (exp arg_y) (sign arg_z)) 50 49 (unboxfixnum imm0 sig) 51 (rlwimi imm0 exp ( 29 8) 1 8) 52 (inslwi imm0 sign 1 0) 53 (vpop arg_z) 54 (stw imm0 arm::singlefloat.value arg_z) 55 (blr)) 50 (and imm1 sign (:$ #x800000000)) 51 (orr imm0 imm0 (:lsl exp (:$ ( 23 arm::fixnumshift)))) 52 (orr imm0 imm0 imm1) 53 (vpop1 arg_z) 54 (str imm0 (:@ arg_z (:$ arm::singlefloat.value))) 55 (bx lr)) 56 56 57 57
Note: See TracChangeset
for help on using the changeset viewer.