Implement Intel SMAP instructions
[deliverable/binutils-gdb.git] / gas / config / tc-rl78.c
index 53d3df2f2b619df6fc3813c9fa08a51f9336a87b..bd964dc163003d9222a04c0499230ac3eee68d45 100644 (file)
@@ -554,6 +554,23 @@ rl78_cons_fix_new (fragS * frag,
       return;
     }
 
+  switch (exp->X_md)
+    {
+    case BFD_RELOC_RL78_LO16:
+    case BFD_RELOC_RL78_HI16:
+      if (size != 2)
+       as_bad (_("%%hi16/%%lo16 only applies to .short or .hword"));
+      type = exp->X_md;
+      break;
+    case BFD_RELOC_RL78_HI8:
+      if (size != 1)
+       as_bad (_("%%hi8 only applies to .byte"));
+      type = exp->X_md;
+      break;
+    default:
+      break;
+    }
+
   if (exp->X_op == O_subtract && exp->X_op_symbol)
     {
       if (size != 4 && size != 2 && size != 1)
This page took 0.035224 seconds and 4 git commands to generate.