Get GDB working
Some checks failed
build / matrix_on_mode () (push) Has been cancelled
build / matrix_on_mode (optlinux) (push) Has been cancelled
build / matrix_on_mode (rel) (push) Has been cancelled
build / matrix_on_mode (tiny) (push) Has been cancelled
build / matrix_on_mode (tinylinux) (push) Has been cancelled

You can now say `gdb hello.com.dbg` and it'll work perfectly.
This commit is contained in:
Justine Tunney 2025-03-30 15:25:20 -07:00
parent afc986f741
commit fbc4fcbb71
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
18 changed files with 230 additions and 67 deletions

View file

@ -7,8 +7,8 @@
// @note public domain
// @see en.wikipedia.org/wiki/Sorting_network
djbsort_avx2:
push %rbp
mov %rsp,%rbp
beg
pro
push %r15
push %r14
push %r13
@ -795,11 +795,13 @@ djbsort_avx2:
pop %r13
pop %r14
pop %r15
pop %rbp
epi
ret
end
.endfn djbsort_avx2,globl,hidden
minmax_vector:
beg
cmp $7,%rdx
jg .L13
.L2: test %rdx,%rdx
@ -838,9 +840,11 @@ minmax_vector:
sub $8,%rdx
jne .L7
ret
end
.endfn minmax_vector
int32_twostages_32:
beg
sub $-128,%rdi
.L17: lea -128(%rdi),%rax
test %rsi,%rsi
@ -866,13 +870,14 @@ int32_twostages_32:
add $512,%rdi
jmp .L17
.L21: ret
end
.endfn int32_twostages_32
int32_threestages:
push %rbp
beg
pro
imul $-24,%rdx,%r8
lea 0(,%rdx,8),%rax
mov %rsp,%rbp
push %r15
push %r14
push %r13
@ -961,11 +966,13 @@ int32_threestages:
pop %r13
pop %r14
pop %r15
pop %rbp
epi
ret
end
.endfn int32_threestages
merge16_finish:
beg
vpminsd %ymm1,%ymm0,%ymm3
vpmaxsd %ymm1,%ymm0,%ymm0
vperm2i128 $32,%ymm0,%ymm3,%ymm2
@ -994,9 +1001,11 @@ merge16_finish:
.L31: vmovdqu %ymm2,(%rdi)
vmovdqu %ymm0,32(%rdi)
ret
end
.endfn merge16_finish
int32_sort_2power:
beg
push %r13
lea 16(%rsp),%r13
andq $-32,%rsp
@ -2075,6 +2084,7 @@ int32_sort_2power:
lea -16(%r13),%rsp
pop %r13
ret
end
.endfn int32_sort_2power
.rodata.cst32

View file

@ -32,7 +32,8 @@
// @param rax,rdx,xmm0,xmm1,st0,st1 is return value
// @see test/libc/runtime/gc_test.c
.ftrace1
__gc: .ftrace2
__gc: beg
.ftrace2
#ifdef __x86_64__
@ -47,8 +48,7 @@ __gc: .ftrace2
mov 8(%r8),%r9
mov 16(%r8),%rdi
push 24(%r8)
push %rbp
mov %rsp,%rbp
pro
sub $32,%rsp
mov %rax,-8(%rbp)
mov %rdx,-16(%rbp)
@ -57,7 +57,7 @@ __gc: .ftrace2
movdqa -32(%rbp),%xmm0
mov -16(%rbp),%rdx
mov -8(%rbp),%rax
leave
epi
ret
9: ud2
nop
@ -102,4 +102,5 @@ __gc: .ftrace2
#endif /* __x86_64__ */
end
.endfn __gc,globl,hidden

View file

@ -31,7 +31,9 @@
// @noreturn
.ftrace1
gclongjmp:
beg
.ftrace2
pro
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
@ -65,4 +67,5 @@ gclongjmp:
#else
#error "unsupported architecture"
#endif /* __x86_64__ */
end
.endfn gclongjmp,globl

View file

@ -26,7 +26,7 @@
// @see gclongjmp()
// @see siglongjmp()
.ftrace1
longjmp:
longjmp:beg
.ftrace2
_longjmp:
#ifdef __x86_64__
@ -61,6 +61,7 @@ _longjmp:
#else
#error "unsupported architecture"
#endif
end
.endfn longjmp,globl
.endfn _longjmp,globl
.alias longjmp,siglongjmp

View file

@ -30,8 +30,8 @@
// @note slower than __sysv2nt
// @see NT2SYSV() macro
__nt2sysv:
push %rbp
mov %rsp,%rbp
beg
pro
sub $256,%rsp
push %rbx
push %rdi
@ -48,6 +48,7 @@ __nt2sysv:
pop %rsi
pop %rdi
pop %rbx
leave
epi
ret
end
.endfn __nt2sysv,globl,hidden