Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
oidos
Commits
9a1030e6
Commit
9a1030e6
authored
Apr 22, 2017
by
Aske Simon Christensen
Browse files
Name mangling and section names compatible with Mac/Linux
parent
cf1b7cec
Changes
1
Hide whitespace changes
Inline
Side-by-side
synth/src/additive.asm
View file @
9a1030e6
%if __BITS__ == 32
; Windows?
%ifidn __OUTPUT_FORMAT__, win32
%define WINDOWS (1)
%elifidn __OUTPUT_FORMAT__, win64
%define WINDOWS (1)
%else
%define WINDOWS (0)
%endif
; Name mangling
%if __BITS__ == 32 && WINDOWS
%define NAME(n) _%+n
%else
%define NAME(n) n
%endif
; Registers and stack layout
%if __BITS__ == 32
%define r(n) e%+n
%define PSIZE 4
%define STACK_OFFSET (4*4 + 4)
%else
%define NAME(n) n
%define r(n) r%+n
%define PSIZE 8
%define STACK_OFFSET (4*8 + 2*16 + 8)
default
rel
%endif
; Export functions
global
NAME
(
supports_avx
)
global
NAME
(
additive_core_sse2
)
global
NAME
(
additive_core_avx
)
section
con
rdata
al
ign
=
16
; Constants
section
.rdata
al
ign
=
16
c_zero:
dq
0.0
,
0.0
,
0.0
,
0.0
c_one:
dq
1.0
,
1.0
,
1.0
,
1.0
section
sup
text
section
.
text
NAME
(
supports_avx
):
push
r
(
bx
)
...
...
@@ -37,7 +55,7 @@ NAME(supports_avx):
ret
section
ss
e2
text
section
.
text
NAME
(
additive_core_sse2
):
; Disable denormals
push
r
(
ax
)
...
...
@@ -151,7 +169,7 @@ NAME(additive_core_sse2):
ret
section
avx
text
section
.
text
NAME
(
additive_core_avx
):
; Disable denormals
push
r
(
ax
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment