Dyn

 view release on metacpan or  search on metacpan

dyncall/portasm/portasm-x64.S  view on Meta::CPAN

/*

 Package: dyncall
 Library: portasm
 File: portasm/portasm-x64.S
 Description: Portable Assembler Macros for X64
 License:

   Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>,
                           Tassilo Philipp <tphilipp@potion-studios.com>

   Permission to use, copy, modify, and distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
   copyright notice and this permission notice appear in all copies.

   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

*/



/* Common macros. */
#define XCONCAT(A,B) A##B
#if defined(GEN_MASM)
/* MASM syntax. */
.CODE
#  define BEGIN_ASM
#  define END_ASM END
#  define CSYM(X) X
#  define GLOBAL(X)       X PROC
#  define GLOBAL_FRAME(X) X PROC FRAME
#  define BEGIN_PROC(X)       OPTION PROLOGUE:NONE, EPILOGUE:NONE
#  define FRAME_BEGIN_PROC(X) OPTION EPILOGUE:NONE
#  define FRAME_SET(OFFSET, X)  .setframe X, OFFSET
#  define FRAME_PUSH_REG(X)   .pushreg X
#  define FRAME_ENDPROLOG()   .endprolog
#  define END_PROC(X)   X ENDP
#  define PUSH(R) push R
#  define POP(R) pop R
#  define MOV(S,D)  mov D,S
#  define MOVB(S,D) mov D,S
#  define MOVL(S,D) mov D,S
#  define MOVZXQ(S,D) movzx D,S
#  define ADDL(S,D) add D,S
#  define ANDL(S,D) and D,S
#  define SUBL(S,D) sub D,S
#  define SHRL(S,D) shr D,S
#  define SHLQ(S,D) shl D,S
#  define ADD(S,D)  add D,S
#  define AND(S,D)  and D,S
#  define SUB(S,D)  sub D,S
#  define SHR(S,D)  shr D,S
#  define MOVD(S,D) movd D,S
#  define XOR(S,D) xor D,S
#  define RET() ret
#  define CALL_DWORD(R,OFF) call DWORD(R,OFF)
#  define REP(X) rep X
#  define MOVSB movsb
#  define MOVSW movsw
#  define MOVSD(S,D)  movsd D,S



( run in 3.086 seconds using v1.01-cache-2.11-cpan-ad19def0cd9 )