mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Revert "Change intrinsics.read_cycle_counter on ARM64"
This reverts commit b567679eb6.
This commit is contained in:
@@ -2112,7 +2112,7 @@ gb_internal lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValu
|
|||||||
if (build_context.metrics.arch == TargetArch_arm64) {
|
if (build_context.metrics.arch == TargetArch_arm64) {
|
||||||
LLVMTypeRef func_type = LLVMFunctionType(LLVMInt64TypeInContext(p->module->ctx), nullptr, 0, false);
|
LLVMTypeRef func_type = LLVMFunctionType(LLVMInt64TypeInContext(p->module->ctx), nullptr, 0, false);
|
||||||
bool has_side_effects = false;
|
bool has_side_effects = false;
|
||||||
LLVMValueRef the_asm = llvm_get_inline_asm(func_type, str_lit("mrs x0, PMCCNTR_EL0"), str_lit("=r"), has_side_effects);
|
LLVMValueRef the_asm = llvm_get_inline_asm(func_type, str_lit("mrs x9, cntvct_el0"), str_lit("=r"), has_side_effects);
|
||||||
GB_ASSERT(the_asm != nullptr);
|
GB_ASSERT(the_asm != nullptr);
|
||||||
res.value = LLVMBuildCall2(p->builder, func_type, the_asm, nullptr, 0, "");
|
res.value = LLVMBuildCall2(p->builder, func_type, the_asm, nullptr, 0, "");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user