Added config option for AVX2 dataset init
-1 = Auto detect 0 = Always disabled 1 = Enabled if AVX2 is supported
This commit is contained in:
parent
410313d933
commit
633aaccd9c
14 changed files with 74 additions and 38 deletions
|
@ -36,12 +36,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "crypto/randomx/virtual_memory.hpp"
|
||||
|
||||
static bool hugePagesJIT = false;
|
||||
static int optimizedDatasetInit = -1;
|
||||
|
||||
void randomx_set_huge_pages_jit(bool hugePages)
|
||||
{
|
||||
hugePagesJIT = hugePages;
|
||||
}
|
||||
|
||||
void randomx_set_optimized_dataset_init(int value)
|
||||
{
|
||||
optimizedDatasetInit = value;
|
||||
}
|
||||
|
||||
namespace ARMV8A {
|
||||
|
||||
constexpr uint32_t B = 0x14000000;
|
||||
|
@ -98,7 +104,7 @@ static size_t CalcDatasetItemSize()
|
|||
|
||||
constexpr uint32_t IntRegMap[8] = { 4, 5, 6, 7, 12, 13, 14, 15 };
|
||||
|
||||
JitCompilerA64::JitCompilerA64(bool hugePagesEnable) :
|
||||
JitCompilerA64::JitCompilerA64(bool hugePagesEnable, bool) :
|
||||
hugePages(hugePagesJIT && hugePagesEnable),
|
||||
literalPos(ImulRcpLiteralsEnd)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue