// 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 }; // FLG register enum { ZF = 1 << 0, // Zero flag SF = 1 << 1, // Sign flag CF = 1 << 4, // Carry flag OF = 1 << 5, // Overflow flag PF = 1 << 8, // Parity flag DF = 1 << 9, // Direction flag }; // CR0 register enum { IF = 1 << 0, // Interrupts-enable flag UF = 1 << 1, // User-mode flag }; struct reg_t { char *name; ulong flags; }; enum { RAX, RBX, RCX, RDX, RSI, RDI, AX0, AX1, AX2, AX3, AX4, AX5, R12, R13, R14, R15, R16, R17, R18, R19, R20, GRP, TRP, SRP, TMP, RAD, CR0, CR1, RIP, RBP, RSP, RZX, NREGS }; #define _fc0 ctx->ninstrs #define _rpc ctx->cur_pc