Limit moxie sto/ldo offsets to 16 bits
[deliverable/binutils-gdb.git] / gas / config / tc-moxie.c
index 02a59b7c7089304340b2b129172d22734c81c62d..fdd100c288f8c37123f1cf9765c56669b72190da 100644 (file)
@@ -404,7 +404,7 @@ md_assemble (char *str)
        iword += (a << 4);
       }
       break;
-    case MOXIE_F1_ABi4:
+    case MOXIE_F1_ABi2:
       iword = opcode->opcode << 8;
       while (ISSPACE (*op_end))
        op_end++;
@@ -426,13 +426,13 @@ md_assemble (char *str)
        op_end++;
 
        op_end = parse_exp_save_ilp (op_end, &arg);
-       offset = frag_more (4);
+       offset = frag_more (2);
        fix_new_exp (frag_now,
                     (offset - frag_now->fr_literal),
-                    4,
+                    2,
                     &arg,
                     0,
-                    BFD_RELOC_32);
+                    BFD_RELOC_16);
 
        if (*op_end != '(')
          {
@@ -458,7 +458,7 @@ md_assemble (char *str)
        iword += (a << 4) + b;
       }
       break;
-    case MOXIE_F1_AiB4:
+    case MOXIE_F1_AiB2:
       iword = opcode->opcode << 8;
       while (ISSPACE (*op_end))
        op_end++;
@@ -468,13 +468,13 @@ md_assemble (char *str)
        int a, b;
 
        op_end = parse_exp_save_ilp (op_end, &arg);
-       offset = frag_more (4);
+       offset = frag_more (2);
        fix_new_exp (frag_now,
                     (offset - frag_now->fr_literal),
-                    4,
+                    2,
                     &arg,
                     0,
-                    BFD_RELOC_32);
+                    BFD_RELOC_16);
 
        if (*op_end != '(')
          {
This page took 0.024627 seconds and 4 git commands to generate.