Changeset 14739
- Timestamp:
- Apr 27, 2011, 3:52:12 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/source/compiler/ARM/arm2.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/compiler/ARM/arm2.lisp
r14695 r14739 5702 5702 5703 5703 (defarm2 arm2-numcmp numcmp (seg vreg xfer cc form1 form2) 5704 (let* ((name (ecase (cadr cc) 5705 (:eq '=-2) 5706 (:ne '/=-2) 5707 (:lt '<-2) 5708 (:le '<=-2) 5709 (:gt '>-2) 5710 (:ge '>=-2)))) 5711 (if (or (arm2-explicit-non-fixnum-type-p form1) 5712 (arm2-explicit-non-fixnum-type-p form2)) 5713 (arm2-binary-builtin seg vreg xfer name form1 form2) 5714 (arm2-inline-numcmp seg vreg xfer cc name form1 form2)))) 5704 (or (acode-optimize-numcmp seg vreg xfer cc form1 form2 *arm2-trust-declarations*) 5705 (let* ((name (ecase (cadr cc) 5706 (:eq '=-2) 5707 (:ne '/=-2) 5708 (:lt '<-2) 5709 (:le '<=-2) 5710 (:gt '>-2) 5711 (:ge '>=-2)))) 5712 (if (or (arm2-explicit-non-fixnum-type-p form1) 5713 (arm2-explicit-non-fixnum-type-p form2)) 5714 (arm2-binary-builtin seg vreg xfer name form1 form2) 5715 (arm2-inline-numcmp seg vreg xfer cc name form1 form2))))) 5715 5716 5716 5717 (defun arm2-inline-numcmp (seg vreg xfer cc name form1 form2) … … 6209 6210 6210 6211 (defarm2 arm2-add2 add2 (seg vreg xfer form1 form2) 6211 (multiple-value-bind (form1 form2) 6212 (nx-binop-numeric-contagion form1 form2 *arm2-trust-declarations*) 6213 (if (and (arm2-form-typep form1 'double-float) 6214 (arm2-form-typep form2 'double-float)) 6215 (arm2-use-operator (%nx1-operator %double-float+-2) 6216 seg 6217 vreg 6218 xfer 6219 form1 6220 form2) 6221 (if (and (arm2-form-typep form1 'single-float) 6222 (arm2-form-typep form2 'single-float)) 6223 (arm2-use-operator (%nx1-operator %short-float+-2) 6224 seg 6225 vreg 6226 xfer 6227 form1 6228 form2) 6229 (if (and (arm2-form-typep form1 'fixnum) 6230 (arm2-form-typep form2 'fixnum)) 6231 (arm2-use-operator (%nx1-operator %i+) 6232 seg 6233 vreg 6234 xfer 6235 form1 6236 form2 6237 t) 6238 (if (or (arm2-explicit-non-fixnum-type-p form1) 6239 (arm2-explicit-non-fixnum-type-p form2)) 6240 (arm2-binary-builtin seg vreg xfer '+-2 form1 form2) 6241 (arm2-inline-add2 seg vreg xfer form1 form2))))))) 6212 (or (acode-optimize-add2 seg vreg xfer form1 form2 *arm2-trust-declarations*) 6213 (if (or (arm2-explicit-non-fixnum-type-p form1) 6214 (arm2-explicit-non-fixnum-type-p form2)) 6215 (arm2-binary-builtin seg vreg xfer '+-2 form1 form2) 6216 (arm2-inline-add2 seg vreg xfer form1 form2)))) 6242 6217 6243 6218 (defarm2 arm2-sub2 sub2 (seg vreg xfer form1 form2) 6244 (multiple-value-bind (form1 form2) 6245 (nx-binop-numeric-contagion form1 form2 *arm2-trust-declarations*) 6246 (if (and (arm2-form-typep form1 'double-float) 6247 (arm2-form-typep form2 'double-float)) 6248 (arm2-use-operator (%nx1-operator %double-float--2) 6249 seg 6250 vreg 6251 xfer 6252 form1 6253 form2) 6254 (if (and (arm2-form-typep form1 'single-float) 6255 (arm2-form-typep form2 'single-float)) 6256 (arm2-use-operator (%nx1-operator %short-float--2) 6257 seg 6258 vreg 6259 xfer 6260 form1 6261 form2) 6262 (if (and (arm2-form-typep form1 'fixnum) 6263 (arm2-form-typep form2 'fixnum)) 6264 (arm2-use-operator (%nx1-operator %i-) 6265 seg 6266 vreg 6267 xfer 6268 form1 6269 form2 6270 t) 6271 (if (or (arm2-explicit-non-fixnum-type-p form1) 6272 (arm2-explicit-non-fixnum-type-p form2)) 6273 (arm2-binary-builtin seg vreg xfer '--2 form1 form2) 6274 (arm2-inline-sub2 seg vreg xfer form1 form2))))))) 6219 (or (acode-optimize-sub2 seg vreg xfer form1 form2 *arm2-trust-declarations*) 6220 (if (or (arm2-explicit-non-fixnum-type-p form1) 6221 (arm2-explicit-non-fixnum-type-p form2)) 6222 (arm2-binary-builtin seg vreg xfer '--2 form1 form2) 6223 (arm2-inline-sub2 seg vreg xfer form1 form2)))) 6275 6224 6276 6225 (defarm2 arm2-mul2 mul2 (seg vreg xfer form1 form2) 6277 (multiple-value-bind (form1 form2) 6278 (nx-binop-numeric-contagion form1 form2 *arm2-trust-declarations*) 6279 (if (and (arm2-form-typep form1 'double-float) 6280 (arm2-form-typep form2 'double-float)) 6281 (arm2-use-operator (%nx1-operator %double-float*-2) 6282 seg 6283 vreg 6284 xfer 6285 form1 6286 form2) 6287 (if (and (arm2-form-typep form1 'single-float) 6288 (arm2-form-typep form2 'single-float)) 6289 (arm2-use-operator (%nx1-operator %short-float*-2) 6290 seg 6291 vreg 6292 xfer 6293 form1 6294 form2) 6295 (arm2-binary-builtin seg vreg xfer '*-2 form1 form2))))) 6226 (or (acode-optimize-mul2 seg vreg xfer form1 form2 *arm2-trust-declarations*) 6227 (arm2-binary-builtin seg vreg xfer '*-2 form1 form2))) 6296 6228 6297 6229 6298 6230 (defarm2 arm2-div2 div2 (seg vreg xfer form1 form2) 6299 (multiple-value-bind (form1 form2) 6300 (nx-binop-numeric-contagion form1 form2 *arm2-trust-declarations*) 6301 (if (and (arm2-form-typep form1 'double-float) 6302 (arm2-form-typep form2 'double-float)) 6303 (arm2-use-operator (%nx1-operator %double-float/-2) 6304 seg 6305 vreg 6306 xfer 6307 form1 6308 form2) 6309 (if (and (arm2-form-typep form1 'single-float) 6310 (arm2-form-typep form2 'single-float)) 6311 (arm2-use-operator (%nx1-operator %short-float/-2) 6312 seg 6313 vreg 6314 xfer 6315 form1 6316 form2) 6317 (let* ((f2 (acode-fixnum-form-p form2)) 6318 (unwrapped (acode-unwrapped-form form1)) 6319 (f1 nil) 6320 (f1/f2 nil)) 6321 (if (and f2 6322 (not (zerop f2)) 6323 (acode-p unwrapped) 6324 (or (eq (acode-operator unwrapped) (%nx1-operator mul2)) 6325 (eq (acode-operator unwrapped) (%nx1-operator %i*))) 6326 (setq f1 (acode-fixnum-form-p (cadr unwrapped))) 6327 (typep (setq f1/f2 (/ f1 f2)) 'fixnum)) 6328 (arm2-use-operator (%nx1-operator mul2) 6329 seg 6330 vreg 6331 xfer 6332 (make-acode (%nx1-operator fixnum) f1/f2) 6333 (caddr unwrapped)) 6334 (arm2-binary-builtin seg vreg xfer '/-2 form1 form2))))))) 6231 (or (acode-optimize-div2 seg vreg xfer form1 form2 *arm2-trust-declarations*) 6232 (arm2-binary-builtin seg vreg xfer '/-2 form1 form2))) 6335 6233 6336 6234 (defarm2 arm2-logbitp logbitp (seg vreg xfer bitnum int) … … 6834 6732 (t 6835 6733 (let* ((fixoffset (acode-fixnum-form-p offset))) 6836 (if (typep fixoffset '(unsigned-byte 15)) 6734 (if (and (typep fixoffset '(signed-byte 12)) 6735 (eql (logcount fixoffset) 1)) 6837 6736 (with-imm-target () (ptrreg :address) 6838 6737 (arm2-form seg ptrreg nil ptr)
Note:
See TracChangeset
for help on using the changeset viewer.
