implemented access to opmask AVX-512 registers from debugger, fixed enhdbg buffer overflow with EVEX enabled

This commit is contained in:
Stanislav Shwartsman 2014-02-11 20:51:18 +00:00
parent 41f926628c
commit 09414f2f4b
9 changed files with 1903 additions and 1816 deletions

View File

@ -3823,6 +3823,17 @@ void bx_dbg_set_rip_value(bx_address value)
BX_CPU(dbg_cpu)->dbg_set_eip(value);
}
Bit64u bx_dbg_get_opmask_value(unsigned reg)
{
#if BX_SUPPORT_EVEX
if (reg < 8)
return BX_CPU(dbg_cpu)->get_opmask(reg);
#endif
dbg_printf("Unknown OPMASK register k%d !!!\n", reg);
return 0;
}
Bit16u bx_dbg_get_selector_value(unsigned int seg_no)
{
bx_dbg_sreg_t sreg;

View File

@ -173,6 +173,17 @@ typedef enum {
#endif
typedef enum {
BX_DBG_REG_MASK_K0,
BX_DBG_REG_MASK_K1,
BX_DBG_REG_MASK_K2,
BX_DBG_REG_MASK_K3,
BX_DBG_REG_MASK_K4,
BX_DBG_REG_MASK_K5,
BX_DBG_REG_MASK_K6,
BX_DBG_REG_MASK_K7
} OpmaskRegs;
typedef enum
{
bkRegular,
@ -214,6 +225,7 @@ Bit8u bx_dbg_get_reg8h_value(unsigned reg);
Bit16u bx_dbg_get_reg16_value(unsigned reg);
Bit32u bx_dbg_get_reg32_value(unsigned reg);
Bit64u bx_dbg_get_reg64_value(unsigned reg);
Bit64u bx_dbg_get_opmask_value(unsigned reg);
void bx_dbg_set_reg8l_value(unsigned reg, Bit8u value);
void bx_dbg_set_reg8h_value(unsigned reg, Bit8u value);
void bx_dbg_set_reg16_value(unsigned reg, Bit16u value);

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,14 @@ static unsigned lex_input_size = 0;
{ bxlval.sval = strdup(bxtext); return(BX_TOKEN_GENERIC); }
#endif
#if BX_SUPPORT_EVEX
#define EVEX_OPMASK_REG(reg) \
{ bxlval.uval = reg; return(BX_TOKEN_OPMASK_REG); }
#else
#define EVEX_OPMASK_REG(reg) \
{ bxlval.sval = strdup(bxtext); return(BX_TOKEN_GENERIC); }
#endif
%}
%x EXAMINE
@ -218,6 +226,7 @@ ss { bxlval.uval = BX_DBG_SREG_SS; return(BX_TOKEN_SS); }
ds { bxlval.uval = BX_DBG_SREG_DS; return(BX_TOKEN_DS); }
fs { bxlval.uval = BX_DBG_SREG_FS; return(BX_TOKEN_FS); }
gs { bxlval.uval = BX_DBG_SREG_GS; return(BX_TOKEN_GS); }
k[0-7] { EVEX_OPMASK_REG(bxtext[1] - '0'); }
flags|eflags { bxlval.uval = 0; return (BX_TOKEN_FLAGS); }
h|help { bxlval.sval = strdup(bxtext); return(BX_TOKEN_HELP); }
\? |

File diff suppressed because it is too large Load Diff

View File

@ -57,99 +57,100 @@ extern int bxdebug;
BX_TOKEN_DS = 266,
BX_TOKEN_FS = 267,
BX_TOKEN_GS = 268,
BX_TOKEN_FLAGS = 269,
BX_TOKEN_ON = 270,
BX_TOKEN_OFF = 271,
BX_TOKEN_CONTINUE = 272,
BX_TOKEN_STEPN = 273,
BX_TOKEN_STEP_OVER = 274,
BX_TOKEN_SET = 275,
BX_TOKEN_DEBUGGER = 276,
BX_TOKEN_LIST_BREAK = 277,
BX_TOKEN_VBREAKPOINT = 278,
BX_TOKEN_LBREAKPOINT = 279,
BX_TOKEN_PBREAKPOINT = 280,
BX_TOKEN_DEL_BREAKPOINT = 281,
BX_TOKEN_ENABLE_BREAKPOINT = 282,
BX_TOKEN_DISABLE_BREAKPOINT = 283,
BX_TOKEN_INFO = 284,
BX_TOKEN_QUIT = 285,
BX_TOKEN_R = 286,
BX_TOKEN_REGS = 287,
BX_TOKEN_CPU = 288,
BX_TOKEN_FPU = 289,
BX_TOKEN_MMX = 290,
BX_TOKEN_XMM = 291,
BX_TOKEN_YMM = 292,
BX_TOKEN_ZMM = 293,
BX_TOKEN_AVX = 294,
BX_TOKEN_IDT = 295,
BX_TOKEN_IVT = 296,
BX_TOKEN_GDT = 297,
BX_TOKEN_LDT = 298,
BX_TOKEN_TSS = 299,
BX_TOKEN_TAB = 300,
BX_TOKEN_ALL = 301,
BX_TOKEN_LINUX = 302,
BX_TOKEN_DEBUG_REGS = 303,
BX_TOKEN_CONTROL_REGS = 304,
BX_TOKEN_SEGMENT_REGS = 305,
BX_TOKEN_EXAMINE = 306,
BX_TOKEN_XFORMAT = 307,
BX_TOKEN_DISFORMAT = 308,
BX_TOKEN_RESTORE = 309,
BX_TOKEN_WRITEMEM = 310,
BX_TOKEN_SETPMEM = 311,
BX_TOKEN_SYMBOLNAME = 312,
BX_TOKEN_QUERY = 313,
BX_TOKEN_PENDING = 314,
BX_TOKEN_TAKE = 315,
BX_TOKEN_DMA = 316,
BX_TOKEN_IRQ = 317,
BX_TOKEN_TLB = 318,
BX_TOKEN_HEX = 319,
BX_TOKEN_DISASM = 320,
BX_TOKEN_INSTRUMENT = 321,
BX_TOKEN_STRING = 322,
BX_TOKEN_STOP = 323,
BX_TOKEN_DOIT = 324,
BX_TOKEN_CRC = 325,
BX_TOKEN_TRACE = 326,
BX_TOKEN_TRACEREG = 327,
BX_TOKEN_TRACEMEM = 328,
BX_TOKEN_SWITCH_MODE = 329,
BX_TOKEN_SIZE = 330,
BX_TOKEN_PTIME = 331,
BX_TOKEN_TIMEBP_ABSOLUTE = 332,
BX_TOKEN_TIMEBP = 333,
BX_TOKEN_MODEBP = 334,
BX_TOKEN_VMEXITBP = 335,
BX_TOKEN_PRINT_STACK = 336,
BX_TOKEN_WATCH = 337,
BX_TOKEN_UNWATCH = 338,
BX_TOKEN_READ = 339,
BX_TOKEN_WRITE = 340,
BX_TOKEN_SHOW = 341,
BX_TOKEN_LOAD_SYMBOLS = 342,
BX_TOKEN_SYMBOLS = 343,
BX_TOKEN_LIST_SYMBOLS = 344,
BX_TOKEN_GLOBAL = 345,
BX_TOKEN_WHERE = 346,
BX_TOKEN_PRINT_STRING = 347,
BX_TOKEN_NUMERIC = 348,
BX_TOKEN_PAGE = 349,
BX_TOKEN_HELP = 350,
BX_TOKEN_CALC = 351,
BX_TOKEN_DEVICE = 352,
BX_TOKEN_GENERIC = 353,
BX_TOKEN_RSHIFT = 354,
BX_TOKEN_LSHIFT = 355,
BX_TOKEN_REG_IP = 356,
BX_TOKEN_REG_EIP = 357,
BX_TOKEN_REG_RIP = 358,
INDIRECT = 359,
NEG = 360,
NOT = 361
BX_TOKEN_OPMASK_REG = 269,
BX_TOKEN_FLAGS = 270,
BX_TOKEN_ON = 271,
BX_TOKEN_OFF = 272,
BX_TOKEN_CONTINUE = 273,
BX_TOKEN_STEPN = 274,
BX_TOKEN_STEP_OVER = 275,
BX_TOKEN_SET = 276,
BX_TOKEN_DEBUGGER = 277,
BX_TOKEN_LIST_BREAK = 278,
BX_TOKEN_VBREAKPOINT = 279,
BX_TOKEN_LBREAKPOINT = 280,
BX_TOKEN_PBREAKPOINT = 281,
BX_TOKEN_DEL_BREAKPOINT = 282,
BX_TOKEN_ENABLE_BREAKPOINT = 283,
BX_TOKEN_DISABLE_BREAKPOINT = 284,
BX_TOKEN_INFO = 285,
BX_TOKEN_QUIT = 286,
BX_TOKEN_R = 287,
BX_TOKEN_REGS = 288,
BX_TOKEN_CPU = 289,
BX_TOKEN_FPU = 290,
BX_TOKEN_MMX = 291,
BX_TOKEN_XMM = 292,
BX_TOKEN_YMM = 293,
BX_TOKEN_ZMM = 294,
BX_TOKEN_AVX = 295,
BX_TOKEN_IDT = 296,
BX_TOKEN_IVT = 297,
BX_TOKEN_GDT = 298,
BX_TOKEN_LDT = 299,
BX_TOKEN_TSS = 300,
BX_TOKEN_TAB = 301,
BX_TOKEN_ALL = 302,
BX_TOKEN_LINUX = 303,
BX_TOKEN_DEBUG_REGS = 304,
BX_TOKEN_CONTROL_REGS = 305,
BX_TOKEN_SEGMENT_REGS = 306,
BX_TOKEN_EXAMINE = 307,
BX_TOKEN_XFORMAT = 308,
BX_TOKEN_DISFORMAT = 309,
BX_TOKEN_RESTORE = 310,
BX_TOKEN_WRITEMEM = 311,
BX_TOKEN_SETPMEM = 312,
BX_TOKEN_SYMBOLNAME = 313,
BX_TOKEN_QUERY = 314,
BX_TOKEN_PENDING = 315,
BX_TOKEN_TAKE = 316,
BX_TOKEN_DMA = 317,
BX_TOKEN_IRQ = 318,
BX_TOKEN_TLB = 319,
BX_TOKEN_HEX = 320,
BX_TOKEN_DISASM = 321,
BX_TOKEN_INSTRUMENT = 322,
BX_TOKEN_STRING = 323,
BX_TOKEN_STOP = 324,
BX_TOKEN_DOIT = 325,
BX_TOKEN_CRC = 326,
BX_TOKEN_TRACE = 327,
BX_TOKEN_TRACEREG = 328,
BX_TOKEN_TRACEMEM = 329,
BX_TOKEN_SWITCH_MODE = 330,
BX_TOKEN_SIZE = 331,
BX_TOKEN_PTIME = 332,
BX_TOKEN_TIMEBP_ABSOLUTE = 333,
BX_TOKEN_TIMEBP = 334,
BX_TOKEN_MODEBP = 335,
BX_TOKEN_VMEXITBP = 336,
BX_TOKEN_PRINT_STACK = 337,
BX_TOKEN_WATCH = 338,
BX_TOKEN_UNWATCH = 339,
BX_TOKEN_READ = 340,
BX_TOKEN_WRITE = 341,
BX_TOKEN_SHOW = 342,
BX_TOKEN_LOAD_SYMBOLS = 343,
BX_TOKEN_SYMBOLS = 344,
BX_TOKEN_LIST_SYMBOLS = 345,
BX_TOKEN_GLOBAL = 346,
BX_TOKEN_WHERE = 347,
BX_TOKEN_PRINT_STRING = 348,
BX_TOKEN_NUMERIC = 349,
BX_TOKEN_PAGE = 350,
BX_TOKEN_HELP = 351,
BX_TOKEN_CALC = 352,
BX_TOKEN_DEVICE = 353,
BX_TOKEN_GENERIC = 354,
BX_TOKEN_RSHIFT = 355,
BX_TOKEN_LSHIFT = 356,
BX_TOKEN_REG_IP = 357,
BX_TOKEN_REG_EIP = 358,
BX_TOKEN_REG_RIP = 359,
INDIRECT = 360,
NEG = 361,
NOT = 362
};
#endif
/* Tokens. */
@ -164,99 +165,100 @@ extern int bxdebug;
#define BX_TOKEN_DS 266
#define BX_TOKEN_FS 267
#define BX_TOKEN_GS 268
#define BX_TOKEN_FLAGS 269
#define BX_TOKEN_ON 270
#define BX_TOKEN_OFF 271
#define BX_TOKEN_CONTINUE 272
#define BX_TOKEN_STEPN 273
#define BX_TOKEN_STEP_OVER 274
#define BX_TOKEN_SET 275
#define BX_TOKEN_DEBUGGER 276
#define BX_TOKEN_LIST_BREAK 277
#define BX_TOKEN_VBREAKPOINT 278
#define BX_TOKEN_LBREAKPOINT 279
#define BX_TOKEN_PBREAKPOINT 280
#define BX_TOKEN_DEL_BREAKPOINT 281
#define BX_TOKEN_ENABLE_BREAKPOINT 282
#define BX_TOKEN_DISABLE_BREAKPOINT 283
#define BX_TOKEN_INFO 284
#define BX_TOKEN_QUIT 285
#define BX_TOKEN_R 286
#define BX_TOKEN_REGS 287
#define BX_TOKEN_CPU 288
#define BX_TOKEN_FPU 289
#define BX_TOKEN_MMX 290
#define BX_TOKEN_XMM 291
#define BX_TOKEN_YMM 292
#define BX_TOKEN_ZMM 293
#define BX_TOKEN_AVX 294
#define BX_TOKEN_IDT 295
#define BX_TOKEN_IVT 296
#define BX_TOKEN_GDT 297
#define BX_TOKEN_LDT 298
#define BX_TOKEN_TSS 299
#define BX_TOKEN_TAB 300
#define BX_TOKEN_ALL 301
#define BX_TOKEN_LINUX 302
#define BX_TOKEN_DEBUG_REGS 303
#define BX_TOKEN_CONTROL_REGS 304
#define BX_TOKEN_SEGMENT_REGS 305
#define BX_TOKEN_EXAMINE 306
#define BX_TOKEN_XFORMAT 307
#define BX_TOKEN_DISFORMAT 308
#define BX_TOKEN_RESTORE 309
#define BX_TOKEN_WRITEMEM 310
#define BX_TOKEN_SETPMEM 311
#define BX_TOKEN_SYMBOLNAME 312
#define BX_TOKEN_QUERY 313
#define BX_TOKEN_PENDING 314
#define BX_TOKEN_TAKE 315
#define BX_TOKEN_DMA 316
#define BX_TOKEN_IRQ 317
#define BX_TOKEN_TLB 318
#define BX_TOKEN_HEX 319
#define BX_TOKEN_DISASM 320
#define BX_TOKEN_INSTRUMENT 321
#define BX_TOKEN_STRING 322
#define BX_TOKEN_STOP 323
#define BX_TOKEN_DOIT 324
#define BX_TOKEN_CRC 325
#define BX_TOKEN_TRACE 326
#define BX_TOKEN_TRACEREG 327
#define BX_TOKEN_TRACEMEM 328
#define BX_TOKEN_SWITCH_MODE 329
#define BX_TOKEN_SIZE 330
#define BX_TOKEN_PTIME 331
#define BX_TOKEN_TIMEBP_ABSOLUTE 332
#define BX_TOKEN_TIMEBP 333
#define BX_TOKEN_MODEBP 334
#define BX_TOKEN_VMEXITBP 335
#define BX_TOKEN_PRINT_STACK 336
#define BX_TOKEN_WATCH 337
#define BX_TOKEN_UNWATCH 338
#define BX_TOKEN_READ 339
#define BX_TOKEN_WRITE 340
#define BX_TOKEN_SHOW 341
#define BX_TOKEN_LOAD_SYMBOLS 342
#define BX_TOKEN_SYMBOLS 343
#define BX_TOKEN_LIST_SYMBOLS 344
#define BX_TOKEN_GLOBAL 345
#define BX_TOKEN_WHERE 346
#define BX_TOKEN_PRINT_STRING 347
#define BX_TOKEN_NUMERIC 348
#define BX_TOKEN_PAGE 349
#define BX_TOKEN_HELP 350
#define BX_TOKEN_CALC 351
#define BX_TOKEN_DEVICE 352
#define BX_TOKEN_GENERIC 353
#define BX_TOKEN_RSHIFT 354
#define BX_TOKEN_LSHIFT 355
#define BX_TOKEN_REG_IP 356
#define BX_TOKEN_REG_EIP 357
#define BX_TOKEN_REG_RIP 358
#define INDIRECT 359
#define NEG 360
#define NOT 361
#define BX_TOKEN_OPMASK_REG 269
#define BX_TOKEN_FLAGS 270
#define BX_TOKEN_ON 271
#define BX_TOKEN_OFF 272
#define BX_TOKEN_CONTINUE 273
#define BX_TOKEN_STEPN 274
#define BX_TOKEN_STEP_OVER 275
#define BX_TOKEN_SET 276
#define BX_TOKEN_DEBUGGER 277
#define BX_TOKEN_LIST_BREAK 278
#define BX_TOKEN_VBREAKPOINT 279
#define BX_TOKEN_LBREAKPOINT 280
#define BX_TOKEN_PBREAKPOINT 281
#define BX_TOKEN_DEL_BREAKPOINT 282
#define BX_TOKEN_ENABLE_BREAKPOINT 283
#define BX_TOKEN_DISABLE_BREAKPOINT 284
#define BX_TOKEN_INFO 285
#define BX_TOKEN_QUIT 286
#define BX_TOKEN_R 287
#define BX_TOKEN_REGS 288
#define BX_TOKEN_CPU 289
#define BX_TOKEN_FPU 290
#define BX_TOKEN_MMX 291
#define BX_TOKEN_XMM 292
#define BX_TOKEN_YMM 293
#define BX_TOKEN_ZMM 294
#define BX_TOKEN_AVX 295
#define BX_TOKEN_IDT 296
#define BX_TOKEN_IVT 297
#define BX_TOKEN_GDT 298
#define BX_TOKEN_LDT 299
#define BX_TOKEN_TSS 300
#define BX_TOKEN_TAB 301
#define BX_TOKEN_ALL 302
#define BX_TOKEN_LINUX 303
#define BX_TOKEN_DEBUG_REGS 304
#define BX_TOKEN_CONTROL_REGS 305
#define BX_TOKEN_SEGMENT_REGS 306
#define BX_TOKEN_EXAMINE 307
#define BX_TOKEN_XFORMAT 308
#define BX_TOKEN_DISFORMAT 309
#define BX_TOKEN_RESTORE 310
#define BX_TOKEN_WRITEMEM 311
#define BX_TOKEN_SETPMEM 312
#define BX_TOKEN_SYMBOLNAME 313
#define BX_TOKEN_QUERY 314
#define BX_TOKEN_PENDING 315
#define BX_TOKEN_TAKE 316
#define BX_TOKEN_DMA 317
#define BX_TOKEN_IRQ 318
#define BX_TOKEN_TLB 319
#define BX_TOKEN_HEX 320
#define BX_TOKEN_DISASM 321
#define BX_TOKEN_INSTRUMENT 322
#define BX_TOKEN_STRING 323
#define BX_TOKEN_STOP 324
#define BX_TOKEN_DOIT 325
#define BX_TOKEN_CRC 326
#define BX_TOKEN_TRACE 327
#define BX_TOKEN_TRACEREG 328
#define BX_TOKEN_TRACEMEM 329
#define BX_TOKEN_SWITCH_MODE 330
#define BX_TOKEN_SIZE 331
#define BX_TOKEN_PTIME 332
#define BX_TOKEN_TIMEBP_ABSOLUTE 333
#define BX_TOKEN_TIMEBP 334
#define BX_TOKEN_MODEBP 335
#define BX_TOKEN_VMEXITBP 336
#define BX_TOKEN_PRINT_STACK 337
#define BX_TOKEN_WATCH 338
#define BX_TOKEN_UNWATCH 339
#define BX_TOKEN_READ 340
#define BX_TOKEN_WRITE 341
#define BX_TOKEN_SHOW 342
#define BX_TOKEN_LOAD_SYMBOLS 343
#define BX_TOKEN_SYMBOLS 344
#define BX_TOKEN_LIST_SYMBOLS 345
#define BX_TOKEN_GLOBAL 346
#define BX_TOKEN_WHERE 347
#define BX_TOKEN_PRINT_STRING 348
#define BX_TOKEN_NUMERIC 349
#define BX_TOKEN_PAGE 350
#define BX_TOKEN_HELP 351
#define BX_TOKEN_CALC 352
#define BX_TOKEN_DEVICE 353
#define BX_TOKEN_GENERIC 354
#define BX_TOKEN_RSHIFT 355
#define BX_TOKEN_LSHIFT 356
#define BX_TOKEN_REG_IP 357
#define BX_TOKEN_REG_EIP 358
#define BX_TOKEN_REG_RIP 359
#define INDIRECT 360
#define NEG 361
#define NOT 362
@ -272,7 +274,7 @@ typedef union YYSTYPE
/* Line 2053 of yacc.c */
#line 276 "y.tab.h"
#line 278 "y.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */

View File

@ -33,6 +33,7 @@
%token <uval> BX_TOKEN_DS
%token <uval> BX_TOKEN_FS
%token <uval> BX_TOKEN_GS
%token <uval> BX_TOKEN_OPMASK_REG
%token <uval> BX_TOKEN_FLAGS
%token <bval> BX_TOKEN_ON
%token <bval> BX_TOKEN_OFF
@ -1195,11 +1196,11 @@ help_command:
| BX_TOKEN_HELP BX_TOKEN_CALC '\n'
{
dbg_printf("calc|? <expr> - calculate a expression and display the result.\n");
dbg_printf(" 'expr' can reference any general-purpose and segment\n");
dbg_printf(" 'expr' can reference any general-purpose, opmask and segment\n");
dbg_printf(" registers, use any arithmetic and logic operations, and\n");
dbg_printf(" also the special ':' operator which computes the linear\n");
dbg_printf(" address for a segment:offset (in real and v86 mode) or\n");
dbg_printf(" of a selector:offset (in protected mode) pair.\n");
dbg_printf(" address of a segment:offset (in real and v86 mode) or of\n");
dbg_printf(" a selector:offset (in protected mode) pair.\n");
free($1);free($2);
}
| BX_TOKEN_HELP BX_TOKEN_HELP '\n'
@ -1228,6 +1229,7 @@ BX_TOKEN_NONSEG_REG:
| BX_TOKEN_16B_REG
| BX_TOKEN_32B_REG
| BX_TOKEN_64B_REG
| BX_TOKEN_OPMASK_REG
{ $$=$1; }
;
@ -1240,6 +1242,7 @@ vexpression:
| BX_TOKEN_16B_REG { $$ = bx_dbg_get_reg16_value($1); }
| BX_TOKEN_32B_REG { $$ = bx_dbg_get_reg32_value($1); }
| BX_TOKEN_64B_REG { $$ = bx_dbg_get_reg64_value($1); }
| BX_TOKEN_OPMASK_REG { $$ = bx_dbg_get_opmask_value($1); }
| BX_TOKEN_SEGREG { $$ = bx_dbg_get_selector_value($1); }
| BX_TOKEN_REG_IP { $$ = bx_dbg_get_ip (); }
| BX_TOKEN_REG_EIP { $$ = bx_dbg_get_eip(); }
@ -1268,6 +1271,7 @@ expression:
| BX_TOKEN_16B_REG { $$ = bx_dbg_get_reg16_value($1); }
| BX_TOKEN_32B_REG { $$ = bx_dbg_get_reg32_value($1); }
| BX_TOKEN_64B_REG { $$ = bx_dbg_get_reg64_value($1); }
| BX_TOKEN_OPMASK_REG { $$ = bx_dbg_get_opmask_value($1); }
| BX_TOKEN_SEGREG { $$ = bx_dbg_get_selector_value($1); }
| BX_TOKEN_REG_IP { $$ = bx_dbg_get_ip (); }
| BX_TOKEN_REG_EIP { $$ = bx_dbg_get_eip(); }

View File

@ -4801,6 +4801,10 @@ public: // for now...
BX_SMF BX_CPP_INLINE Bit64u get_reg64(unsigned reg);
BX_SMF BX_CPP_INLINE void set_reg64(unsigned reg, Bit64u val);
#endif
#if BX_SUPPORT_EVEX
BX_SMF BX_CPP_INLINE Bit64u get_opmask(unsigned reg);
BX_SMF BX_CPP_INLINE void set_opmask(unsigned reg, Bit64u val);
#endif
#if BX_CPU_LEVEL >= 6
BX_SMF BX_CPP_INLINE unsigned get_cr8();
@ -5220,6 +5224,20 @@ BX_CPP_INLINE void BX_CPU_C::set_reg64(unsigned reg, Bit64u val)
}
#endif
#if BX_SUPPORT_EVEX
BX_CPP_INLINE Bit64u BX_CPU_C::get_opmask(unsigned reg)
{
assert(reg < 8);
return (BX_CPU_THIS_PTR opmask[reg].rrx);
}
BX_CPP_INLINE void BX_CPU_C::set_opmask(unsigned reg, Bit64u val)
{
assert(reg < 8);
BX_CPU_THIS_PTR opmask[reg].rrx = val;
}
#endif
#if BX_CPU_LEVEL >= 6
// CR8 is aliased to APIC->TASK PRIORITY register
// APIC.TPR[7:4] = CR8[3:0]

View File

@ -776,7 +776,7 @@ int FillSSE(int LineCount)
ssetxt[10] = '0'; // I'm putting a hex value in the decimal column -- more room there!
ssetxt[11] = 'x';
strcpy (ssetxt + 28, " : ");
for (int i = 0; i < BX_XMM_REGISTERS; i++)
for (int i = 0; i < /*BX_XMM_REGISTERS*/ 16; i++)
{
if (i >= 10)
{