kvisc/vm/pc/regs.h

38 lines
723 B
C
Raw Normal View History

2019-05-29 16:57:22 +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.
2019-06-14 12:46:09 +02:00
// Register types
enum
{
2019-07-11 18:34:21 +02:00
GPR = 0, // Non-reserved
RES = 1 << 0, // Reserved for insternal use
SYS = 1 << 1, // Reserved for supervisor mode
2019-06-14 12:46:09 +02:00
};
// CR0 register
enum
{
2019-06-19 21:41:22 +02:00
IF = 1 << 0, // Interrupts-enable flag
UF = 1 << 1, // User-mode flag
2019-06-14 12:46:09 +02:00
};
struct reg_t
{
char *name;
ulong flags;
};
2019-05-29 16:57:22 +02:00
enum
{
2019-09-08 19:04:07 +02:00
EAX, EBX, ECX, EDX, ESI, EDI, AX0, AX1,
AX2, AX3, AX4, AX5, NX0, NX1, NX2, NX3,
NX4, NX5, NX6, NX7, NX8, GRP, TRP, SRP,
TMP, RAD, CR0, CR1, EIP, EBP, ESP, EZX,
2019-07-01 00:45:08 +02:00
NREGS
};
2019-07-24 16:52:26 +02:00
#define _fc0 ctx->ninstrs
#define _rpc ctx->cur_pc
2019-05-29 16:57:22 +02:00