- Timestamp:
- Dec 26, 2007, 7:44:05 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/compiler/X86/X8664/x8664-vinsns.lisp
r7896 r7936 524 524 (define-x8664-vinsn compare-to-nil (() 525 525 ((arg0 t))) 526 (cmp l (:$l x8664::nil-value) (:%larg0)))526 (cmpb (:$b x8664::fulltag-nil) (:%b arg0))) 527 527 528 528 … … 764 764 (define-x8664-vinsn extract-tag (((tag :u8)) 765 765 ((object :lisp))) 766 (mov zbl (:%bobject) (:%l tag))767 (and b (:$b x8664::tagmask) (:%btag)))766 (movl (:%l object) (:%l tag)) 767 (andl (:$b x8664::tagmask) (:%l tag))) 768 768 769 769 (define-x8664-vinsn extract-tag-fixnum (((tag :imm)) 770 770 ((object :lisp))) 771 (leal (:@ (:%q object) 8) (:%l tag)) 771 ((:pred = 772 (:apply %hard-regspec-value tag) 773 (:apply %hard-regspec-value object)) 774 (shll (:$ub x8664::fixnumshift) (:%l object))) 775 ((:not (:pred = 776 (:apply %hard-regspec-value tag) 777 (:apply %hard-regspec-value object))) 778 (imull (:$b x8664::fixnumone) (:%l object) (:%l tag))) 772 779 (andl (:$b (ash x8664::tagmask x8664::fixnumshift)) (:%l tag))) 773 780 774 781 (define-x8664-vinsn extract-fulltag (((tag :u8)) 775 782 ((object :lisp))) 776 (mov zbl (:%bobject) (:%l tag))777 (and b (:$b x8664::fulltagmask) (:%btag)))783 (movl (:%l object) (:%l tag)) 784 (andl (:$b x8664::fulltagmask) (:%l tag))) 778 785 779 786 (define-x8664-vinsn extract-fulltag-fixnum (((tag :imm)) 780 787 ((object :lisp))) 781 (leal (:@ (:%q object) 8) (:%l tag)) 788 ((:pred = 789 (:apply %hard-regspec-value tag) 790 (:apply %hard-regspec-value object)) 791 (shll (:$ub x8664::fixnumshift) (:%l object))) 792 ((:not (:pred = 793 (:apply %hard-regspec-value tag) 794 (:apply %hard-regspec-value object))) 795 (imull (:$b x8664::fixnumone) (:%l object) (:%l tag))) 782 796 (andl (:$b (ash x8664::fulltagmask x8664::fixnumshift)) (:%l tag))) 783 797 784 798 (define-x8664-vinsn extract-typecode (((tag :u32)) 785 799 ((object :lisp))) 786 (mov zbl (:%bobject) (:%l tag))787 (and b (:$b x8664::tagmask) (:%btag))788 (cmp b (:$b x8664::tag-misc) (:%btag))800 (movl (:%l object) (:%l tag)) 801 (andl (:$b x8664::tagmask) (:%l tag)) 802 (cmpl (:$b x8664::tag-misc) (:%l tag)) 789 803 (jne :have-tag) 790 804 (movzbl (:@ x8664::misc-subtag-offset (:%q object)) (:%l tag)) … … 800 814 (movzbl (:@ x8664::misc-subtag-offset (:%q object)) (:%l temp)) 801 815 :have-tag 802 ( leal (:@ (:%q temp) 8) (:%ltag)))816 (imulq (:$b x8664::fixnumone) (:%q temp) (:%q tag))) 803 817 804 818 … … 812 826 813 827 (define-x8664-vinsn cr-bit->boolean (((dest :lisp)) 814 ((crbit :u8const)) 815 ((temp :u32)))816 ( movl (:$l x8664::t-value) (:%l temp))817 (leaq (:@ (- x8664::t-offset) (:%q temp)) (:%q dest)) 818 (cmovccl (:$ub crbit) (:%l temp) (:%l dest))) 828 ((crbit :u8const))) 829 (movl (:$l x8664::nil-value) (:%l dest)) 830 (cmovccl (:$ub crbit) (:@ (+ x8664::t-offset x8664::symbol.vcell) (:%l dest)) (:%l dest))) 831 832 819 833 820 834 … … 1229 1243 (header (:u64 #.x8664::imm0)) 1230 1244 (entry (:label 1)))) 1231 (jno.pt :done) 1245 (jo :overflow) 1246 :done 1247 (:uuo-section) 1232 1248 ((:not (:pred = x8664::arg_z 1233 1249 (:apply %hard-regspec-value val))) 1250 :overflow 1234 1251 (movq (:%q val) (:%q x8664::arg_z))) 1235 1252 (:talign 4) 1253 ((:pred = x8664::arg_z 1254 (:apply %hard-regspec-value val)) 1255 :overflow) 1236 1256 (call (:@ .SPfix-overflow)) 1237 1257 (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn)) … … 1239 1259 (:apply %hard-regspec-value val))) 1240 1260 (movq (:%q x8664::arg_z) (:%q val))) 1241 :done)1261 (jmp :done)) 1242 1262 1243 1263 (define-x8664-vinsn (fix-fixnum-overflow-ool-and-branch :call) … … 1248 1268 (header (:u64 #.x8664::imm0)) 1249 1269 (entry (:label 1)))) 1250 (jno.pt lab) 1270 (jo :overflow) 1271 (jmp lab) 1272 (:uuo-section) 1251 1273 ((:not (:pred = x8664::arg_z 1252 1274 (:apply %hard-regspec-value val))) 1275 :overflow 1253 1276 (movq (:%q val) (:%q x8664::arg_z))) 1254 1277 (:talign 4) 1278 ((:pred = x8664::arg_z 1279 (:apply %hard-regspec-value val)) 1280 :overflow) 1255 1281 (call (:@ .SPfix-overflow)) 1256 1282 (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn)) … … 1771 1797 1772 1798 (defmacro define-x8664-subprim-jump-vinsn ((name &rest other-attrs) spno) 1773 `(define-x8664-vinsn (,name :jump :jumpLR ,@other-attrs) (() ())1799 `(define-x8664-vinsn (,name :jumpLR ,@other-attrs) (() ()) 1774 1800 (jmp (:@ ,spno)))) 1775 1801 … … 2914 2940 (movq (:%q object) (:%q tag)) 2915 2941 (je.pt :ok-if-non-negative) 2916 (and b (:$b x8664::fulltagmask) (:%btag))2917 (cmp b (:$b x8664::fulltag-misc) (:%btag))2918 (jne .pn:bad)2942 (andl (:$b x8664::fulltagmask) (:%l tag)) 2943 (cmpl (:$b x8664::fulltag-misc) (:%l tag)) 2944 (jne :bad) 2919 2945 (cmpq (:$l x8664::two-digit-bignum-header) (:@ x8664::misc-header-offset (:%q object))) 2920 2946 (je :two) … … 2947 2973 2948 2974 2949 2975 ;;; set DEST to 2950 2976 (define-x8664-vinsn mask-base-char (((dest :u8)) 2951 2977 ((src :lisp))) … … 3418 3444 ;;; really known, it should probably be inlined (stack-cleanup, value 3419 3445 ;;; transfer & jump ...) 3420 (define-x8664-vinsn (throw :jump :jump-unknown) (()3421 3422 3446 (define-x8664-vinsn (throw :jump-unknown) (() 3447 () 3448 ((entry (:label 1)))) 3423 3449 (leaq (:@ (:^ :back) (:%q x8664::fn)) (:%q x8664::ra0)) 3424 3450 (:talign 4) 3425 3451 (jmp (:@ .SPthrow)) 3426 3452 :back 3427 (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn))) 3453 (leaq (:@ (:^ entry) (:% x8664::rip)) (:%q x8664::fn)) 3454 (uuo-error-reg-not-tag (:%q x8664::temp0) (:$ub x8664::subtag-catch-frame))) 3428 3455 3429 3456
Note: See TracChangeset
for help on using the changeset viewer.