mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
CryptonightR: define out i386/x86_64 specific code on other archs
This commit is contained in:
parent
1b8757dddc
commit
108c625b3f
2 changed files with 8 additions and 0 deletions
|
@ -54,6 +54,7 @@ static const uint8_t epilogue[] = {
|
||||||
|
|
||||||
int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_func buf, const size_t buf_size)
|
int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_func buf, const size_t buf_size)
|
||||||
{
|
{
|
||||||
|
#if defined __i386 || defined __x86_64__
|
||||||
uint8_t* JIT_code = (uint8_t*) buf;
|
uint8_t* JIT_code = (uint8_t*) buf;
|
||||||
const uint8_t* JIT_code_end = JIT_code + buf_size;
|
const uint8_t* JIT_code_end = JIT_code + buf_size;
|
||||||
|
|
||||||
|
@ -103,4 +104,7 @@ int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_f
|
||||||
__builtin___clear_cache((char*)buf, (char*)JIT_code);
|
__builtin___clear_cache((char*)buf, (char*)JIT_code);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef CRYPTONIGHTR_TEMPLATE_H
|
#ifndef CRYPTONIGHTR_TEMPLATE_H
|
||||||
#define CRYPTONIGHTR_TEMPLATE_H
|
#define CRYPTONIGHTR_TEMPLATE_H
|
||||||
|
|
||||||
|
#if defined __i386 || defined __x86_64__
|
||||||
|
|
||||||
void CryptonightR_instruction0(void);
|
void CryptonightR_instruction0(void);
|
||||||
void CryptonightR_instruction1(void);
|
void CryptonightR_instruction1(void);
|
||||||
void CryptonightR_instruction2(void);
|
void CryptonightR_instruction2(void);
|
||||||
|
@ -1036,4 +1038,6 @@ const void* instructions_mov[257] = {
|
||||||
CryptonightR_instruction_mov256,
|
CryptonightR_instruction_mov256,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // CRYPTONIGHTR_TEMPLATE_H
|
#endif // CRYPTONIGHTR_TEMPLATE_H
|
||||||
|
|
Loading…
Reference in a new issue