diff options
author | Alan Modra <amodra@gmail.com> | 2004-03-12 07:01:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-03-12 07:01:37 +0000 |
commit | c02908d2c016356ad1027f85b70643c7017dafd2 (patch) | |
tree | acd0ff0d8303fa49de54814b7f9252a8f359144b /opcodes/i386-dis.c | |
parent | 67ba4b3b2283a29e45d440e9d6dee5d531532fbc (diff) | |
download | gdb-c02908d2c016356ad1027f85b70643c7017dafd2.zip gdb-c02908d2c016356ad1027f85b70643c7017dafd2.tar.gz gdb-c02908d2c016356ad1027f85b70643c7017dafd2.tar.bz2 |
opcodes/
* i386-dis.c (grps): Use clflush by default for 0x0fae/7.
(OP_E): Twiddle clflush to sfence here.
gas/testsuite/
* gas/i386/katmai.d: Adjust for clflush change.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index f9a0a9b..067c750 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1426,8 +1426,7 @@ static const struct dis386 grps[][8] = { { "(bad)", XX, XX, XX }, { "lfence", None, XX, XX }, { "mfence", None, XX, XX }, - { "sfence", None, XX, XX }, - /* FIXME: the sfence with memory operand is clflush! */ + { "clflush", None, XX, XX }, }, /* GRP14 */ { @@ -3034,9 +3033,16 @@ OP_E (int bytemode, int sizeflag) used_prefixes |= (prefixes & PREFIX_DATA); break; case 0: - if (!(codep[-2] == 0xAE && codep[-1] == 0xF8 /* sfence */) - && !(codep[-2] == 0xAE && codep[-1] == 0xF0 /* mfence */) - && !(codep[-2] == 0xAE && codep[-1] == 0xe8 /* lfence */)) + if (codep[-2] == 0xAE && codep[-1] == 0xF8) + /* sfence */ + strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence"); + else if (codep[-2] == 0xAE && codep[-1] == 0xF0) + /* mfence */ + ; + else if (codep[-2] == 0xAE && codep[-1] == 0xe8) + /* lfence */ + ; + else BadOp (); /* bad sfence,lea,lds,les,lfs,lgs,lss modrm */ break; default: |