2019-08-06 22:47:39 +02:00
|
|
|
; The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
; See the LICENSE file in the project root for more information.
|
|
|
|
|
|
|
|
dumprf:
|
|
|
|
push rbp
|
|
|
|
mov rbp, rsp
|
|
|
|
|
2019-08-08 18:39:12 +02:00
|
|
|
push r12, r13
|
2019-08-06 22:47:39 +02:00
|
|
|
mov r12, ax0
|
2019-08-08 18:39:12 +02:00
|
|
|
mov r13, rsp
|
2019-08-06 22:47:39 +02:00
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $cr1
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $cr0
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rip
|
|
|
|
push rax
|
|
|
|
|
|
|
|
push r12
|
|
|
|
call printf, .dmp1
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $srp
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $trp
|
|
|
|
push rax
|
|
|
|
|
2019-08-14 20:23:05 +02:00
|
|
|
push zero # fixme
|
2019-08-06 22:47:39 +02:00
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rbp
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rsp
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call printf, .dmp2
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $ax5
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $ax4
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $ax3
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $ax2
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $ax1
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $ax0
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call printf, .dmp3
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rdi
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rsi
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rdx
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rcx
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rbx
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $rax
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call printf, .dmp4
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r17
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r16
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r15
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r14
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r13
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r12
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call printf, .dmp5
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r20
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r19
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call RFS.LoadReg, r12, $r18
|
|
|
|
push rax
|
|
|
|
|
|
|
|
call printf, .dmp6
|
|
|
|
|
2019-08-08 18:39:12 +02:00
|
|
|
mov rsp, r13
|
|
|
|
pop r13, r12
|
2019-08-06 22:47:39 +02:00
|
|
|
|
|
|
|
leave
|
|
|
|
ret
|
|
|
|
|
2019-08-14 20:23:05 +02:00
|
|
|
.dmp1 = "Environ #1:\nfrm=0d%d rip=0x%x\ncr0=0x%x cr1=0x%x\n\n"
|
2019-08-06 22:47:39 +02:00
|
|
|
.dmp2 = "Environ #2:\nrsp=0x%x rbp=0x%x ind=0d%d\ngrp=0x%x trp=0x%x srp=0x%x\n\n"
|
2019-08-09 13:57:10 +02:00
|
|
|
.dmp3 = "Argument:\nax0=0x%x ax1=0x%x ax2=0x%x\nax3=0x%x ax4=0x%x ax5=0x%x\n\n"
|
2019-08-06 22:47:39 +02:00
|
|
|
.dmp4 = "Volatile:\nrax=0x%x rbx=0x%x rcx=0x%x\nrdx=0x%x rsi=0x%x rdi=0x%x\n\n"
|
|
|
|
.dmp5 = "Persistent:\nr12=0x%x r13=0x%x r14=0x%x\nr15=0x%x r16=0x%x r17=0x%x\n"
|
|
|
|
.dmp6 = "r18=0x%x r19=0x%x r20=0x%x\n"
|
|
|
|
|