/[movitz]/ia-x86/instr-simd.lisp
ViewVC logotype

Contents of /ia-x86/instr-simd.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Fri Jan 16 11:54:14 2004 UTC (10 years, 3 months ago) by ffjeld
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Removed non-ASCII characters.
1 ;;;;------------------------------------------------------------------
2 ;;;;
3 ;;;; Copyright (C) 2000,
4 ;;;; Department of Computer Science, University of Tromso, Norway
5 ;;;;
6 ;;;; Filename: ia-x86-instr-simd.lisp
7 ;;;; Description: Streaming SIMD instructions.
8 ;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
9 ;;;; Created at: Thu Aug 3 18:15:02 2000
10 ;;;; Distribution: See the accompanying file COPYING.
11 ;;;;
12 ;;;; $Id: instr-simd.lisp,v 1.2 2004/01/16 11:54:14 ffjeld Exp $
13 ;;;;
14 ;;;;------------------------------------------------------------------
15
16 (in-package #:ia-x86-instr)
17
18 (def-instr simd (instruction))
19
20
21 ;;; Packed Single-FP Add
22 (def-instr addps (simd) (:r #x0f58 (xmm/m128 xmm) :not-prefixes (repz)))
23
24 ;;; Scalar Single-FP Add
25 (def-instr addss (simd) (:r #x0f58 (xmm/m32 xmm) :req-prefixes (repz)))
26
27 ;;; Bit-wise Logical And Not for Single-FP
28 (def-instr andnps (simd) (:r #x0f55 (xmm/m128 xmm)))
29
30 ;;; Bit-wise Logical And for Single-FP
31 (def-instr andps (simd) (:r #x0f54 (xmm/m128 xmm)))
32
33 ;;; Packed Single-FP Compare
34 ; this is one fucked up instruction!
35 (def-instr cmpps (simd) (:r-imm #x0fc2 1 (imm8 xmm/m128 xmm) :not-prefixes (repz)))
36
37 ;;; Scalar Single-FP Compare
38 (def-instr cmpss (simd) (:r-imm #x0fc2 1 (imm8 xmm/m128 xmm) :req-prefixes (repz)))
39
40 ;;; Scalar Ordered Single-FP Comare and set EFLAGS
41 (def-instr comiss (simd) (:r #x0f2f (xmm/m32 xmm)))
42
43 ;;; Packed Signed INT32 to Packed Single-FP Conversion
44 (def-instr cvtpi2ps (simd) (:r #x0f2a (xmm/m64 xmm) :not-prefixes (repz)))
45
46 ;;; Scalar signed INT32 to Single-FP Conversion
47 (def-instr cvtsi2ss (simd) (:r #x0f2a (r/m32 xmm) :req-prefixes (repz)))
48
49 ;;; Packed Single-FP to Packed INT32 Conversion
50 (def-instr cvtps2pi (simd) (:r #x0f2d (xmm/m64 xmm) :not-prefixes (repz)))
51
52 ;;; Scalar Single-FP to Signed INT32 Conversion
53 (def-instr cvtss2si (simd) (:r #x0f2d (xmm/m32 r32) :req-prefixes (repz)))
54
55 ;;; Packed Single-FP to Packed INT32 Conversion (truncate)
56 (def-instr cvttps2pi (simd) (:r #x0f2c (xmm/m64 mm) :not-prefixes (repz)))
57
58 ;;; Scalar Single-FP to signed INT32 Conversion (truncate)
59 (def-instr cvttss2si (simd) (:r #x0f2c (xmm/m32 r32) :req-prefixes (repz)))
60
61 ;;; Packed Single-FP Divide
62 (def-instr divps (simd) (:r #x0f5e (xmm/m128 xmm) :not-prefixes (repz)))
63
64 ;;; Scalar Single-FP Divide
65 (def-instr divss (simd) (:r #x0f5e (xmm/m32 xmm) :req-prefixes (repz)))
66
67 ;;; Restore FP and MMX state and Streaming SIMD Extension State
68 (def-instr fxrstor (simd) (:digit (#x0fae 1) 0 (m) :indirect t))
69
70 ;;; Store FP and MMX State and Streaming SIMD Extension State
71 (def-instr fxsave (simd) (:digit (#x0fae 0) 0 (m) :indirect t))
72
73 ;;; Load Streaming SIMD Extension Control/Status
74 (def-instr ldmxcsr (simd) (:digit (#x0fae 2) 0 (m) :indirect t))
75
76 ;;; Packed Single-FP Maximum
77 (def-instr maxps (simd) (:r #x0f5f (xmm/m128 xmm) :not-prefixes (repz)))
78
79 ;;; Scalar Single-FP Maximum
80 (def-instr maxss (simd) (:r #x0f5f (xmm/m32 xmm) :req-prefixes (repz)))
81
82 ;;; Packed Single-FP Minimum
83 (def-instr minps (simd) (:r #x0f5d (xmm/m128 xmm) :not-prefixes (repz)))
84
85 ;;; Scalar Single-FP Minimum
86 (def-instr minss (simd) (:r #x0f5d (xmm/m32 xmm) :req-prefixes (repz)))
87
88 ;;; Move Aligned Four Packed Single-FP
89 (def-instr movaps (simd)
90 (:r #x0f28 (xmm/m128 xmm))
91 (:r #x0f29 (xmm xmm/m128)))
92
93 ;;; Move High to Low Packed Single-FP
94 (def-instr movhlps (simd) (:r #x0f12 (xmm/m128 xmm) :direct t))
95
96 ;;; Move High Packed Single-FP
97 (def-instr movhps (simd)
98 (:r #x0f16 (xmm/m64 xmm) :indirect t)
99 (:r #x0f17 (xmm xmm/m64) :indirect t))
100
101 ;;; Move Low to High Packed Single-FP
102 (def-instr movlhps (simd)
103 (:r #x0f16 (xmm/m64 xmm) :direct t))
104
105 ;;; Move Low Packed Single-FP
106 (def-instr movlps (simd)
107 (:r #x0f12 (xmm/m64 xmm) :indirect t)
108 (:r #x0f13 (xmm xmm/m64) :indirect t))
109
110 ;;; Move Mask to Integer
111 (def-instr movmskps (simd) (:r #x0f50 (xmm r/m32) :direct t))
112
113 ;;; Move Scalar Single-FP
114 (def-instr movss (simd)
115 (:r #x0f10 (xmm/m32 xmm) :req-prefixes (repz))
116 (:r #x0f11 (xmm xmm/m32) :req-prefixes (repz)))
117
118 ;;; Move Unaligned Four Packed Single-FP
119 (def-instr movups (simd)
120 (:r #x0f10 (xmm/m128 xmm) :not-prefixes (repz))
121 (:r #x0f11 (xmm xmm/m128) :not-prefixes (repz)))
122
123 ;;; Packed Single-FP Multiply
124 (def-instr mulps (simd) (:r #x0f59 (xmm/m128 xmm) :not-prefixes (repz)))
125
126 ;;; Scalar Single-FP Multiply
127 (def-instr mulss (simd) (:r #x0f59 (xmm/m32 xmm) :req-prefixes (repz)))
128
129 ;;; Bit-wise Logical OR for Single-FP Data
130 (def-instr orps (simd) (:r #x0f56 (xmm/m128 xmm)))
131
132 ;;; Packed Single-FP Reciprocal
133 (def-instr rcpps (simd) (:r #x0f53 (xmm/m128 xmm) :not-prefixes (repz)))
134
135 ;;; Scalar Single-FP Reciprocal
136 (def-instr rcpss (simd) (:r #x0f53 (xmm/m32 xmm) :req-prefixes (repz)))
137
138 ;;; Packed Single-FP Square Root Reciprocal
139 (def-instr rsqrtps (simd) (:r #x0f52 (xmm/m128 xmm) :not-prefixes (repz)))
140
141 ;;; Scalar Single-FP Square Root Reciprocal
142 (def-instr rsqrtss (simd) (:r #x0f52 (xmm/m32 xmm) :req-prefixes (repz)))
143
144 ;;; Suffle Single-FP
145 (def-instr shufps (simd) (:r-imm #x0fc6 1 (imm8 xmm/m128 xmm)))
146
147 ;;; Packed Single-FP Square Root
148 (def-instr sqrtps (simd) (:r #x0f51 (xmm/m128 xmm) :not-prefixes (repz)))
149
150 ;;; Scalar Single-FP Square Root
151 (def-instr sqrtss (simd) (:r #x0f51 (xmm/m32 xmm) :req-prefixes (repz)))
152
153 ;;; Store Streaming SIMD Extension Control/Status
154 (def-instr stmxcsr (simd) (:digit (#x0fae 3) 0 (r/m32) :indirect t))
155
156 ;;; Packed Single-FP Subtract
157 (def-instr subps (simd) (:r #x0f5c (xmm/m128 xmm) :not-prefixes (repz)))
158
159 ;;; Scalar Single-FP Subtract
160 (def-instr subss (simd) (:r #x0f5c (xmm/m128 xmm) :req-prefixes (repz)))
161
162 ;;; Unordered Scalar Single-FP Compare and Set EFLAGS
163 (def-instr ucomiss (simd) (:r #x0f2e (xmm/m32 xmm)))
164
165 ;;; Unpack High Packed Single-FP Data
166 (def-instr unpckhps (simd) (:r #x0f15 (xmm/m128 xmm)))
167
168 ;;; Unpack Low Packed Single-FP Data
169 (def-instr unpcklps (simd) (:r #x0f14 (xmm/m128 xmm)))
170
171 ;;; Bit-wise Logical XOR for Single-FP Data
172 (def-instr xorps (simd) (:r #x0f57 (xmm/m128 xmm)))
173
174
175 ;;;
176 ;;; Cacheability Control
177 ;;;
178
179
180 ;;; Move Aligned Four Packed Single-FP Non-temporal
181 (def-instr movntps (simd) (:r #x0f2b (xmm xmm/m128) :indirect t))
182

  ViewVC Help
Powered by ViewVC 1.1.5