Monero
Loading...
Searching...
No Matches
jit_compiler_rv64.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2023 tevador <tevador@gmail.com>
3
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8 * Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13 * Neither the name of the copyright holder nor the
14 names of its contributors may be used to endorse or promote products
15 derived from this software without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
28
29#pragma once
30
31#include <cstdint>
32#include <cstring>
33#include <vector>
34#include "jit_compiler.hpp"
35
36namespace randomx {
37
38 class Program;
41 class Instruction;
42
69}
Definition instruction.hpp:75
ProgramFunc * getProgramFunc()
Definition jit_compiler_rv64.hpp:51
void generateDatasetInitCode()
Definition jit_compiler_rv64.hpp:50
void generateProgramLight(Program &, ProgramConfiguration &, uint32_t)
Definition jit_compiler_rv64.cpp:636
void enableAll()
Definition jit_compiler_rv64.cpp:614
void enableExecution()
Definition jit_compiler_rv64.cpp:622
void * entryDataInit
Definition jit_compiler_rv64.hpp:66
void * entryProgram
Definition jit_compiler_rv64.hpp:67
CompilerState state
Definition jit_compiler_rv64.hpp:65
void generateSuperscalarHash(SuperscalarProgram programs[RANDOMX_CACHE_ACCESSES], std::vector< uint64_t > &)
Definition jit_compiler_rv64.cpp:656
uint8_t * getCode()
Definition jit_compiler_rv64.hpp:57
void generateProgram(Program &, ProgramConfiguration &)
Definition jit_compiler_rv64.cpp:626
size_t getCodeSize()
Definition jit_compiler_rv64.cpp:594
~JitCompilerRV64()
Definition jit_compiler_rv64.cpp:610
DatasetInitFunc * getDatasetInitFunc()
Definition jit_compiler_rv64.hpp:54
JitCompilerRV64()
Definition jit_compiler_rv64.cpp:598
void enableWriting()
Definition jit_compiler_rv64.cpp:618
Definition program.hpp:44
Definition superscalar_program.hpp:37
#define RANDOMX_CACHE_ACCESSES
Definition configuration.h:44
Definition allocator.cpp:35
void ProgramFunc(RegisterFile &, MemoryRegisters &, uint8_t *, uint64_t)
Definition common.hpp:188
void DatasetInitFunc(randomx_cache *cache, uint8_t *dataset, uint32_t startBlock, uint32_t endBlock)
Definition common.hpp:189
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
Definition jit_compiler.hpp:61
Definition program.hpp:39