aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2025-07-29 22:37:42 +0200
committerGitHub <noreply@github.com>2025-07-29 22:37:42 +0200
commit861fa4ab68d07bc8f3827ca29946c79c7b3f744e (patch)
tree237ac65d7e74cbe094d77f7553f3f21c30d9bbf9 /src/check_builtin.cpp
parent435f7f65039751aebe0ec780621a26499ce6d639 (diff)
parent35a95fc3e4c67dcf32462c112675699673c037f2 (diff)
Merge pull request #4140 from colrdavidson/macharena
Mach Process control
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 58fa44ec9..974224ed2 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -4713,6 +4713,15 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
}
break;
+ case BuiltinProc_read_cycle_counter_frequency:
+ if (build_context.metrics.arch != TargetArch_arm64) {
+ error(call, "'%.*s' is only allowed on arm64 targets", LIT(builtin_name));
+ return false;
+ }
+ operand->mode = Addressing_Value;
+ operand->type = t_i64;
+ break;
+
case BuiltinProc_read_cycle_counter:
operand->mode = Addressing_Value;
operand->type = t_i64;