Updated intel syntax x86-64 asm files to also support MS win64 call convention (ifdef...
[gromacs/rigid-bodies.git] / src / gmxlib / nonbonded / nb_kernel_x86_64_sse / nb_kernel_x86_64_sse_test_asm_intel_syntax.s
blob18d375dbf4bee73eaf9f7afcfee0173332f36485
1 ;#
2 ;# Gromacs 4.0 Copyright (c) 1991-2003
3 ;# David van der Spoel, Erik Lindahl
4 ;#
5 ;# This program is free software; you can redistribute it and/or
6 ;# modify it under the terms of the GNU General Public License
7 ;# as published by the Free Software Foundation; either version 2
8 ;# of the License, or (at your option) any later version.
9 ;#
10 ;# To help us fund GROMACS development, we humbly ask that you cite
11 ;# the research papers on the package. Check out http://www.gromacs.org
12 ;#
13 ;# And Hey:
14 ;# Gnomes, ROck Monsters And Chili Sauce
17 ;# These files require GNU binutils 2.10 or later, since we
18 ;# use intel syntax for portability, or a recent version
19 ;# of NASM that understands Extended 3DNow and SSE2 instructions.
20 ;# (NASM is normally only used with MS Visual C++).
21 ;# Since NASM and gnu as disagree on some definitions and use
22 ;# completely different preprocessing options I have to introduce a
23 ;# trick: NASM uses ';' for comments, while gnu as uses '#' on x86.
24 ;# Gnu as treats ';' as a line break, i.e. ignores it. This is the
25 ;# reason why all comments need both symbols...
26 ;# The source is written for GNU as, with intel syntax. When you use
27 ;# NASM we redefine a couple of things. The false if-statement around
28 ;# the following code is seen by GNU as, but NASM doesn't see it, so
29 ;# the code inside is read by NASM but not gcc.
31 ; .if 0 # block below only read by NASM
32 %define .section section
33 %define .long dd
34 %define .align align
35 %define .globl global
36 ;# NASM only wants 'dword', not 'dword ptr'.
37 %define ptr
38 %macro .equiv 2
39 %1 equ %2
40 %endmacro
41 ; .endif # End of NASM-specific block
42 ; .intel_syntax noprefix # Line only read by gnu as
45 .section .text
47 .globl nb_kernel_x86_64_sse_test_asm
48 .globl _nb_kernel_x86_64_sse_test_asm
49 nb_kernel_x86_64_sse_test_asm:
50 _nb_kernel_x86_64_sse_test_asm:
51 push rbx ;# test 64-bit register
52 emms
53 xorps xmm0, xmm0 ;# test SSE
54 emms
55 pop rbx ;# test 64-bit register
56 ret