Commit Graph

442 Commits

Author SHA1 Message Date
SChernykh
cced5cab2f
Merge pull request #247 from SChernykh/fix_warning
Fixed compiler warning
2022-06-20 23:02:38 +02:00
SChernykh
00472c54ef Fixed compiler warning
```
virtual_memory.c:210:14: warning: type defaults to 'int' in declaration of 'pageMinimum' [-Wimplicit-int]
```
2022-06-04 19:47:17 +02:00
SChernykh
09aa65c3c7
Merge pull request #246 from SChernykh/fix_leak
Fixed cache->jit memory leak
2022-05-25 09:12:36 +02:00
SChernykh
166e0d80f5 Fixed cache->jit memory leak
1. `cache->jit = new randomx::JitCompiler();` - succeeds
2. `cache->memory = (uint8_t*)randomx::LargePageAllocator::allocMemory(randomx::CacheSize);` - fails
3. `if (cache && cache->memory == nullptr) randomx_release_cache(cache);` is executed
4. randomx_release_cache checks `if (cache->memory != nullptr)` and does nothing
5. cache->jit stays allocated
2022-05-24 14:22:16 +02:00
hyc
85c527a623
Fix missing defs on older platforms (#243) 2022-05-09 22:02:04 +01:00
hyc
8b1df47e42
Merge pull request #242 from hyc/vmem2
Fix previous commit...
2022-05-09 17:49:19 +01:00
Howard Chu
d8fb7363c1 Fix previous commit...
true/false leftover from C++
2022-05-09 17:48:14 +01:00
hyc
84bc0c9e42
Merge pull request #241 from hyc/vmem
Don't use exceptions in low-level mem allocator
2022-05-09 17:31:56 +01:00
Howard Chu
6f756473c0 Don't use exceptions in low-level mem allocator 2022-05-09 17:28:59 +01:00
SChernykh
ae8e98b681
Merge pull request #229 from tevador/pr-reserved
Do not use reserved identifiers in intrin_portable.h
2022-04-06 07:16:44 +02:00
tevador
905ee34f8b Do not use reserved identifiers in intrin_portable.h
Identifiers starting with an underscore followed by an uppercase
letter are reserved for the compiler.
2021-11-29 21:33:42 +01:00
tevador
df6e15e130 Merge branch 'master' of git@github.com:tevador/RandomX.git 2021-11-29 20:52:02 +01:00
tevador
2fa7c00bce update toolsets in vcxproj 2021-11-29 20:51:56 +01:00
hyc
9efc398c19
Merge pull request #227 from selsta/randomx-benchmark
RandomX benchmark 1.1.11
2021-11-19 06:08:59 +00:00
hyc
b0d4807420
Merge pull request #226 from jtgrassie/fix-non-arm-osx
Fix W^X policy for apple portability
2021-11-19 06:08:38 +00:00
selsta
85a4032f34
RandomX benchmark 1.1.11 2021-11-16 03:05:28 +01:00
Jethro Grassie
4d8ef87936
pageProtect when missing pthread_jit_write_protect_np 2021-11-13 08:53:57 -05:00
Jethro Grassie
31b9b0f8fc
Add runtime checks 2021-11-12 20:59:19 -05:00
Jethro Grassie
c7973839fa
Fix apple-non-arm jit guard 2021-11-12 14:50:41 -05:00
tevador
f9ae3f2351
Merge pull request #225 from SChernykh/msvc-debug-fix
Fixed a crash in MSVC Debug and RelWithDebInfo builds
2021-11-08 19:59:50 +01:00
SChernykh
bbc9ccc90b Fixed a crash in MSVC Debug and RelWithDebInfo builds
MSVC debug/relwithdebinfo builds use jmp trampolines for ASM functions, so these must be traversed to get the actual address of the code for each function.
2021-11-06 22:15:07 +01:00
tevador
d589aa29d3
Merge pull request #222 from hyc/relocs
Fix absolute address references
2021-11-06 22:02:21 +01:00
tevador
b27283a708
Merge pull request #217 from hyc/issue216
Fix #216 - MacOS JIT privs are not ARM-specific
2021-11-06 21:51:16 +01:00
hyc
59c981cc5d
Merge pull request #192 from xiphon/fix-mingw-5.3-cross-compilation
__cpuidex: explicit MSVC check, fix MinGW GCC 5.3 cross-compilation
2021-11-06 20:16:29 +00:00
hyc
1f7a09435b
Merge pull request #224 from tevador/pr-codegen1
Fix native code generator using the wrong hash function
2021-11-06 20:14:13 +00:00
hyc
6bc2c2a5f6
Merge pull request #220 from selsta/cmake-version
cmake: set nonancient minimum version
2021-11-06 20:12:42 +00:00
Howard Chu
ae2c241a96 Fix #216 - MacOS JIT privs are not ARM-specific 2021-11-06 20:07:11 +00:00
hyc
088c36fea0 Fix absolute address references
Use local symbols instead of global symbols, to prevent problems
with dynamic linker
2021-11-06 17:19:37 +00:00
tevador
8006ac7ec0 Fix native code generator using the wrong hash function 2021-11-06 16:16:26 +01:00
selsta
6923ef322e
cmake: set nonancient minimum version
2.8.7 constantly prints a warning
2021-10-18 07:30:31 +02:00
tevador
fe4324e8c0
Merge pull request #213 from hyc/m1typo
Fix typo for M1 Mac build
2021-05-22 13:55:05 +02:00
SChernykh
3c8c7ee097
Optimized dataset read (#211)
* Optimized dataset read

There was a false dependency on readReg2 and readReg3 (caused by `xor rbp, rax` instruction) when reading dataset item (see design.md - 4.6.2 Loop execution, steps 5 and 7). This change uses `ma` register to read dataset item before the whole `rbp` (`ma` and `mx`) is changed, so superscalar and out-of-order CPU can start executing it earlier.

Results: https://i.imgur.com/Bpeq9mx.png

~1% speedup on modern Intel/AMD CPUs.

* ARMv8: optimized dataset read

Break dependency from readReg2 and readReg3.

* Fixed light mode hashing
2021-05-22 13:54:50 +02:00
Howard Chu
1b3db29fb8 Fix typo for M1 Mac build 2021-05-22 12:44:55 +01:00
tevador
c12097400b
Merge pull request #212 from hyc/m1prot
Faster W^X policy for apple silicon macs
2021-05-22 12:39:04 +02:00
tevador
0db4c57823
Merge pull request #198 from tevador/pr-applem1
Apple silicon: force W^X, enable hardware AES
2021-05-22 12:30:42 +02:00
tevador
4aae0d834d
Merge pull request #202 from SChernykh/fix-crash
Fix illegal instruction crash on some ARM systems
2021-05-22 12:21:41 +02:00
Howard Chu
d9b7e8c25d Faster W^X policy for apple silicon macs 2021-05-20 20:35:18 +01:00
SChernykh
2ba7df2844 Fix illegal instruction crash on some ARM systems
See https://github.com/xmrig/xmrig/issues/1916
2021-02-01 23:19:14 +01:00
tevador
a44d07c89f
Merge pull request #201 from cryptonote-social/removecode
remove unnecessary first-load initialization code
2021-01-28 22:14:03 +01:00
cryptonote-social
529b933fcf remove unnecessary first-load initialization code 2021-01-23 14:56:35 -08:00
tevador
a38ce601fd Apple silicon: force W^X, enable hardware AES 2020-11-29 20:39:53 +01:00
tevador
5bfd021e8f
Merge pull request #183 from selsta/map_jit
virtual_memory: add MAP_JIT on macOS
2020-11-21 20:45:04 +01:00
xiphon
66c22813f6 __cpuidex: explicit MSVC check, fix MinGW GCC 5.3 cross-compilation 2020-09-07 16:31:11 +00:00
tevador
5ce5f4906c add --noBatch benchmark option 2020-07-04 14:57:56 +02:00
selsta
7c172f746f
virtual_memory: add MAP_JIT on macOS 2020-06-28 17:29:41 +02:00
tevador
9905ec9c5a
Merge pull request #188 from cryptonote-social/master
replace hardcoded literal with its appropriate symbol
2020-06-28 16:36:40 +02:00
tevador
863765bbe6
Merge pull request #185 from tevador/pr-crosscomp
Fix windows-target cross-compilation
2020-06-28 16:36:12 +02:00
tevador
a1c08a2f41
Merge pull request #187 from tevador/pr-netbsd
Fix compilation and JIT support on NetBSD

1. Disable hugepages (not supported).
2. Force W^X (required).
3. When allocating JIT memory, PROT_EXEC must be reserved
   in order to set the pages executable later.
2020-06-28 16:35:19 +02:00
tevador
708a4e50c5 Fix compilation and JIT support on NetBSD:
1. Disable hugepages (not supported).
2. Force W^X (required).
3. When allocating JIT memory, PROT_EXEC must be reserved
   in order to set the pages executable later.
2020-06-28 16:16:20 +02:00
tevador
6a4afc721f
Merge pull request #189 from tevador/pr-set-cache
Fix potential use-after-free when reallocating cache
2020-06-27 20:42:15 +02:00