os-k/obj/kaleid/kernel/ke/panic.S

104 lines
1.7 KiB
ArmAsm
Raw Normal View History

2019-01-02 16:33:29 +01:00
.file "panic.c"
.text
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "(no message given)"
.LC1:
.string "double panic!\n"
.LC2:
.string "panic! - "
.text
.p2align 4,,15
.globl StartPanic
.type StartPanic, @function
StartPanic:
.LFB3:
.cfi_startproc
pushq %r13
.cfi_def_cfa_offset 16
.cfi_offset 13, -16
pushq %r12
.cfi_def_cfa_offset 24
.cfi_offset 12, -24
pushq %rbp
.cfi_def_cfa_offset 32
.cfi_offset 6, -32
pushq %rbx
.cfi_def_cfa_offset 40
.cfi_offset 3, -40
movq %rdi, %rbx
subq $8, %rsp
.cfi_def_cfa_offset 48
/APP
# 43 "kaleid/kernel/ke/panic.c" 1
cli
# 0 "" 2
/NO_APP
movabsq $__kstate, %rax
movabsq $stdout, %rbp
movabsq $__panicmsg, %r13
movb $2, (%rax)
movq 0(%rbp), %rdi
movabsq $ClearTermUnlocked, %rax
call *%rax
testq %rbx, %rbx
movabsq $.LC0, %rax
movq 0(%rbp), %rdi
cmove %rax, %rbx
cmpq $0, 0(%r13)
movabsq $PrintOnTermUnlocked, %r12
je .L3
movabsq $.LC1, %rsi
call *%r12
/APP
# 55 "kaleid/kernel/ke/panic.c" 1
hlt
# 0 "" 2
/NO_APP
.L3:
movabsq $.LC2, %rsi
movq 0(%rbp), %rdi
movq %rbx, 0(%r13)
call *%r12
movq %rbx, %rsi
movq 0(%rbp), %rdi
call *%r12
.p2align 4,,10
.p2align 3
.L4:
/APP
# 65 "kaleid/kernel/ke/panic.c" 1
hlt
# 0 "" 2
/NO_APP
jmp .L4
.cfi_endproc
.LFE3:
.size StartPanic, .-StartPanic
.p2align 4,,15
.globl _assert_handler
.type _assert_handler, @function
_assert_handler:
.LFB2:
.cfi_startproc
subq $8, %rsp
.cfi_def_cfa_offset 16
/APP
# 30 "kaleid/kernel/ke/panic.c" 1
cli
# 0 "" 2
/NO_APP
movabsq $StartPanic, %rax
call *%rax
.cfi_endproc
.LFE2:
.size _assert_handler, .-_assert_handler
.globl __panicmsg
.section .bss
.align 8
.type __panicmsg, @object
.size __panicmsg, 8
__panicmsg:
.zero 8
.ident "GCC: (GNU) 7.3.0"