Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int a, int b)
- {
- printf("%d\n", a + b);
- }
- void bar()
- {
- __asm__(
- "movq %0, 0x8(%%rsp);"
- "movl $3, 0x12(%%rsp);"
- "movl $2, 0x16(%%rsp);"
- :
- : "r" (foo)
- :
- );
- }
- int main(void)
- {
- bar();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement