Cleanup ARM code.
This commit is contained in:
parent
c27f535768
commit
df4532d9a1
6 changed files with 33 additions and 38 deletions
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "base/tools/String.h"
|
||||
|
||||
|
||||
|
@ -63,7 +62,7 @@ xmrig::BasicCpuInfo::BasicCpuInfo() :
|
|||
m_units[i] = i;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ARMv8
|
||||
# if (XMRIG_ARM == 8)
|
||||
memcpy(m_brand, "ARMv8", 5);
|
||||
# else
|
||||
memcpy(m_brand, "ARMv7", 5);
|
||||
|
@ -128,7 +127,7 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const
|
|||
out.AddMember("msr", "none", allocator);
|
||||
out.AddMember("assembly", "none", allocator);
|
||||
|
||||
# ifdef XMRIG_ARMv8
|
||||
# if (XMRIG_ARM == 8)
|
||||
out.AddMember("arch", "aarch64", allocator);
|
||||
# else
|
||||
out.AddMember("arch", "aarch32", allocator);
|
||||
|
|
|
@ -37,7 +37,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
#include "crypto/randomx/jit_compiler_x86_static.hpp"
|
||||
#elif defined(XMRIG_ARMv8)
|
||||
#elif (XMRIG_ARM == 8)
|
||||
#include "crypto/randomx/jit_compiler_a64_static.hpp"
|
||||
#endif
|
||||
|
||||
|
@ -180,7 +180,7 @@ RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
|||
# endif
|
||||
}
|
||||
|
||||
#ifdef XMRIG_ARMv8
|
||||
#if (XMRIG_ARM == 8)
|
||||
static uint32_t Log2(size_t value) { return (value > 1) ? (Log2(value / 2) + 1) : 0; }
|
||||
#endif
|
||||
|
||||
|
@ -254,7 +254,7 @@ typedef void(randomx::JitCompilerX86::* InstructionGeneratorX86_2)(const randomx
|
|||
memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(p)); \
|
||||
} while (0)
|
||||
|
||||
#elif defined(XMRIG_ARMv8)
|
||||
#elif (XMRIG_ARM == 8)
|
||||
|
||||
Log2_ScratchpadL1 = Log2(ScratchpadL1_Size);
|
||||
Log2_ScratchpadL2 = Log2(ScratchpadL2_Size);
|
||||
|
|
|
@ -132,13 +132,13 @@ struct RandomX_ConfigurationBase
|
|||
uint32_t ScratchpadL3Mask_Calculated;
|
||||
uint32_t ScratchpadL3Mask64_Calculated;
|
||||
|
||||
#if defined(XMRIG_ARMv8)
|
||||
# if (XMRIG_ARM == 8)
|
||||
uint32_t Log2_ScratchpadL1;
|
||||
uint32_t Log2_ScratchpadL2;
|
||||
uint32_t Log2_ScratchpadL3;
|
||||
uint32_t Log2_DatasetBaseSize;
|
||||
uint32_t Log2_CacheSize;
|
||||
#endif
|
||||
# endif
|
||||
};
|
||||
|
||||
struct RandomX_ConfigurationMonero : public RandomX_ConfigurationBase {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue