i386-dis: Check valid bnd register
Since there are only 4 bnd registers, return "(bad)" for register number > 3. PR binutils/21594 * i386-dis.c (OP_E_register): Check valid bnd register. (OP_G): Likewise.
This commit is contained in:
parent
cd3ea7c69a
commit
0d96e4df48
|
@ -1,3 +1,9 @@
|
||||||
|
2017-06-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR binutils/21594
|
||||||
|
* i386-dis.c (OP_E_register): Check valid bnd register.
|
||||||
|
(OP_G): Likewise.
|
||||||
|
|
||||||
2017-06-15 Nick Clifton <nickc@redhat.com>
|
2017-06-15 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR binutils/21595
|
PR binutils/21595
|
||||||
|
|
|
@ -15025,6 +15025,11 @@ OP_E_register (int bytemode, int sizeflag)
|
||||||
names = address_mode == mode_64bit ? names64 : names32;
|
names = address_mode == mode_64bit ? names64 : names32;
|
||||||
break;
|
break;
|
||||||
case bnd_mode:
|
case bnd_mode:
|
||||||
|
if (reg > 0x3)
|
||||||
|
{
|
||||||
|
oappend ("(bad)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
names = names_bnd;
|
names = names_bnd;
|
||||||
break;
|
break;
|
||||||
case indir_v_mode:
|
case indir_v_mode:
|
||||||
|
@ -15569,6 +15574,11 @@ OP_G (int bytemode, int sizeflag)
|
||||||
oappend (names64[modrm.reg + add]);
|
oappend (names64[modrm.reg + add]);
|
||||||
break;
|
break;
|
||||||
case bnd_mode:
|
case bnd_mode:
|
||||||
|
if (modrm.reg > 0x3)
|
||||||
|
{
|
||||||
|
oappend ("(bad)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
oappend (names_bnd[modrm.reg]);
|
oappend (names_bnd[modrm.reg]);
|
||||||
break;
|
break;
|
||||||
case v_mode:
|
case v_mode:
|
||||||
|
|
Loading…
Reference in New Issue