author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 17 Jun 2016 17:25:15 +0100 | |
changeset 26 | 8eb6716029aa |
parent 23 | d2d9a2d4d6bf |
permissions | -rw-r--r-- |
23
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
1 |
" |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
2 |
Copyright (c) 2012-2016 Igor Stasenko |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
3 |
Martin McClure |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
4 |
Damien Pollet |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
5 |
Camillo Bruni |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
6 |
Guido Chari |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
7 |
2016-now Jan Vrany <jan.vrany [at] fit . cvut . cz> |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
8 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
9 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
10 |
of this software and associated documentation files (the 'Software'), to deal |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
11 |
in the Software without restriction, including without limitation the rights |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
12 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
13 |
copies of the Software, and to permit persons to whom the Software is |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
14 |
furnished to do so, subject to the following conditions: |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
15 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
16 |
The above copyright notice and this permission notice shall be included in all |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
17 |
copies or substantial portions of the Software. |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
18 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
20 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
21 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
22 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
23 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
24 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
25 |
SOFTWARE. |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
26 |
" |
3
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
"{ Package: 'jv:dragonfly/asm' }" |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
"{ NameSpace: Smalltalk }" |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
AJBaseReg subclass:#AJxMMRegister |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
instanceVariableNames:'' |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
classVariableNames:'' |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
poolDictionaries:'' |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
category:'AsmJit-x86-Operands' |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
AJxMMRegister comment:'I am a register used by the SSE (Streaming SIMD Extensions) for the x86 instruction set. The independent XMM registers are 128bit wide and do not overlap with any other existing registers. Depending on the instructions used the XMM registers represent different data types: SSE: 4 x 32bit single precision floats SSE2: 2 x 64bit double prexision floats 2 x 64bit integers 4 x 32bit integers 8 x 16bit short integers 16 x 8bit bytes/characters' |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
|
23
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
41 |
!AJxMMRegister class methodsFor:'documentation'! |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
42 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
43 |
copyright |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
44 |
" |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
45 |
Copyright (c) 2012-2016 Igor Stasenko |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
46 |
Martin McClure |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
47 |
Damien Pollet |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
48 |
Camillo Bruni |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
49 |
Guido Chari |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
50 |
2016-now Jan Vrany <jan.vrany [at] fit . cvut . cz> |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
51 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
52 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
53 |
of this software and associated documentation files (the 'Software'), to deal |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
54 |
in the Software without restriction, including without limitation the rights |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
55 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
56 |
copies of the Software, and to permit persons to whom the Software is |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
57 |
furnished to do so, subject to the following conditions: |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
58 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
59 |
The above copyright notice and this permission notice shall be included in all |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
60 |
copies or substantial portions of the Software. |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
61 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
62 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
63 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
64 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
65 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
66 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
67 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
68 |
SOFTWARE. |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
69 |
|
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
70 |
" |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
71 |
! ! |
d2d9a2d4d6bf
Added README, licenses and copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
72 |
|
3
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
73 |
!AJxMMRegister methodsFor:'accessing'! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
74 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
75 |
code: aCode |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
77 |
code := aCode. |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
78 |
size := 16 |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
79 |
! ! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
80 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
81 |
!AJxMMRegister methodsFor:'printing'! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
82 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
83 |
descriptionOn: s |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
84 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
85 |
s nextPutAll: 'An SSE register'. |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
86 |
! ! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
87 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
88 |
!AJxMMRegister methodsFor:'testing'! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
isGeneralPurpose |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
^ false |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
94 |
isRegTypeXMM |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
95 |
^ true |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
96 |
! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
97 |
|
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
98 |
isX86 |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
99 |
^ self index < 8 |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
100 |
! ! |
483729eb4432
Initial port ot Igor Stasenko's AsmJit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
101 |