aboutsummaryrefslogtreecommitdiff
path: root/gas
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
parentece01a639de516f5dec8d869598ba7a017725c88 (diff)
downloadgdb-d4e2de6bc2c210ede6eb8e24c3da940d4fc0a042.zip
gdb-d4e2de6bc2c210ede6eb8e24c3da940d4fc0a042.tar.gz
gdb-d4e2de6bc2c210ede6eb8e24c3da940d4fc0a042.tar.bz2
Fix normal operation for h8300-coff target
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-h8300.c17
2 files changed, 19 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 51376d8..934d674 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
+
+ * config/tc-h8300.c (PSIZE): Correct for Normal mode.
+ (get_operand): Accept both 16 bit 32 bit registers as pointer
+ registers, when operating in Normal mode.
+ (fix_operand_size): Make default address size 16 for Normal mode.
+
2003-10-17 Ian Lance Taylor <ian@wasabisystems.com>
* config/tc-arm.c (do_iwmmxt_byte_addr): Reject control
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