summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGeza Lore <gezalore@gmail.com>2016-01-18 00:21:51 +0100
committerAnton Khirnov <anton@khirnov.net>2016-01-23 20:46:28 +0100
commitcc602061ee860b041013397e27a036b85cd87b09 (patch)
tree61d6c76ea3ffc687a70cae4ca57471ef145eef42 /tests
parent002c47798da0c43a053822c8041144798d49ed84 (diff)
x86inc: Add debug symbols indicating sizes of compiled functions
Some debuggers/profilers use this metadata to determine which function a given instruction is in; without it they get can confused by local labels (if you haven't stripped those). On the other hand, some tools are still confused even with this metadata. e.g. this fixes `gdb`, but not `perf`. Currently only implemented for ELF. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/checkasm/x86/checkasm.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/checkasm/x86/checkasm.asm b/tests/checkasm/x86/checkasm.asm
index 52d10aec5c..55212fc24b 100644
--- a/tests/checkasm/x86/checkasm.asm
+++ b/tests/checkasm/x86/checkasm.asm
@@ -66,14 +66,14 @@ cextern fail_func
;-----------------------------------------------------------------------------
cglobal stack_clobber, 1,2
; Clobber the stack with junk below the stack pointer
- %define size (max_args+6)*8
- SUB rsp, size
- mov r1, size-8
+ %define argsize (max_args+6)*8
+ SUB rsp, argsize
+ mov r1, argsize-8
.loop:
mov [rsp+r1], r0
sub r1, 8
jge .loop
- ADD rsp, size
+ ADD rsp, argsize
RET
%if WIN64