2018-12-31 18:06:45 +00:00
|
|
|
;# Copyright (c) 2018 tevador
|
|
|
|
;#
|
|
|
|
;# This file is part of RandomX.
|
|
|
|
;#
|
|
|
|
;# RandomX is free software: you can redistribute it and/or modify
|
|
|
|
;# it under the terms of the GNU General Public License as published by
|
|
|
|
;# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;# (at your option) any later version.
|
|
|
|
;#
|
|
|
|
;# RandomX is distributed in the hope that it will be useful,
|
|
|
|
;# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;# GNU General Public License for more details.
|
|
|
|
;#
|
|
|
|
;# You should have received a copy of the GNU General Public License
|
|
|
|
;# along with RandomX. If not, see<http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
.intel_syntax noprefix
|
|
|
|
#if defined(__APPLE__)
|
|
|
|
.text
|
|
|
|
#else
|
|
|
|
.section .text
|
|
|
|
#endif
|
|
|
|
#if defined(__WIN32__) || defined(__APPLE__)
|
|
|
|
#define DECL(x) _##x
|
|
|
|
#else
|
|
|
|
#define DECL(x) x
|
|
|
|
#endif
|
|
|
|
.global DECL(randomx_program_prologue)
|
2019-01-27 18:33:55 +00:00
|
|
|
.global DECL(randomx_program_loop_begin)
|
|
|
|
.global DECL(randomx_program_loop_load)
|
2019-01-27 09:52:30 +00:00
|
|
|
.global DECL(randomx_program_start)
|
|
|
|
.global DECL(randomx_program_read_dataset)
|
2019-01-27 18:33:55 +00:00
|
|
|
.global DECL(randomx_program_loop_store)
|
2019-01-27 09:52:30 +00:00
|
|
|
.global DECL(randomx_program_loop_end)
|
2018-12-31 18:06:45 +00:00
|
|
|
.global DECL(randomx_program_epilogue)
|
|
|
|
.global DECL(randomx_program_end)
|
2019-01-10 21:04:55 +00:00
|
|
|
|
|
|
|
#define db .byte
|
2018-12-31 18:06:45 +00:00
|
|
|
|
|
|
|
.align 64
|
|
|
|
DECL(randomx_program_prologue):
|
|
|
|
#include "asm/program_prologue_linux.inc"
|
|
|
|
|
|
|
|
.align 64
|
2019-01-27 09:52:30 +00:00
|
|
|
#include "asm/program_xmm_constants.inc"
|
|
|
|
|
|
|
|
.align 64
|
2019-01-27 18:33:55 +00:00
|
|
|
DECL(randomx_program_loop_begin):
|
2019-01-27 09:52:30 +00:00
|
|
|
nop
|
|
|
|
|
2019-01-27 18:33:55 +00:00
|
|
|
DECL(randomx_program_loop_load):
|
|
|
|
#include "asm/program_loop_load.inc"
|
2019-01-27 09:52:30 +00:00
|
|
|
|
|
|
|
DECL(randomx_program_start):
|
|
|
|
nop
|
|
|
|
|
|
|
|
DECL(randomx_program_read_dataset):
|
|
|
|
#include "asm/program_read_dataset.inc"
|
|
|
|
|
2019-01-27 18:33:55 +00:00
|
|
|
DECL(randomx_program_loop_store):
|
|
|
|
#include "asm/program_loop_store.inc"
|
2019-01-27 09:52:30 +00:00
|
|
|
|
|
|
|
DECL(randomx_program_loop_end):
|
2018-12-31 18:06:45 +00:00
|
|
|
nop
|
|
|
|
|
|
|
|
.align 64
|
|
|
|
DECL(randomx_program_epilogue):
|
|
|
|
#include "asm/program_epilogue_linux.inc"
|
|
|
|
|
|
|
|
.align 64
|
|
|
|
DECL(randomx_program_end):
|
2019-01-10 21:04:55 +00:00
|
|
|
nop
|