Mercurial > pub > dyncall > dyncall
comparison dyncallback/dyncall_thunk_x64.c @ 531:f6430d194be6
cleanups
author | Tassilo Philipp |
---|---|
date | Sat, 16 Apr 2022 14:59:05 +0200 |
parents | f5577f6bf97a |
children |
comparison
equal
deleted
inserted
replaced
530:585dcb68f55d | 531:f6430d194be6 |
---|---|
4 Library: dyncallback | 4 Library: dyncallback |
5 File: dyncallback/dyncall_thunk_x64.c | 5 File: dyncallback/dyncall_thunk_x64.c |
6 Description: Thunk - Implementation for x64 | 6 Description: Thunk - Implementation for x64 |
7 License: | 7 License: |
8 | 8 |
9 Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, | 9 Copyright (c) 2007-2022 Daniel Adler <dadler@uni-goettingen.de>, |
10 Tassilo Philipp <tphilipp@potion-studios.com> | 10 Tassilo Philipp <tphilipp@potion-studios.com> |
11 | 11 |
12 Permission to use, copy, modify, and distribute this software for any | 12 Permission to use, copy, modify, and distribute this software for any |
13 purpose with or without fee is hereby granted, provided that the above | 13 purpose with or without fee is hereby granted, provided that the above |
14 copyright notice and this permission notice appear in all copies. | 14 copyright notice and this permission notice appear in all copies. |
31 /* | 31 /* |
32 # x64 thunk code: | 32 # x64 thunk code: |
33 .intel_syntax | 33 .intel_syntax |
34 | 34 |
35 thunk: | 35 thunk: |
36 lea rax, (rip) # copy RIP (=p?) to RAX and use address in | 36 lea rax, (rip) # copy RIP (= ptr to thunk) to RAX and use address |
37 jmp [rax+16] # 'entry' (stored at RIP+16) for jump | 37 jmp [rax+16] # in 'entry' (stored at RIP+16) for jump |
38 nop | 38 nop |
39 nop | 39 nop |
40 nop | 40 nop |
41 entry: | 41 entry: |
42 .resq 1 | 42 .resq 1 |