diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-25 20:22:26 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-25 20:22:26 +0100 |
| commit | 72aa0e6e3891c034863476751b2aefda781de5b2 (patch) | |
| tree | fc49f4821dcb900a30d472803e5340587c1cd65a /core/runtime/core.odin | |
| parent | cb2e6ea31db90ca80314e5ff8ce8f43371fade7c (diff) | |
Replace many `foreign` llvm calls with intrinsics
Diffstat (limited to 'core/runtime/core.odin')
| -rw-r--r-- | core/runtime/core.odin | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 78d43b65a..0033aad9a 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -20,6 +20,8 @@ // package runtime +import "intrinsics" + // NOTE(bill): This must match the compiler's Calling_Convention :: enum u8 { Invalid = 0, @@ -430,17 +432,9 @@ typeid_base_without_enum :: typeid_core; -@(default_calling_convention = "none") -foreign { - @(link_name="llvm.debugtrap") - debug_trap :: proc() ---; - - @(link_name="llvm.trap") - trap :: proc() -> ! ---; - - @(link_name="llvm.readcyclecounter") - read_cycle_counter :: proc() -> u64 ---; -} +debug_trap :: intrinsics.debug_trap; +trap :: intrinsics.trap; +read_cycle_counter :: intrinsics.read_cycle_counter; @@ -488,7 +482,6 @@ __init_context :: proc "contextless" (c: ^Context) { c.logger.data = nil; } - default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code_Location) { print_caller_location(loc); print_string(" "); |