annotate portasm/portasm-x64.S @ 533:71c884e610f0

- integration of patches from Raphael Luba, Thekla, Inc.: * integration of aggregate-by-value (struct, union) support patch for x64 (win and sysv) * windows/x64 asm additions to specify how stack unwinds (help for debuggers, exception handling, etc.) * see Changelog for details - new calling convention modes for thiscalls (platform agnostic, was specific before) * new signature character for platform agnostic thiscalls ('*' / DC_SIGCHAR_CC_THISCALL) - dcCallF(), dcVCallF(), dcArgF() and dcVArgF(): * added support for aggregates-by-value (wasn't part of patch) * change that those functions don't implicitly call dcReset() anymore, which was unflexible (breaking change) - added macros to feature test implementation for aggregate-by-value and syscall support - changed libdyncall_s.lib and libdyncallback_s.lib order in callback test makefiles, as some toolchains are picky about order - doc: * man page updates to describe aggregate interface * manual overview changes to highlight platforms with aggregate-by-value support - test/plain: replaced tests w/ old/stale sctruct interface with new aggregate one
author Tassilo Philipp
date Thu, 21 Apr 2022 13:35:47 +0200
parents f5577f6bf97a
children 6a8aac9b2bcf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 /*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 Package: dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 Library: portasm
165
572aff021627 - file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents: 0
diff changeset
5 File: portasm/portasm-x64.S
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 Description: Portable Assembler Macros for X64
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 License:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
9 Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
10 Tassilo Philipp <tphilipp@potion-studios.com>
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 /* Common macros. */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 #define XCONCAT(A,B) A##B
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 #if defined(GEN_MASM)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 /* MASM syntax. */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 .CODE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 # define BEGIN_ASM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 # define END_ASM END
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
35 # define CSYM(X) X
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
36 # define GLOBAL(X) X PROC
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
37 # define GLOBAL_FRAME(X) X PROC FRAME
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
38 # define BEGIN_PROC(X) OPTION PROLOGUE:NONE, EPILOGUE:NONE
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
39 # define FRAME_BEGIN_PROC(X) OPTION EPILOGUE:NONE
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
40 # define FRAME_SET(OFFSET, X) .setframe X, OFFSET
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
41 # define FRAME_PUSH_REG(X) .pushreg X
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
42 # define FRAME_ENDPROLOG() .endprolog
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 # define END_PROC(X) X ENDP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 # define PUSH(R) push R
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 # define POP(R) pop R
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 # define MOV(S,D) mov D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 # define MOVB(S,D) mov D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 # define MOVL(S,D) mov D,S
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
49 # define MOVZXQ(S,D) movzx D,S
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 # define ADDL(S,D) add D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 # define ANDL(S,D) and D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 # define SUBL(S,D) sub D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53 # define SHRL(S,D) shr D,S
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
54 # define SHLQ(S,D) shl D,S
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 # define ADD(S,D) add D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56 # define AND(S,D) and D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
57 # define SUB(S,D) sub D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58 # define SHR(S,D) shr D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59 # define MOVD(S,D) movd D,S
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
60 # define XOR(S,D) xor D,S
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
61 # define RET() ret
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62 # define CALL_DWORD(R,OFF) call DWORD(R,OFF)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63 # define REP(X) rep X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
64 # define MOVSB movsb
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65 # define MOVSW movsw
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
66 # define MOVSD(S,D) movsd D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
67 # define MOVSDX(S,D) movsdx D,S
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
68 # define BYTE(R) byte ptr [R]
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69 # define DWORD(R,OFF) dword ptr [R+OFF]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70 # define QWORD(R,OFF) qword ptr [R+OFF]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
71 # define LIT(X) X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
72 # define INT(X) int X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
73 # define HEX(X) XCONCAT(X,h)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
74 # define CALL(X) call X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
75 # define CALL_REG(X) call X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
76 # define LEA(S,D) lea D,S
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77 # define SET(K,V) K = V
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 # define JE(X) je X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79 # define JNE(X) jne X
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
80 # define JMP(X) jmp X
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
81 # define CMPL(A,B) cmp B,A
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
82 # define LOCAL(X) X
166
d5705f226298 - added portasm support for adding .section .note.GNU-stack "hints" marking generated .o files from assembly files as not needing an executable stack
cslag
parents: 165
diff changeset
83 /* @@@ check if masm support wanted/needed */
d5705f226298 - added portasm support for adding .section .note.GNU-stack "hints" marking generated .o files from assembly files as not needing an executable stack
cslag
parents: 165
diff changeset
84 # define SECTION_NOTE_NXSTACK
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
85 #else
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
86 /* GNU/SunPro Assembler AT&T Syntax */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
87 .text
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
88 # define BEGIN_ASM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
89 # define END_ASM
168
2bce7629f541 - "tag" also non-linux assembly files with .note.GNU-stack, to mark .o files generated from manual assembly code as not needing an executable stack (still only for x* archs)
cslag
parents: 166
diff changeset
90 # include "../autovar/autovar_ABI.h"
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
91 # if defined (OS_Darwin)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
92 # define CSYM(X) _##X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
93 # else
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
94 # define CSYM(X) X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
95 # endif
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
96 # define RAX %rax
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
97 # define RBX %rbx
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
98 # define RCX %rcx
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
99 # define RDX %rdx
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
100 # define RSI %rsi
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
101 # define RDI %rdi
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
102 # define RBP %rbp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
103 # define RSP %rsp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
104 # define R8 %r8
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
105 # define R8D %r8d
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
106 # define R9 %r9
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
107 # define R10 %r10
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
108 # define R11 %r11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
109 # define R12 %r12
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
110 # define R13 %r13
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
111 # define R14 %r14
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
112 # define R15 %r15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
113 # define XMM0 %xmm0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
114 # define XMM1 %xmm1
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
115 # define XMM2 %xmm2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
116 # define XMM3 %xmm3
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
117 # define XMM4 %xmm4
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
118 # define XMM5 %xmm5
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
119 # define XMM6 %xmm6
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
120 # define XMM7 %xmm7
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
121 # define AL %al
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
122 # define AH %ah
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
123 # define BL %bl
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
124 # define BH %bh
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
125 # define CL %cl
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
126 # define CH %ch
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
127 # define DL %dl
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
128 # define DH %dh
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
129 # define GLOBAL(X) .globl CSYM(X)
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
130 # define GLOBAL_FRAME(X) .globl CSYM(X)
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
131 # define BEGIN_PROC(X) CSYM(X):
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
132 # define FRAME_BEGIN_PROC(X) CSYM(X):
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
133 # define FRAME_SET(OFFSET, X)
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
134 # define FRAME_PUSH_REG(X)
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
135 # define FRAME_ENDPROLOG()
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
136 # define END_PROC(X)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
137 # define PUSH(R) pushq R
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
138 # define POP(R) popq R
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
139 # define MOV(S,D) movq S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
140 # define MOVB(S,D) movb S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
141 # define MOVL(S,D) movl S,D
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
142 # define MOVZXQ(S,D) movzbq S,D
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
143 # define ADDL(S,D) addl S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
144 # define ANDL(S,D) andl S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
145 # define SUBL(S,D) subl S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
146 # define SHRL(S,D) shrl S,D
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
147 # define SHLQ(S,D) shlq S,D
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
148 # define ADD(S,D) addq S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
149 # define AND(S,D) andq S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
150 # define SUB(S,D) subq S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
151 # define SHR(S,D) shrq S,D
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
152 # define MOVD(S,D) movd S,D
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
153 # define XOR(S,D) xorq S,D
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
154 # define RET() ret
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
155 # define CALL_DWORD(R,OFF) call *DWORD(R,OFF)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
156 # define REP(X) rep X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
157 # define MOVSB movsb
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
158 # define MOVSW movsw
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
159 # define MOVSD(S,D) movsd S,D
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
160 # define BYTE(R) (R)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
161 # define DWORD(R,OFF) OFF(R)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
162 # define QWORD(R,OFF) OFF(R)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
163 # define LIT(X) $X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
164 # define INT(X) int X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
165 # define HEX(X) XCONCAT(0x,X)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
166 # define CALL(X) call X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
167 # define CALL_REG(X) call *X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
168 # define LEA(A,B) lea A,B
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
169 # define CMPL(A,B) cmpl A,B
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
170 # define JE(X) je X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
171 # define JNE(X) jne X
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 281
diff changeset
172 # define JMP(X) jmp X
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
173 # define FLDS(X) flds X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
174 # define FLDL(X) fldl X
249
91db39538e78 - replaced `.set' directives used to set symbol values in assembly files with (seemingly) more portable `=' syntax (e.g. older versions of Sun's `as' don't handle `.set')
Tassilo Philipp
parents: 182
diff changeset
175 /* not available on some platforms, e.g. old solaris, so use K=V syntax # define SET(K,V) .set K,V */
91db39538e78 - replaced `.set' directives used to set symbol values in assembly files with (seemingly) more portable `=' syntax (e.g. older versions of Sun's `as' don't handle `.set')
Tassilo Philipp
parents: 182
diff changeset
176 # define SET(K,V) K = V
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
177 # define LOCAL(X) .X
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
178 #endif
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
179