Allow symbols in MEMORY region specification
[deliverable/binutils-gdb.git] / gas / config / tc-m68hc11.c
index 46e6a941fb35858ce0f4686be237a749db03a2ad..a12d106b1e30c67a8bd8b33eecf5e3a833fa46ca 100644 (file)
@@ -1,7 +1,5 @@
 /* tc-m68hc11.c -- Assembler code for the Motorola 68HC11 & 68HC12.
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-   2011, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 1999-2015 Free Software Foundation, Inc.
    Written by Stephane Carrez (stcarrez@nerim.fr)
    XGATE and S12X added by James Murray (jsm@jsm-net.demon.co.uk)
 
@@ -2219,9 +2217,9 @@ build_indexed_byte (operand *op, int format ATTRIBUTE_UNUSED, int move_insn)
                  byte <<= 3;
                  byte |= 0xe2;
                  number_to_chars_bigendian (f, byte, 1);
+                 f = frag_more (2);
                  fix_new (frag_now, f - frag_now->fr_literal, 2,
                           sym, off, 0, BFD_RELOC_M68HC12_16B);
-                 f = frag_more (2);
                  return 1;
                }
              else
@@ -3960,7 +3958,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, asection *sec ATTRIBUTE_UNUSED,
   char *buffer_address = fragP->fr_literal;
 
   /* Address in object code of the displacement.  */
-  register int object_address = fragP->fr_fix + fragP->fr_address;
+  int object_address = fragP->fr_fix + fragP->fr_address;
 
   buffer_address += fragP->fr_fix;
 
@@ -4459,8 +4457,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
       if (value < 0)
         value += 65536;
 
-      where[1] = (value >> 8);
-      where[2] = (value & 0xff);
+      where[0] = (value >> 8);
+      where[1] = (value & 0xff);
       break;
 
     case BFD_RELOC_M68HC11_RL_JUMP:
This page took 0.023649 seconds and 4 git commands to generate.