mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
lots of stuff!
This commit is contained in:
parent
27cb6a1b26
commit
4bccea4a9d
3
Makefile
3
Makefile
@ -5,7 +5,7 @@ KODIR=ka/obj
|
|||||||
|
|
||||||
all: kas
|
all: kas
|
||||||
|
|
||||||
kpc:
|
kpc: vm/Makefile
|
||||||
@cd vm && make --no-print-directory -s verbose=yes
|
@cd vm && make --no-print-directory -s verbose=yes
|
||||||
|
|
||||||
kas: kpc as/regs.lst as/k-as.py
|
kas: kpc as/regs.lst as/k-as.py
|
||||||
@ -24,6 +24,7 @@ clean:
|
|||||||
test: $(KODIR)/a.out
|
test: $(KODIR)/a.out
|
||||||
@vm/k.exe $(KODIR)/a.out $(KODIR)/a.sym
|
@vm/k.exe $(KODIR)/a.out $(KODIR)/a.sym
|
||||||
@rm -f $(KODIR)/a.out $(KODIR)/a.sym
|
@rm -f $(KODIR)/a.out $(KODIR)/a.sym
|
||||||
|
|
||||||
wc: clean
|
wc: clean
|
||||||
@cat $(shell find -name *.[kch]) $(shell find -name *.py) | wc -l
|
@cat $(shell find -name *.[kch]) $(shell find -name *.py) | wc -l
|
||||||
|
|
||||||
|
8
ka/ABI
8
ka/ABI
@ -105,14 +105,14 @@ To call a variadic function, do this:
|
|||||||
add rsp, nargs * 8
|
add rsp, nargs * 8
|
||||||
|
|
||||||
To the variadic function, argN can be accessed the following way:
|
To the variadic function, argN can be accessed the following way:
|
||||||
mov reg, [rbp + N*8 + 16]
|
mov reg, [rbp+N*8+16]
|
||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
mov rax, [rbp + 16] ; arg0
|
mov rax, [rbp+16] ; arg0
|
||||||
mov rdx, [rbp + 24] ; arg1
|
mov rdx, [rbp+24] ; arg1
|
||||||
|
|
||||||
It is recommended to use the reg+reg*imm16+imm16 memory format:
|
It is recommended to use the reg+reg*imm16+imm16 memory format:
|
||||||
mov rax, [rbp + rcx * 8 + 16] ; accesses arg#rcx
|
mov rax, [rbp+rcx*8+16] ; accesses arg#rcx
|
||||||
|
|
||||||
The 'va_list' type can be regarded as a pointer to the
|
The 'va_list' type can be regarded as a pointer to the
|
||||||
variadic function's rbp+16
|
variadic function's rbp+16
|
||||||
|
13
ka/dos.k
13
ka/dos.k
@ -4,16 +4,25 @@
|
|||||||
;
|
;
|
||||||
; Entry point
|
; Entry point
|
||||||
;
|
;
|
||||||
_start:
|
start:
|
||||||
mov rsp, 0x200000
|
mov rsp, 0x200000
|
||||||
xor rbp, rbp
|
xor rbp, rbp
|
||||||
|
|
||||||
call main
|
call main
|
||||||
|
|
||||||
|
; Wait for and print input indefinitely
|
||||||
.1:
|
.1:
|
||||||
hlt
|
scan rax
|
||||||
|
xpause
|
||||||
|
|
||||||
|
test rax, rax
|
||||||
|
j.z .1
|
||||||
|
|
||||||
|
prn rax
|
||||||
jmp .1
|
jmp .1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include "inc/limits.k"
|
include "inc/limits.k"
|
||||||
include "crt/crt.k"
|
include "crt/crt.k"
|
||||||
|
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
; The OS/K Team licenses this file to you under the MIT license.
|
; The OS/K Team licenses this file to you under the MIT license.
|
||||||
; See the LICENSE file in the project root for more information.
|
; See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
|
PrintBootMsg:
|
||||||
|
mov ax0, .bootmsg
|
||||||
|
call print
|
||||||
|
ret
|
||||||
|
|
||||||
|
.bootmsg = "Starting DOS...\n\n"
|
||||||
|
|
||||||
;
|
;
|
||||||
; Main function
|
; Main function
|
||||||
;
|
;
|
||||||
main:
|
main:
|
||||||
call keybd_test
|
call PrintBootMsg
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
; The OS/K Team licenses this file to you under the MIT license.
|
; The OS/K Team licenses this file to you under the MIT license.
|
||||||
; See the LICENSE file in the project root for more information.
|
; See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
keybd_test:
|
speed_test:
|
||||||
.1:
|
utime lx0
|
||||||
scan rax
|
|
||||||
xpause
|
|
||||||
|
|
||||||
test rax, rax
|
mov rcx, ax0
|
||||||
j.z .1
|
nop.rep
|
||||||
|
|
||||||
prn rax
|
utime lx1
|
||||||
jmp .1
|
|
||||||
|
|
||||||
ret
|
mov rax, lx1
|
||||||
|
sub rax, lx0
|
||||||
|
|
||||||
|
stop
|
||||||
|
|
||||||
putc_scroll_test:
|
putc_scroll_test:
|
||||||
mov rdx, 25
|
mov rdx, 25
|
||||||
@ -55,18 +55,14 @@ cpudev_test:
|
|||||||
mov ax1, 1
|
mov ax1, 1
|
||||||
call IDT.AddHandler
|
call IDT.AddHandler
|
||||||
|
|
||||||
trap 0
|
|
||||||
trap 0
|
|
||||||
trap 1
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
trap0_test:
|
trap0_test:
|
||||||
mov rsp, 0x300000
|
mov rsp, 0x300000
|
||||||
mov nx7, rax
|
mov nx7, rax
|
||||||
|
|
||||||
mov ax0, .msg
|
;mov ax0, .msg
|
||||||
call print
|
;call print
|
||||||
|
|
||||||
mov ax0, nx7
|
mov ax0, nx7
|
||||||
call IDT.DoneHandling
|
call IDT.DoneHandling
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
verbose ?= yes
|
verbose ?= yes
|
||||||
OBJDIR = ob
|
OBJDIR = ob
|
||||||
|
|
||||||
FLAGS=-O2 -g -Wall -fno-builtin-log -I.
|
FLAGS=-O2 -g -Wall -fno-builtin-log -I.
|
||||||
|
|
||||||
dv_src = $(shell ls dv/*.c)
|
dv_src = $(shell ls dv/*.c)
|
||||||
@ -39,9 +40,9 @@ $(OBJDIR)/%.o: %.c
|
|||||||
$(OBJDIR)/%.d: %.c
|
$(OBJDIR)/%.d: %.c
|
||||||
@mkdir -p $(shell dirname $@)
|
@mkdir -p $(shell dirname $@)
|
||||||
@cc -I. -MM -MT $(@:%.d=%.o) -MF $@ $<
|
@cc -I. -MM -MT $(@:%.d=%.o) -MF $@ $<
|
||||||
#@if [ $(verbose) = "yes" ]; then \
|
# @if [ $(verbose) = "yes" ]; then \
|
||||||
# echo ${CL2}[$@] ${CL}dependencies generated.${CL3};\
|
# echo ${CL2}[$@] ${CL}dependencies generated.${CL3};\
|
||||||
#fi
|
# fi
|
||||||
|
|
||||||
in/instrs.lst: in/INSTRS in/arch_i.py
|
in/instrs.lst: in/INSTRS in/arch_i.py
|
||||||
@cd in && python3 arch_i.py
|
@cd in && python3 arch_i.py
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
long memdev_getmemoff(ctx_t *ctx, dev_t *dev)
|
long memdev_getmemoff(ctx_t *ctx, dev_t *dev)
|
||||||
{
|
{
|
||||||
|
10
vm/in/INSTRS
10
vm/in/INSTRS
@ -464,6 +464,16 @@ nop
|
|||||||
#
|
#
|
||||||
pause
|
pause
|
||||||
|
|
||||||
|
#
|
||||||
|
# Get timestamp in seconds
|
||||||
|
#
|
||||||
|
time rm
|
||||||
|
|
||||||
|
#
|
||||||
|
# Get timestamp in µseconds
|
||||||
|
#
|
||||||
|
utime rm
|
||||||
|
|
||||||
#
|
#
|
||||||
# CPU Identification Number
|
# CPU Identification Number
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
#include <in/instrs.h>
|
#include <in/instrs.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <in/instrs.h>
|
#include <in/instrs.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include <pc/console.h>
|
#include <pc/console.h>
|
||||||
|
|
||||||
@ -57,6 +58,12 @@ IMPL_OUT;
|
|||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
||||||
IMPL_START_1(time)
|
IMPL_START_1(time)
|
||||||
|
{
|
||||||
|
v1 = time(NULL);
|
||||||
|
}
|
||||||
|
IMPL_OUT;
|
||||||
|
|
||||||
|
IMPL_START_1(utime)
|
||||||
{
|
{
|
||||||
struct timeval time;
|
struct timeval time;
|
||||||
gettimeofday(&time, NULL);
|
gettimeofday(&time, NULL);
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <in/instrs.h>
|
#include <in/instrs.h>
|
||||||
|
|
||||||
|
static volatile long *prev_stk;
|
||||||
|
|
||||||
IMPL_START_1(trap)
|
IMPL_START_1(trap)
|
||||||
{
|
{
|
||||||
if (v1 > 255)
|
if (v1 > 255)
|
||||||
|
11
vm/pc/arch.h
11
vm/pc/arch.h
@ -4,12 +4,15 @@
|
|||||||
#ifndef _ARCH_H
|
#ifndef _ARCH_H
|
||||||
#define _ARCH_H
|
#define _ARCH_H
|
||||||
|
|
||||||
|
//#define NDEBUG 1
|
||||||
|
|
||||||
#define dev_t stddev_t
|
#define dev_t stddev_t
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <setjmp.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@ -32,9 +35,11 @@ typedef struct arch_t arch_t;
|
|||||||
typedef struct dev_t dev_t;
|
typedef struct dev_t dev_t;
|
||||||
|
|
||||||
void logerr(const char *, ...);
|
void logerr(const char *, ...);
|
||||||
void trace(const char *, ...);
|
|
||||||
void vlog(const char *, va_list);
|
void vlog(const char *, va_list);
|
||||||
|
|
||||||
|
// void trace(const char *, ...);
|
||||||
|
#define trace printf
|
||||||
|
|
||||||
#define KARCH_MAJOR 0
|
#define KARCH_MAJOR 0
|
||||||
#define KARCH_MINOR 1
|
#define KARCH_MINOR 1
|
||||||
#define KARCH_REVIS 0
|
#define KARCH_REVIS 0
|
||||||
@ -83,7 +88,7 @@ void disable_stdin_echoing(void);
|
|||||||
#include <pc/mem.h>
|
#include <pc/mem.h>
|
||||||
#include <pc/sym.h>
|
#include <pc/sym.h>
|
||||||
#include <pc/regs.h>
|
#include <pc/regs.h>
|
||||||
#include <pc/decd.h>
|
#include <pc/decode.h>
|
||||||
#include <pc/except.h>
|
#include <pc/except.h>
|
||||||
#include <in/arch_i.h>
|
#include <in/arch_i.h>
|
||||||
|
|
||||||
@ -91,5 +96,7 @@ extern ctx_t main_ctx;
|
|||||||
extern reg_t arch_r[NREGS];
|
extern reg_t arch_r[NREGS];
|
||||||
extern instr_t arch_i[NINSTRS];
|
extern instr_t arch_i[NINSTRS];
|
||||||
|
|
||||||
|
extern size_t rfs_current_idx;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -262,6 +262,8 @@ void console_putc(ctx_t *ctx, char ch)
|
|||||||
{
|
{
|
||||||
scr_rects[y]->y -= 16; // surf->h
|
scr_rects[y]->y -= 16; // surf->h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console_render(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,10 +167,6 @@ void decode(ctx_t *ctx)
|
|||||||
if (sym)
|
if (sym)
|
||||||
trace("0x%lX: %s:\n", pc, sym->name);
|
trace("0x%lX: %s:\n", pc, sym->name);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Instruction counter
|
|
||||||
ctx->ninstrs++;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Process the first word of the instruction
|
// Process the first word of the instruction
|
||||||
//
|
//
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
//----------------------------------------------------------------------------//
|
//----------------------------------------------------------------------------//
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
#include <pc/console.h>
|
#include <pc/console.h>
|
||||||
|
|
||||||
void die(int code)
|
void die(int code)
|
||||||
|
@ -17,7 +17,7 @@ char *cond_suffixes[] =
|
|||||||
#define _ATT_STYLE 0
|
#define _ATT_STYLE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void dump_acc(ctx_t *ctx, acc_t *p);
|
void dump_acc(ctx_t *ctx, acc_t *p);
|
||||||
|
|
||||||
void dump_instr(ctx_t *ctx,
|
void dump_instr(ctx_t *ctx,
|
||||||
instr_t *in,
|
instr_t *in,
|
||||||
@ -28,7 +28,7 @@ void dump_instr(ctx_t *ctx,
|
|||||||
uint cond,
|
uint cond,
|
||||||
ulong pc)
|
ulong pc)
|
||||||
{
|
{
|
||||||
trace("0x%lX:\t", pc);
|
trace("%03lu 0x%lX:\t", ctx->ninstrs, pc);
|
||||||
|
|
||||||
if (lock)
|
if (lock)
|
||||||
trace("lock");
|
trace("lock");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
int dying = 0;
|
int dying = 0;
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ void _except(ctx_t *ctx, int _code, char *fmt, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
ulong handler;
|
ulong handler;
|
||||||
uint code = _code;
|
uint code = _code;
|
||||||
|
volatile char ch;
|
||||||
|
|
||||||
ulong orig_frame;
|
ulong orig_frame;
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ void _except(ctx_t *ctx, int _code, char *fmt, ...)
|
|||||||
|
|
||||||
idt_handling[code]++;
|
idt_handling[code]++;
|
||||||
|
|
||||||
main_loop();
|
longjmp(exc_jmp_buf, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
actually_die:
|
actually_die:
|
||||||
|
@ -25,6 +25,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern int dying;
|
extern int dying;
|
||||||
|
extern jmp_buf exc_jmp_buf;
|
||||||
|
|
||||||
void main_loop(void) __attribute__((__noreturn__));
|
void main_loop(void) __attribute__((__noreturn__));
|
||||||
void _except(ctx_t *, int, char *, ...) __attribute__((__noreturn__));
|
void _except(ctx_t *, int, char *, ...) __attribute__((__noreturn__));
|
||||||
|
12
vm/pc/exec.c
12
vm/pc/exec.c
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <pc/arch.h>
|
#include <pc/arch.h>
|
||||||
|
|
||||||
static bool eval_cond(ctx_t *ctx, uint cond)
|
bool eval_cond(ctx_t *ctx, uint cond)
|
||||||
{
|
{
|
||||||
bool neg = cond & (1 << 4);
|
bool neg = cond & (1 << 4);
|
||||||
bool ok;
|
bool ok;
|
||||||
@ -56,8 +56,12 @@ void exec_instr(ctx_t *ctx,
|
|||||||
bool out;
|
bool out;
|
||||||
ulong r1 = 0, r2 = 0;
|
ulong r1 = 0, r2 = 0;
|
||||||
|
|
||||||
// Debugging
|
// Instruction counter
|
||||||
|
ctx->ninstrs++;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
dump_instr(ctx, in, p1, p2, lock, rep, cond, pc);
|
dump_instr(ctx, in, p1, p2, lock, rep, cond, pc);
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// For REPs we evaluate the condition AFTER running the instruction,
|
// For REPs we evaluate the condition AFTER running the instruction,
|
||||||
@ -112,8 +116,12 @@ do_rep:
|
|||||||
if (rcx == 0)
|
if (rcx == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ctx->ninstrs++;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
// Show that we're REP'ing
|
// Show that we're REP'ing
|
||||||
dump_instr(ctx, in, p1, p2, lock, rep, cond, pc);
|
dump_instr(ctx, in, p1, p2, lock, rep, cond, pc);
|
||||||
|
#endif
|
||||||
|
|
||||||
goto do_rep;
|
goto do_rep;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <pc/arch.h>
|
#include <pc/arch.h>
|
||||||
|
|
||||||
|
/*
|
||||||
void trace(const char *fmt, ...)
|
void trace(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
@ -11,6 +12,7 @@ void trace(const char *fmt, ...)
|
|||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void logerr(const char *fmt, ...)
|
void logerr(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
#include <pc/console.h>
|
#include <pc/console.h>
|
||||||
|
|
||||||
#define FWPROGSIZE (1024 * 1024 * 1024)
|
#define FWPROGSIZE (1024 * 1024 * 1024)
|
||||||
@ -48,11 +48,15 @@ void sigsegv(int _)
|
|||||||
sigcommon();
|
sigcommon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jmp_buf exc_jmp_buf;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Main loop
|
// Main loop
|
||||||
//
|
//
|
||||||
void main_loop(void)
|
void main_loop(void)
|
||||||
{
|
{
|
||||||
|
setjmp(exc_jmp_buf);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Start decoding
|
// Start decoding
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// The OS/K Team licenses this file to you under the MIT license.
|
// The OS/K Team licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
#include <pc/dev.h>
|
#include <pc/device.h>
|
||||||
|
|
||||||
reg_t arch_r[] =
|
reg_t arch_r[] =
|
||||||
{
|
{
|
||||||
@ -79,14 +79,12 @@ reg_t arch_r[] =
|
|||||||
trace("%s=0x%-16lX ", r->name, R(i)); \
|
trace("%s=0x%-16lX ", r->name, R(i)); \
|
||||||
} \
|
} \
|
||||||
|
|
||||||
extern size_t rfs_current_idx;
|
|
||||||
|
|
||||||
void dumpregs(ctx_t *ctx)
|
void dumpregs(ctx_t *ctx)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
reg_t *r;
|
reg_t *r;
|
||||||
|
|
||||||
trace("Current RFRAME index: #%u\n", rfs_current_idx);
|
trace("Current RFRAME index: #%lu\n", rfs_current_idx);
|
||||||
|
|
||||||
DUMPREGS(RAX, RDI);
|
DUMPREGS(RAX, RDI);
|
||||||
DUMPREGS(AX0, AX3);
|
DUMPREGS(AX0, AX3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user