Changeset 13885 for branches/rmelogops
 Timestamp:
 Jun 24, 2010, 11:48:25 PM (9 years ago)
 Location:
 branches/rmelogops/compiler
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

branches/rmelogops/compiler/nx0.lisp
r13876 r13885 589 589 int))) 590 590 591 (defun acodenaturalconstantp (x) 592 (let* ((int (or (acodefixnumformp x) 593 (progn 594 (setq x (acodeunwrappedform x)) 595 (if (acodep x) 596 (if (and (eq (acodeoperator x) (%nx1operator immediate)) 597 (typep (cadr x) 'fixnum)) 598 (cadr x))))))) 599 (and int 600 (targetwordsizecase 601 (32 (typep int '(unsignedbyte 32))) 602 (64 (typep int '(unsignedbyte 64)))) 603 int))) 604 605 606 591 607 (defun acoderealconstantp (x) 592 608 (or (acodefixnumformp x) … … 692 708 (defun nxacodefixnumtypep (form env) 693 709 (acodefixnumtypep form (nxtrustdeclarations env))) 710 711 (defun acodenaturaltypep (form trustdecls) 712 (and trustdecls 713 (acodep form) 714 (eq (acodeoperator form) (%nx1operator typedform)) 715 (subtypep (cadr form) (targetwordsizecase 716 (32 '(unsignedbyte 32)) 717 (64 '(unsignedbyte 64)))))) 718 719 (defun nxacodenaturaltypep (form env) 720 (acodenaturaltypep form (nxtrustdeclarations env))) 694 721 695 722 ; Is acodeexpression the result of alphatizing (%inttoptr <integer>) ? … … 2791 2818 (t 2792 2819 (makeacode (%nx1operator logand2) form1 form2))))) 2793 2820 2821 (defun nxlogior2op (arg1 arg2 env) 2822 (let* ((form1 (nx1form arg1)) 2823 (form2 (nx1form arg2)) 2824 (fix1 (nxacodefixnumtypep form1 env)) 2825 (fix2 (nxacodefixnumtypep form2 env)) 2826 (nat1 (or (acodenaturalconstantp form1) 2827 (nxacodenaturaltypep form1 env))) 2828 (nat2 (or (acodenaturalconstantp form2) 2829 (nxacodenaturaltypep form2 env)))) 2830 (cond 2831 ((and fix1 fix2) 2832 (makeacode (%nx1operator %ilogior2) form1 form2)) 2833 ((and nat1 nat2) 2834 (makeacode (%nx1operator typedform) 2835 (targetwordsizecase 2836 (32 '(unsignedbyte 32)) 2837 (64 '(unsignedbyte 64))) 2838 (makeacode (%nx1operator %naturallogior) form1 form2))) 2839 (t 2840 (makeacode (%nx1operator logior2) form1 form2))))) 2794 2841 2795 2842 (defun nxbinarybooleop (whole env arg1 arg2 fixop intop naturalop) 
branches/rmelogops/compiler/nx1.lisp
r13876 r13885 450 450 (nx1form newvalue))) 451 451 452 (defnx1 nx1logior2 ((logior2)) (&whole w &environment env arg1 arg2) 453 (nxbinarybooleop w 454 env 455 arg1 456 arg2 457 (%nx1operator %ilogior2) 458 (%nx1operator logior2) 459 (%nx1operator %naturallogior))) 452 (defnx1 nx1logior2 ((logior2)) (&environment env arg1 arg2) 453 (nxlogior2op arg1 arg2 env)) 460 454 461 455 (defnx1 nx1logxor2 ((logxor2)) (&whole w &environment env arg1 arg2) … … 470 464 (defnx1 nx1logand2 ((logand2)) (&environment env arg1 arg2) 471 465 (nxlogand2op arg1 arg2 env)) 472 473 #+notanymore474 (defnx1 nx1logand2 ((logand2)) (&whole w &environment env arg1 arg2)475 (nxbinarybooleop w476 env477 arg1478 arg2479 (%nx1operator %ilogand2)480 (%nx1operator logand2)481 (%nx1operator %naturallogand)))482 466 483 467 (defnx1 nx1require ((requiresimplevector)
Note: See TracChangeset
for help on using the changeset viewer.