procs_essence.odin 749 B

12345678910111213141516171819202122
  1. package runtime
  2. @(link_name="memset")
  3. memset :: proc "c" (ptr: rawptr, val: i32, len: int) -> rawptr {
  4. addr := 0x1000 + 196 * size_of(int);
  5. fp := (rawptr(((^uintptr)(uintptr(addr)))^));
  6. return ((proc "c" (rawptr, i32, int) -> rawptr)(fp))(ptr, val, len);
  7. }
  8. @(link_name="memmove")
  9. memmove :: proc "c" (dst, src: rawptr, len: int) -> rawptr {
  10. addr := 0x1000 + 195 * size_of(int);
  11. fp := (rawptr(((^uintptr)(uintptr(addr)))^));
  12. return ((proc "c" (rawptr, rawptr, int) -> rawptr)(fp))(dst, src, len);
  13. }
  14. @(link_name="memcpy")
  15. memcpy :: proc "c" (dst, src: rawptr, len: int) -> rawptr {
  16. addr := 0x1000 + 194 * size_of(int);
  17. fp := (rawptr(((^uintptr)(uintptr(addr)))^));
  18. return ((proc "c" (rawptr, rawptr, int) -> rawptr)(fp))(dst, src, len);
  19. }