Changeset 7349


Ignore:
Timestamp:
Oct 4, 2007, 5:09:19 PM (12 years ago)
Author:
rme
Message:

x8632 BOOLE operations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-0/X86/X8632/x8632-array.lisp

    r7332 r7349  
    44  (require "X8632-ARCH")
    55  (require "X86-LAPMACROS"))
     6
     7;;; argument is a vector header or an array header.  Or else.
     8(defx86lapfunction %array-header-data-and-offset ((a arg_z))
     9  (let ((offset arg_y)
     10        (temp temp1))
     11    (movl (% esp) (% temp0))
     12    (movl ($ '0) (%l offset))
     13    (movl (% a) (% temp))
     14    @loop
     15    (movl (@ target::arrayH.data-vector (% temp)) (% a))
     16    (extract-subtag a imm0)
     17    (addl (@ target::arrayH.displacement (% temp)) (% offset))
     18    (rcmp (% imm0) ($ target::subtag-vectorH))
     19    (movl (% a) (% temp))
     20    (jle @loop)
     21    (push (% a))
     22    (push (% offset))
     23    (set-nargs 2)
     24    (jmp-subprim  .SPvalues)))
     25
     26(defx86lapfunction %boole-clr ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     27  (movl (@ idx (% esp)) (% temp0))
     28  (movl ($ 0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     29  (single-value-return 4))
     30
     31(defx86lapfunction %boole-set ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     32  (movl (@ idx (% esp)) (% temp0))
     33  (movl ($ -1) (@ x8632::misc-data-offset (% dest) (% temp0)))
     34  (single-value-return 4))
     35
     36(defx86lapfunction %boole-1 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     37  (movl (@ idx (% esp)) (% temp0))
     38  (movl (@ b0 (% esp)) (% temp1))
     39  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     40  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     41  (single-value-return 4))
     42
     43(defx86lapfunction %boole-2 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     44  (movl (@ idx (% esp)) (% temp0))
     45  (movl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     46  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     47  (single-value-return 4))
     48
     49(defx86lapfunction %boole-c1 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     50  (movl (@ idx (% esp)) (% temp0))
     51  (movl (@ b0 (% esp)) (% temp1))
     52  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     53  (notl (% imm0))
     54  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     55  (single-value-return 4))
     56
     57(defx86lapfunction %boole-c2 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     58  (movl (@ idx (% esp)) (% temp0))
     59  (movl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     60  (notl (% imm0))
     61  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     62  (single-value-return 4))
     63
     64(defx86lapfunction %boole-and ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     65  (movl (@ idx (% esp)) (% temp0))
     66  (movl (@ b0 (% esp)) (% temp1))
     67  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     68  (andl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     69  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     70  (single-value-return 4))
     71
     72(defx86lapfunction %boole-ior ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     73  (movl (@ idx (% esp)) (% temp0))
     74  (movl (@ b0 (% esp)) (% temp1))
     75  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     76  (orl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     77  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     78  (single-value-return 4))
     79
     80(defx86lapfunction %boole-xor ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     81  (movl (@ idx (% esp)) (% temp0))
     82  (movl (@ b0 (% esp)) (% temp1))
     83  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     84  (xorl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     85  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     86  (single-value-return 4))
     87
     88(defx86lapfunction %boole-eqv ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     89  (movl (@ idx (% esp)) (% temp0))
     90  (movl (@ b0 (% esp)) (% temp1))
     91  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     92  (xorl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     93  (notl (% imm0))
     94  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     95  (single-value-return 4))
     96
     97(defx86lapfunction %boole-nand ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     98  (movl (@ idx (% esp)) (% temp0))
     99  (movl (@ b0 (% esp)) (% temp1))
     100  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     101  (andl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     102  (notl (% imm0))
     103  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     104  (single-value-return 4))
     105
     106(defx86lapfunction %boole-nor ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     107  (movl (@ idx (% esp)) (% temp0))
     108  (movl (@ b0 (% esp)) (% temp1))
     109  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     110  (orl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     111  (notl (% imm0))
     112  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     113  (single-value-return 4))
     114
     115(defx86lapfunction %boole-andc1 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     116  (movl (@ idx (% esp)) (% temp0))
     117  (movl (@ b0 (% esp)) (% temp1))
     118  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     119  (notl (% imm0))
     120  (andl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     121  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     122  (single-value-return 4))
     123
     124(defx86lapfunction %boole-andc2 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     125  (movl (@ idx (% esp)) (% temp0))
     126  (movl (@ b0 (% esp)) (% temp1))
     127  (movl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     128  (notl (% imm0))
     129  (andl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     130  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     131  (single-value-return 4))
     132
     133(defx86lapfunction %boole-orc1 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     134  (movl (@ idx (% esp)) (% temp0))
     135  (movl (@ b0 (% esp)) (% temp1))
     136  (movl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     137  (notl (% imm0))
     138  (orl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     139  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     140  (single-value-return 4))
     141
     142(defx86lapfunction %boole-orc2 ((idx 8) (b0 4) #|(ra 0)|# (b1 arg_y) (dest arg_z))
     143  (movl (@ idx (% esp)) (% temp0))
     144  (movl (@ b0 (% esp)) (% temp1))
     145  (movl (@ x8632::misc-data-offset (% b1) (% temp0)) (% imm0))
     146  (notl (% imm0))
     147  (orl (@ x8632::misc-data-offset (% temp1) (% temp0)) (% imm0))
     148  (movl (% imm0) (@ x8632::misc-data-offset (% dest) (% temp0)))
     149  (single-value-return 4))
    6150
    7151;;; placeholders for future specialized versions
Note: See TracChangeset for help on using the changeset viewer.