procs_wasm32.odin 419 B

1234567891011121314151617181920212223
  1. //+build wasm32
  2. package runtime
  3. @(link_name="__ashlti3", linkage="strong")
  4. __ashlti3 :: proc "c" (a: i64, b_: i32) -> i64 {
  5. /*
  6. b := u32(b_)
  7. input := transmute([2]i32)a
  8. result: [2]i32
  9. if b & 32 != 0 {
  10. result[0] = 0
  11. result[1] = input[0] << (b - 32)
  12. } else {
  13. if b == 0 {
  14. return a
  15. }
  16. result[0] = input[0]<<b
  17. result[1] = (input[1]<<b) | (input[0]>>(32-b))
  18. }
  19. return transmute(i64)result
  20. */
  21. return 0
  22. }