projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eb1b03d
)
Allow spaces in i386 FP reg names, eg. %st ( 1 ).
author
Alan Modra
<amodra@gmail.com>
Sun, 29 Aug 1999 23:44:27 +0000
(23:44 +0000)
committer
Alan Modra
<amodra@gmail.com>
Sun, 29 Aug 1999 23:44:27 +0000
(23:44 +0000)
gas/ChangeLog
patch
|
blob
|
history
gas/config/tc-i386.c
patch
|
blob
|
history
gas/testsuite/ChangeLog
patch
|
blob
|
history
gas/testsuite/gas/i386/white.l
patch
|
blob
|
history
gas/testsuite/gas/i386/white.s
patch
|
blob
|
history
include/opcode/ChangeLog
patch
|
blob
|
history
include/opcode/i386.h
patch
|
blob
|
history
diff --git
a/gas/ChangeLog
b/gas/ChangeLog
index 8861565713f0d4b23f8ff33c9262945036001934..6727babc23840ae27b8a146c2df11786037fb3f0 100644
(file)
--- a/
gas/ChangeLog
+++ b/
gas/ChangeLog
@@
-1,3
+1,9
@@
+1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ Based on a patch from H.J. Lu <hjl@gnu.org>
+ * config/tc-i386.c (parse_register): Handle FP regs specially.
+ (md_begin): Remove '(' and ')' from register_chars.
+
1999-08-29 Doug Evans <devans@casey.cygnus.com>
* config/tc-m32r.c (md_parse_option): Delete unrecognized option
1999-08-29 Doug Evans <devans@casey.cygnus.com>
* config/tc-m32r.c (md_parse_option): Delete unrecognized option
diff --git
a/gas/config/tc-i386.c
b/gas/config/tc-i386.c
index a2c0bcc4d6e6afdd038b4b4ce78b376a01f21e46..085a4b9b3e779f2ba676a3885dc14a4c04779f02 100644
(file)
--- a/
gas/config/tc-i386.c
+++ b/
gas/config/tc-i386.c
@@
-703,8
+703,6
@@
md_begin ()
#ifdef LEX_AT
identifier_chars['@'] = '@';
#endif
#ifdef LEX_AT
identifier_chars['@'] = '@';
#endif
- register_chars[')'] = ')';
- register_chars['('] = '(';
digit_chars['-'] = '-';
identifier_chars['_'] = '_';
identifier_chars['.'] = '.';
digit_chars['-'] = '-';
identifier_chars['_'] = '_';
identifier_chars['.'] = '.';
@@
-4166,6
+4164,39
@@
parse_register (reg_string, end_op)
r = (const reg_entry *) hash_find (reg_hash, reg_name_given);
r = (const reg_entry *) hash_find (reg_hash, reg_name_given);
+ /* Handle floating point regs, allowing spaces in the (i) part. */
+ if (r == i386_regtab /* %st is first entry of table */)
+ {
+ --s;
+ if (is_space_char (*s))
+ ++s;
+ if (*s == '(')
+ {
+ *p++ = *s++;
+ if (is_space_char (*s))
+ ++s;
+ if (*s >= '0' && *s <= '7')
+ {
+ r = &i386_float_regtab[*s - '0'];
+ *p++ = *s++;
+ if (is_space_char (*s))
+ ++s;
+ if (*s == ')')
+ {
+ *end_op = s + 1;
+ return r;
+ }
+ *p++ = *s;
+ }
+ if (!allow_naked_reg)
+ {
+ *p = '\0';
+ as_bad (_("bad register name `%s'"), reg_name_given);
+ }
+ return (const reg_entry *) NULL;
+ }
+ }
+
if (r == NULL)
{
if (!allow_naked_reg)
if (r == NULL)
{
if (!allow_naked_reg)
diff --git
a/gas/testsuite/ChangeLog
b/gas/testsuite/ChangeLog
index 824253d4064a87d89781011ab88ebdee1083bb3f..2805e2c9fb04e93656f617aa50a4d6779f91769a 100644
(file)
--- a/
gas/testsuite/ChangeLog
+++ b/
gas/testsuite/ChangeLog
@@
-1,3
+1,7
@@
+1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * gas/i386/white.s, gas/i386/white.l: Add space in FP reg tests.
+
Sat Aug 28 00:16:12 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* gas/hppa/basic/basic.exp: Add new tests shift2.s,
Sat Aug 28 00:16:12 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* gas/hppa/basic/basic.exp: Add new tests shift2.s,
diff --git
a/gas/testsuite/gas/i386/white.l
b/gas/testsuite/gas/i386/white.l
index 1ce6161fc985f16ed8609c28d48dd1bb00aaaa3c..c2d9157a2248befb5f5fee982f52442c781a53b6 100644
(file)
--- a/
gas/testsuite/gas/i386/white.l
+++ b/
gas/testsuite/gas/i386/white.l
@@
-19,3
+19,6
@@
GAS LISTING .*
16 0022 66B81300 0000 Mov \$ foo , %eAx
17 .Code32
18 0028 66B81300 mov \$ foo , %ax
16 0022 66B81300 0000 Mov \$ foo , %eAx
17 .Code32
18 0028 66B81300 mov \$ foo , %ax
+ 19
+ 20 002c D9C9 fxch %st \( 1 \)
+ 21 002e D9C9 fxch % st\(1\)
diff --git
a/gas/testsuite/gas/i386/white.s
b/gas/testsuite/gas/i386/white.s
index 3bf50705ff56df9a9de8f1402ef651717a10134d..11eccfbabb91ba95b7cfc302dfc838fe32fb5d0f 100644
(file)
--- a/
gas/testsuite/gas/i386/white.s
+++ b/
gas/testsuite/gas/i386/white.s
@@
-16,3
+16,6
@@
foo: jmpw % es : * ( % ebx )
Mov $ foo , %eAx
.Code32
mov $ foo , %ax
Mov $ foo , %eAx
.Code32
mov $ foo , %ax
+
+ fxch %st ( 1 )
+ fxch % st(1)
diff --git
a/include/opcode/ChangeLog
b/include/opcode/ChangeLog
index d59e716cc46888d97fbdbf3c8ffd1d0a2881a839..ef0da73bff3910d689cb64a95fbe42eaed1949a0 100644
(file)
--- a/
include/opcode/ChangeLog
+++ b/
include/opcode/ChangeLog
@@
-1,3
+1,9
@@
+1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * i386.h (i386_regtab): Move %st to top of table, and split off
+ other fp reg entries.
+ (i386_float_regtab): To here.
+
Sat Aug 28 00:25:25 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Replace 'f' by 'v'. Prefix float register args
Sat Aug 28 00:25:25 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Replace 'f' by 'v'. Prefix float register args
diff --git
a/include/opcode/i386.h
b/include/opcode/i386.h
index 3df27f212df034836651746c201ebee0c76a8944..7e3a56464bb5ca74068810af2fe2d83442743704 100644
(file)
--- a/
include/opcode/i386.h
+++ b/
include/opcode/i386.h
@@
-1061,6
+1061,8
@@
static const template i386_optab[] = {
/* 386 register table */
static const reg_entry i386_regtab[] = {
/* 386 register table */
static const reg_entry i386_regtab[] = {
+ /* make %st first as we test for it */
+ {"st", FloatReg|FloatAcc, 0},
/* 8 bit regs */
{"al", Reg8|Acc, 0},
{"cl", Reg8|ShiftCount, 1},
/* 8 bit regs */
{"al", Reg8|Acc, 0},
{"cl", Reg8|ShiftCount, 1},
@@
-1130,16
+1132,7
@@
static const reg_entry i386_regtab[] = {
{"tr5", Test, 5},
{"tr6", Test, 6},
{"tr7", Test, 7},
{"tr5", Test, 5},
{"tr6", Test, 6},
{"tr7", Test, 7},
- /* float registers */
- {"st(0)", FloatReg|FloatAcc, 0},
- {"st", FloatReg|FloatAcc, 0},
- {"st(1)", FloatReg, 1},
- {"st(2)", FloatReg, 2},
- {"st(3)", FloatReg, 3},
- {"st(4)", FloatReg, 4},
- {"st(5)", FloatReg, 5},
- {"st(6)", FloatReg, 6},
- {"st(7)", FloatReg, 7},
+ /* mmx and simd registers */
{"mm0", RegMMX, 0},
{"mm1", RegMMX, 1},
{"mm2", RegMMX, 2},
{"mm0", RegMMX, 0},
{"mm1", RegMMX, 1},
{"mm2", RegMMX, 2},
@@
-1158,6
+1151,17
@@
static const reg_entry i386_regtab[] = {
{"xmm7", RegXMM, 7}
};
{"xmm7", RegXMM, 7}
};
+static const reg_entry i386_float_regtab[] = {
+ {"st(0)", FloatReg|FloatAcc, 0},
+ {"st(1)", FloatReg, 1},
+ {"st(2)", FloatReg, 2},
+ {"st(3)", FloatReg, 3},
+ {"st(4)", FloatReg, 4},
+ {"st(5)", FloatReg, 5},
+ {"st(6)", FloatReg, 6},
+ {"st(7)", FloatReg, 7}
+};
+
#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
/* segment stuff */
#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
/* segment stuff */