-
-
Notifications
You must be signed in to change notification settings - Fork 4
notes
Auto edited this page May 9, 2022
·
7 revisions
the - operator is actually one of the most difficult operators: it can act as
- sign -3
- sign-flip operation -i == i*-1
- subtraction a-3
- range age 12-15, 7000-6000 BC usually for unsigned
Figuring out which is which needs special care! -1-2-‖-3‖-4
abs via float is still better than function calls as emitted by gcc -O3 !!
(func $abs (type 2) (param i32) (result i32) (local i32) local.get 0 local.get 0 i32.const 31 i32.shr_s local.tee 1 i32.add local.get 1 i32.xor)