+/* This is called by emit_expr via TC_CONS_FIX_NEW when creating a
+ reloc for a cons. We could use the definition there, except that
+ we want to handle 64 bit relocs specially. */
+
+void
+cons_fix_new_mips (frag, where, nbytes, exp)
+ fragS *frag;
+ int where;
+ unsigned int nbytes;
+ expressionS *exp;
+{
+ /* If we are assembling in 32 bit mode, turn an 8 byte reloc into a
+ 4 byte reloc.
+ FIXME: There is no way to select anything but 32 bit mode right
+ now. */
+ if (nbytes == 8)
+ {
+ if (byte_order == BIG_ENDIAN)
+ where += 4;
+ nbytes = 4;
+ }
+
+ if (nbytes != 2 && nbytes != 4)
+ as_bad ("Unsupported reloc size %d", nbytes);
+
+ fix_new_exp (frag_now, where, (int) nbytes, exp, 0,
+ nbytes == 2 ? BFD_RELOC_16 : BFD_RELOC_32);
+}
+