Interpreter + async mode

This commit is contained in:
tevador
2019-01-15 00:01:11 +01:00
parent a7ffe8c19a
commit 8b1102ee05
18 changed files with 702 additions and 215 deletions
+7 -6
View File
@@ -25,15 +25,16 @@ along with RandomX. If not, see<http://www.gnu.org/licenses/>.
namespace RandomX {
CompiledVirtualMachine::CompiledVirtualMachine(bool softAes) : VirtualMachine(softAes) {
CompiledVirtualMachine::CompiledVirtualMachine() {
totalSize = 0;
}
void CompiledVirtualMachine::setDataset(dataset_t ds, bool lightClient) {
if (lightClient) {
throw std::runtime_error("Compiled VM does not support light-client mode");
}
VirtualMachine::setDataset(ds, lightClient);
void CompiledVirtualMachine::setDataset(dataset_t ds) {
mem.ds = ds;
}
void CompiledVirtualMachine::initializeScratchpad(uint32_t index) {
memcpy(scratchpad, mem.ds.dataset + ScratchpadSize * index, ScratchpadSize);
}
void CompiledVirtualMachine::initializeProgram(const void* seed) {