* config/tc-m32c.c (m32c_cons_fix_new): New. Added to support 3
authorDJ Delorie <dj@redhat.com>
Sun, 4 Feb 2007 04:45:36 +0000 (04:45 +0000)
committerDJ Delorie <dj@redhat.com>
Sun, 4 Feb 2007 04:45:36 +0000 (04:45 +0000)
byte relocs.
* config/tc-m32c.h (TC_CONS_FIX_NEW): Define.
(m32c_cons_fix_new): Prototype.

gas/ChangeLog
gas/config/tc-m32c.c
gas/config/tc-m32c.h

index 0f595b9bf99748fcd5dc4f60a6f7c0f516005941..6db4d2fff08385d885d3bfcdf8c79c1bea3c90e3 100644 (file)
@@ -1,3 +1,10 @@
+2007-02-03  DJ Delorie  <dj@delorie.com>
+
+       * config/tc-m32c.c (m32c_cons_fix_new): New.  Added to support 3
+       byte relocs.
+       * config/tc-m32c.h (TC_CONS_FIX_NEW): Define.
+       (m32c_cons_fix_new): Prototype.
+
 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
        
        * config/tc-xtensa.c (xg_build_to_insn): Use tinsn_init.
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)
 {
index 3cdd1a14e4f496a575eb6bb9607b1853d263ee16..697e130e19d568c6567be36824666551785e857d 100644 (file)
@@ -57,6 +57,10 @@ extern bfd_boolean m32c_fix_adjustable PARAMS ((struct fix *));
 #define TC_FORCE_RELOCATION(fix) m32c_force_relocation (fix)
 extern int m32c_force_relocation PARAMS ((struct fix *));
 
+#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
+  m32c_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
+extern void m32c_cons_fix_new (fragS *, int, int, expressionS *);
+
 extern const struct relax_type md_relax_table[];
 #define TC_GENERIC_RELAX_TABLE md_relax_table
 
This page took 0.026474 seconds and 4 git commands to generate.