Advertisement
Guest User

Untitled

a guest
Jun 4th, 2022
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. void foo(int a, int b)
  5. {
  6.     printf("%d\n", a + b);
  7. }
  8.  
  9.  
  10.  
  11. void bar()
  12. {
  13.     __asm__(
  14.         "movq %0, 0x8(%%rsp);"
  15.         "movl $3, 0x12(%%rsp);"
  16.         "movl $2, 0x16(%%rsp);"
  17.         :
  18.         : "r" (foo)
  19.         :
  20.     );
  21. }
  22.  
  23.  
  24.  
  25. int main(void)
  26. {
  27.     bar();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement