Automatic date update in version.in
[deliverable/binutils-gdb.git] / gas / config / tc-pdp11.c
index 065446ab3afa1c89c276121027068372d2d682f2..1be07eaf5938ea2b3c6be0336923f1973bee0784 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-pdp11.c - pdp11-specific -
-   Copyright (C) 2001-2017 Free Software Foundation, Inc.
+   Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -248,6 +248,10 @@ md_apply_fix (fixS *fixP,
 
   switch (fixP->fx_r_type)
     {
+    case BFD_RELOC_8:
+      mask = 0xff;
+      shift = 0;
+      break;
     case BFD_RELOC_16:
     case BFD_RELOC_16_PCREL:
       mask = 0xffff;
@@ -350,10 +354,7 @@ parse_reg (char *str, struct pdp11_code *operand)
       str += 2;
     }
   else
-    {
-      operand->error = _("Bad register name");
-      return str;
-    }
+    operand->error = _("Bad register name");
 
   return str;
 }
@@ -581,9 +582,34 @@ parse_op_noreg (char *str, struct pdp11_code *operand)
 
   if (*str == '@' || *str == '*')
     {
-      str = parse_op_no_deferred (str + 1, operand);
+      /* @(Rn) == @0(Rn): Mode 7, Indexed deferred.
+        Check for auto-increment deferred.  */
+      if (str[1] == '('
+         && str[2] != 0
+         && str[3] != 0
+         && str[4] != 0
+         && str[5] != '+')
+        {
+         /* Change implied to explicit index deferred.  */
+          *str = '0';
+          str = parse_op_no_deferred (str, operand);
+        }
+      else
+        {
+          /* @Rn == (Rn): Register deferred.  */
+          str = parse_reg (str + 1, operand);
+         
+          /* Not @Rn */
+          if (operand->error)
+           {
+             operand->error = NULL;
+             str = parse_op_no_deferred (str, operand);
+           }
+        }
+
       if (operand->error)
        return str;
+
       operand->code |= 010;
     }
   else
This page took 0.023893 seconds and 4 git commands to generate.