diff options
Diffstat (limited to 'src/check_builtin.cpp')
| -rw-r--r-- | src/check_builtin.cpp | 9 |
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; |