New Intrinsics #956
gingerBill
started this conversation in
Proposals
Replies: 3 comments
-
frame_address :: proc(#const level: i32) -> rawptr {...}
return_address :: proc(#const level: i32) -> rawptr {...}
address_of_return_address :: proc() -> rawptr {...}
stack_pointer_on_entry :: proc() -> rawptr {...}These are probably not needed because of inline assembly. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I see many benefits of |
Beta Was this translation helpful? Give feedback.
0 replies
-
Does these need to be an intrinsic or is something in the core library? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
New intrinsics to add to the compiler:
expect :: proc(val, expected_val: T) -> T {...}trap :: proc() -> ! {...}debug_trap :: proc() -> ! {...}read_cycle_counter :: proc() -> i64 {...}frame_address :: proc(#const level: i32) -> rawptr {...}return_address :: proc(#const level: i32) -> rawptr {...}address_of_return_address :: proc() -> rawptr {...}stack_pointer_on_entry :: proc() -> rawptr {...}reverse_bits :: proc(x: T) -> T {...}byte_swap :: proc(x: T) -> T {...}count_ones :: proc(x: T) -> T {...}trailing_zeros :: proc(x: T) -> T {...}rotate_left :: proc(x: T, k: int) -> T {...}rotate_right :: proc(x: T, k: int) -> T {...}funnel_shift_left :: proc(x, y: T, k: uint) -> T {...}funnel_shift_right :: proc(x, y: T, k: uint) -> T {...}overflow_add :: proc(lhs, rhs: T) -> (T, bool) {...}overflow_sub :: proc(lhs, rhs: T) -> (T, bool) {...}overflow_mul :: proc(lhs, rhs: T) -> (T, bool) {...}bitfield_extract :: proc(value: T, offset, bits: uint) -> T {...}bitfield_insert :: proc(base, insert: T, offset, bits: uint) -> T {...}Beta Was this translation helpful? Give feedback.
All reactions