-
Notifications
You must be signed in to change notification settings - Fork 3
/
x86x64.inc
95 lines (73 loc) · 1.63 KB
/
x86x64.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
;/*###### Copyright (c) 2001-2015 Ufasoft http://ufasoft.com mailto:support@ufasoft.com, Sergey Pavlov mailto:dev@ufasoft.com ####
;# #
;# See LICENSE for licensing information #
;#####################################################################################################################################*/
IFNDEF __JWASM__
IFNDEF @CPU
X64 EQU 1
ELSE
X64 EQU 0
ENDIF
ENDIF
IFNDEF X64
X64 EQU 0
ENDIF
IF X64
IFDEF __JWASM__
OPTION_LANGUAGE_C EQU OPTION LANGUAGE: C
ELSE
OPTION_LANGUAGE_C EQU
ENDIF
ZAX EQU RAX
ZBX EQU RBX
ZCX EQU RCX
ZDX EQU RDX
ZSI EQU RSI
ZDI EQU RDI
ZSP EQU RSP
ZBP EQU RBP
ZWORD EQU QWORD
ZWORD_SIZE EQU 8
ZWORD_BITS EQU 6
ZWORD_PTR EQU QWORD PTR
cZY EQU cqo
lodsZ EQU lodsq
stosZ EQU stosq
movsZ EQU movsq
jzcxz EQU jrcxz
ELSE
OPTION_LANGUAGE_C EQU OPTION LANGUAGE: C
ZAX EQU EAX
ZBX EQU EBX
ZCX EQU ECX
ZDX EQU EDX
ZSI EQU ESI
ZDI EQU EDI
ZSP EQU ESP
ZBP EQU EBP
cZY EQU cdq
ZWORD EQU DWORD
ZWORD_SIZE EQU 4
ZWORD_BITS EQU 5
ZWORD_PTR EQU DWORD PTR
lodsZ EQU lodsd
stosZ EQU stosd
movsZ EQU movsd
jzcxz EQU jecxz
.686P
.MODEL FLAT
ENDIF
dotimes_i_8 MACRO cmd
FOR i, <0, 1, 2, 3, 4, 5, 6, 7>
xmm_i CATSTR <xmm>, %i
cmd
ENDM
ENDM
dotimes_i_12 MACRO cmd
FOR i, <0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11>
xmm_i CATSTR <xmm>, %i
cmd
ENDM
ENDM
OPTION_LANGUAGE_C
.CODE