Monero
Loading...
Searching...
No Matches
jit_compiler_fallback.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2018-2019, 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 <vector>
33#include <stdexcept>
34#include "common.hpp"
35
36namespace randomx {
37
38 class Program;
41
43 public:
45 throw std::runtime_error("JIT compilation is not supported on this platform");
46 }
53 template<size_t N>
54 void generateSuperscalarHash(SuperscalarProgram(&programs)[N], std::vector<uint64_t> &) {
55
56 }
58
59 }
61 return nullptr;
62 }
64 return nullptr;
65 }
67 return nullptr;
68 }
69 size_t getCodeSize() {
70 return 0;
71 }
72 void enableWriting() {}
74 void enableAll() {}
75 };
76}
uint8_t * getCode()
Definition jit_compiler_fallback.hpp:66
void generateProgramLight(Program &, ProgramConfiguration &, uint32_t)
Definition jit_compiler_fallback.hpp:50
void generateDatasetInitCode()
Definition jit_compiler_fallback.hpp:57
size_t getCodeSize()
Definition jit_compiler_fallback.hpp:69
void generateProgram(Program &, ProgramConfiguration &)
Definition jit_compiler_fallback.hpp:47
DatasetInitFunc * getDatasetInitFunc()
Definition jit_compiler_fallback.hpp:63
void enableAll()
Definition jit_compiler_fallback.hpp:74
ProgramFunc * getProgramFunc()
Definition jit_compiler_fallback.hpp:60
void generateSuperscalarHash(SuperscalarProgram(&programs)[N], std::vector< uint64_t > &)
Definition jit_compiler_fallback.hpp:54
void enableWriting()
Definition jit_compiler_fallback.hpp:72
void enableExecution()
Definition jit_compiler_fallback.hpp:73
JitCompilerFallback()
Definition jit_compiler_fallback.hpp:44
Definition program.hpp:44
Definition superscalar_program.hpp:37
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 program.hpp:39