x86emitter: there are 16 int registers for all sizes.

This commit is contained in:
Gregory Hainaut 2016-01-21 22:34:13 +01:00
parent 9e773ff980
commit 6dd83d3cba
1 changed files with 11 additions and 7 deletions

View File

@ -152,16 +152,20 @@ const xRegister8
const xRegisterCL cl; const xRegisterCL cl;
const char *const x86_regnames_gpr8[8] = const char *const x86_regnames_gpr8[] =
{ {
"al", "cl", "dl", "bl", "al", "cl", "dl", "bl",
"ah", "ch", "dh", "bh" "ah", "ch", "dh", "bh"
"b8", "b9", "b10", "b11",
"b12", "b13", "b14", "b15"
}; };
const char *const x86_regnames_gpr16[] = const char *const x86_regnames_gpr16[] =
{ {
"ax", "cx", "dx", "bx", "ax", "cx", "dx", "bx",
"sp", "bp", "si", "di" "sp", "bp", "si", "di"
"h8", "h9", "h10", "h11",
"h12", "h13", "h14", "h15"
}; };
const char *const x86_regnames_gpr32[] = const char *const x86_regnames_gpr32[] =
@ -201,7 +205,7 @@ const char* xRegisterBase::GetName()
// bad error? Return a "big" error string. Might break formatting of register tables // bad error? Return a "big" error string. Might break formatting of register tables
// but that's the least of your worries if you see this baby. // but that's the least of your worries if you see this baby.
if( Id >= 8 || Id <= -3 ) return "!Register index out of range!"; if( Id >= iREGCNT_GPR || Id < 0 ) return "!Register index out of range!";
switch( GetOperandSize() ) switch( GetOperandSize() )
{ {