diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-02-28 21:08:04 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-02-28 21:08:04 +0000 |
commit | 165de32ac8b9a75ababdbd2a8c2802615e47c1b2 (patch) | |
tree | c63a2300dcb84b35f84d809c19b824332e7f4d7b /gas | |
parent | d5de92cf93a7ab93344b88c6bb54d1ebeadaa900 (diff) | |
download | gdb-165de32ac8b9a75ababdbd2a8c2802615e47c1b2.zip gdb-165de32ac8b9a75ababdbd2a8c2802615e47c1b2.tar.gz gdb-165de32ac8b9a75ababdbd2a8c2802615e47c1b2.tar.bz2 |
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 21 |
2 files changed, 14 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 0b9e12e..a547f13 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,12 @@ 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> + * config/tc-i386.c (_i386_insn): Add rep_prefix. (md_assemble): Check if REP prefix is OK. (parse_insn): Remove expecting_string_instruction. Set diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 71155e4..04640d2 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -293,8 +293,8 @@ struct _i386_insn /* REP prefix. */ const char *rep_prefix; - /* Have HLE prefix. */ - unsigned int have_hle; + /* HLE prefix. */ + const char *hle_prefix; /* Error message. */ enum i386_error error; @@ -3073,20 +3073,13 @@ check_hle (void) default: abort (); case HLEPrefixNone: - if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE) - as_bad (_("invalid instruction `%s' after `xacquire'"), - i.tm.name); - else - as_bad (_("invalid instruction `%s' after `xrelease'"), - i.tm.name); + as_bad (_("invalid instruction `%s' after `%s'"), + i.tm.name, i.hle_prefix); return 0; case HLEPrefixLock: if (i.prefix[LOCK_PREFIX]) return 1; - if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE) - as_bad (_("missing `lock' with `xacquire'")); - else - as_bad (_("missing `lock' with `xrelease'")); + as_bad (_("missing `lock' with `%s'"), i.hle_prefix); return 0; case HLEPrefixAny: return 1; @@ -3235,7 +3228,7 @@ md_assemble (char *line) } /* Check if HLE prefix is OK. */ - if (i.have_hle && !check_hle ()) + if (i.hle_prefix && !check_hle ()) return; /* Check string instruction segment overrides. */ @@ -3439,7 +3432,7 @@ parse_insn (char *line, char *mnemonic) return NULL; case PREFIX_REP: if (current_templates->start->cpu_flags.bitfield.cpuhle) - i.have_hle = 1; + i.hle_prefix = current_templates->start->name; else i.rep_prefix = current_templates->start->name; break; |