mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-19 16:11:30 +00:00
Replace many foreign llvm calls with intrinsics
This commit is contained in:
+5
-12
@@ -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(" ");
|
||||
|
||||
Reference in New Issue
Block a user