aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-10-17 10:23:33 +0000
committerNick Clifton <nickc@redhat.com>2003-10-17 10:23:33 +0000
commitd4e2de6bc2c210ede6eb8e24c3da940d4fc0a042 (patch)
treea0117d830e64abd1e632ff573b101e50eb1eaee3 /gas/config
parentece01a639de516f5dec8d869598ba7a017725c88 (diff)
downloadgdb-d4e2de6bc2c210ede6eb8e24c3da940d4fc0a042.zip
gdb-d4e2de6bc2c210ede6eb8e24c3da940d4fc0a042.tar.gz
gdb-d4e2de6bc2c210ede6eb8e24c3da940d4fc0a042.tar.bz2
Fix normal operation for h8300-coff target
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-h8300.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index f383e79..986dd69 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -58,7 +58,7 @@ int Smode;
int Nmode;
int SXmode;
-#define PSIZE (Hmode ? L_32 : L_16)
+#define PSIZE (Hmode && !Nmode ? L_32 : L_16)
int bsize = L_8; /* Default branch displacement. */
@@ -689,7 +689,7 @@ get_operand (ptr, op, direction)
*ptr = parse_exp (src + 1, op);
if (op->exp.X_add_number >= 0x100)
{
- int divisor;
+ int divisor = 1;
op->mode = VECIND;
/* FIXME : 2? or 4? */
@@ -718,7 +718,9 @@ get_operand (ptr, op, direction)
return;
}
- if ((mode & SIZE) != PSIZE)
+ if (((mode & SIZE) != PSIZE)
+ /* For Normal mode accept 16 bit and 32 bit pointer registers. */
+ && (!Nmode || ((mode & SIZE) != L_32)))
as_bad (_("Wrong size pointer register for architecture."));
op->mode = src[0] == '-' ? RDPREDEC : RDPREINC;
@@ -828,7 +830,9 @@ get_operand (ptr, op, direction)
src += len;
if (*src == '+' || *src == '-')
{
- if ((mode & SIZE) != PSIZE)
+ if (((mode & SIZE) != PSIZE)
+ /* For Normal mode accept 16 bit and 32 bit pointer registers. */
+ && (!Nmode || ((mode & SIZE) != L_32)))
as_bad (_("Wrong size pointer register for architecture."));
op->mode = *src == '+' ? RSPOSTINC : RSPOSTDEC;
op->reg = num;
@@ -836,7 +840,9 @@ get_operand (ptr, op, direction)
*ptr = src;
return;
}
- if ((mode & SIZE) != PSIZE)
+ if (((mode & SIZE) != PSIZE)
+ /* For Normal mode accept 16 bit and 32 bit pointer registers. */
+ && (!Nmode || ((mode & SIZE) != L_32)))
as_bad (_("Wrong size pointer register for architecture."));
op->mode = direction | IND | PSIZE;
@@ -1855,6 +1861,7 @@ fix_operand_size (operand, size)
is safe. get_specific() will relax L_24 into L_32 where
necessary. */
if (Hmode
+ && !Nmode
&& (operand->exp.X_add_number < -32768
|| operand->exp.X_add_number > 32767
|| operand->exp.X_add_symbol != 0