mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
Replace have_hle with hle_prefix
* config/tc-i386.c (_i386_insn): Replace have_hle with hle_prefix. (check_hle): Updated. (md_assemble): Likewise. (parse_insn): Likewise.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2013-02-28 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (_i386_insn): Replace have_hle with hle_prefix.
|
||||||
|
(check_hle): Updated.
|
||||||
|
(md_assemble): Likewise.
|
||||||
|
(parse_insn): Likewise.
|
||||||
|
|
||||||
2013-02-28 H.J. Lu <hongjiu.lu@intel.com>
|
2013-02-28 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config/tc-i386.c (_i386_insn): Add rep_prefix.
|
* config/tc-i386.c (_i386_insn): Add rep_prefix.
|
||||||
|
@ -293,8 +293,8 @@ struct _i386_insn
|
|||||||
/* REP prefix. */
|
/* REP prefix. */
|
||||||
const char *rep_prefix;
|
const char *rep_prefix;
|
||||||
|
|
||||||
/* Have HLE prefix. */
|
/* HLE prefix. */
|
||||||
unsigned int have_hle;
|
const char *hle_prefix;
|
||||||
|
|
||||||
/* Error message. */
|
/* Error message. */
|
||||||
enum i386_error error;
|
enum i386_error error;
|
||||||
@ -3073,20 +3073,13 @@ check_hle (void)
|
|||||||
default:
|
default:
|
||||||
abort ();
|
abort ();
|
||||||
case HLEPrefixNone:
|
case HLEPrefixNone:
|
||||||
if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE)
|
as_bad (_("invalid instruction `%s' after `%s'"),
|
||||||
as_bad (_("invalid instruction `%s' after `xacquire'"),
|
i.tm.name, i.hle_prefix);
|
||||||
i.tm.name);
|
|
||||||
else
|
|
||||||
as_bad (_("invalid instruction `%s' after `xrelease'"),
|
|
||||||
i.tm.name);
|
|
||||||
return 0;
|
return 0;
|
||||||
case HLEPrefixLock:
|
case HLEPrefixLock:
|
||||||
if (i.prefix[LOCK_PREFIX])
|
if (i.prefix[LOCK_PREFIX])
|
||||||
return 1;
|
return 1;
|
||||||
if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE)
|
as_bad (_("missing `lock' with `%s'"), i.hle_prefix);
|
||||||
as_bad (_("missing `lock' with `xacquire'"));
|
|
||||||
else
|
|
||||||
as_bad (_("missing `lock' with `xrelease'"));
|
|
||||||
return 0;
|
return 0;
|
||||||
case HLEPrefixAny:
|
case HLEPrefixAny:
|
||||||
return 1;
|
return 1;
|
||||||
@ -3235,7 +3228,7 @@ md_assemble (char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if HLE prefix is OK. */
|
/* Check if HLE prefix is OK. */
|
||||||
if (i.have_hle && !check_hle ())
|
if (i.hle_prefix && !check_hle ())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Check string instruction segment overrides. */
|
/* Check string instruction segment overrides. */
|
||||||
@ -3439,7 +3432,7 @@ parse_insn (char *line, char *mnemonic)
|
|||||||
return NULL;
|
return NULL;
|
||||||
case PREFIX_REP:
|
case PREFIX_REP:
|
||||||
if (current_templates->start->cpu_flags.bitfield.cpuhle)
|
if (current_templates->start->cpu_flags.bitfield.cpuhle)
|
||||||
i.have_hle = 1;
|
i.hle_prefix = current_templates->start->name;
|
||||||
else
|
else
|
||||||
i.rep_prefix = current_templates->start->name;
|
i.rep_prefix = current_templates->start->name;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user