* config/tc-m32c.c (m32c_cons_fix_new): New. Added to support 3
[deliverable/binutils-gdb.git] / gas / config / tc-m32c.c
index 930342294a7dda2589389e2569d5f1616be12fc2..e9ebf34b6ba9c4e66cf051f6f1cbbe16e9acbbc5 100644 (file)
@@ -1018,6 +1018,37 @@ md_cgen_lookup_reloc (const CGEN_INSN *    insn ATTRIBUTE_UNUSED,
   return BFD_RELOC_NONE;
 }
 
+void
+m32c_cons_fix_new (fragS *     frag,
+                  int          where,
+                  int          size,
+                  expressionS *exp)
+{
+  bfd_reloc_code_real_type type;
+
+  switch (size)
+    {
+    case 1:
+      type = BFD_RELOC_8;
+      break;
+    case 2:
+      type = BFD_RELOC_16;
+      break;
+    case 3:
+      type = BFD_RELOC_24;
+      break;
+    case 4:
+    default:
+      type = BFD_RELOC_32;
+      break;
+    case 8:
+      type = BFD_RELOC_64;
+      break;
+    }
+
+  fix_new_exp (frag, where, (int) size, exp, 0, type);
+}
+
 void
 m32c_apply_fix (struct fix *f, valueT *t, segT s)
 {
This page took 0.023765 seconds and 4 git commands to generate.