kvisc/vm/pc/regs.h

38 lines
723 B
C

// The OS/K Team licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// Register types
enum
{
GPR = 0, // Non-reserved
RES = 1 << 0, // Reserved for insternal use
SYS = 1 << 1, // Reserved for supervisor mode
};
// CR0 register
enum
{
IF = 1 << 0, // Interrupts-enable flag
UF = 1 << 1, // User-mode flag
};
struct reg_t
{
char *name;
ulong flags;
};
enum
{
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,
NREGS
};
#define _fc0 ctx->ninstrs
#define _rpc ctx->cur_pc