Mon Feb 5 16:29:11 1996 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-i960.c (ARCH_HX): Define.
+ (arch_tab): Add HX.
+ (targ_has_sfr): Handle ARCH_HX.
+ (targ_has_iclass): Handle ARCH_HX.
+ (tc_coff_fix2rtype): Add return 0 to avoid warning.
+ (tc_headers_hook): If the architecture was specified explicitly,
+ use it when setting the flags. Set the extern variable coff_flags
+ rather than headers->filehdr.f_flags, since the latter is set
+ unconditionally in obj-coff.c.
+ (i960_handle_align): Remove unused variable fixp.
+
Support for building bfd and opcodes as shared libraries, based on
patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
* configure.in: Set OPCODES and BFD to search directories.
#define ARCH_KB 2
#define ARCH_MC 3
#define ARCH_CA 4
-#define ARCH_XL 5
+#define ARCH_HX 5
+#define ARCH_XL 6
int architecture = ARCH_ANY; /* Architecture requested on invocation line */
int iclasses_seen; /* OR of instruction classes (I_* constants)
* for which we've actually assembled
{"KC", ARCH_MC}, /* Synonym for MC */
{"MC", ARCH_MC},
{"CA", ARCH_CA},
+ {"HX", ARCH_HX},
{"XL", ARCH_XL},
{NULL, 0}
};
case ARCH_MC:
case ARCH_XL:
return 0;
+ case ARCH_HX:
+ return ((0 <= n) && (n <= 4));
case ARCH_CA:
default:
return ((0 <= n) && (n <= 2));
int
targ_has_iclass (ic)
/* Instruction class; one of:
- I_BASE, I_CX, I_DEC, I_KX, I_FP, I_MIL, I_CASIM
- or I_XL
+ I_BASE, I_CX, I_DEC, I_KX, I_FP, I_MIL, I_CASIM, I_CX2, I_HX, I_HX2
*/
int ic;
{
return ic & (I_BASE | I_KX | I_FP | I_DEC | I_MIL);
case ARCH_CA:
return ic & (I_BASE | I_CX | I_CX2 | I_CASIM);
+ case ARCH_HX:
+ return ic & (I_BASE | I_CX2 | I_HX | I_HX2);
case ARCH_XL:
- return ic & (I_BASE | I_CX2 | I_XL);
+ return ic & (I_BASE | I_CX2 | I_HX2); /* XL */
default:
if ((iclasses_seen & (I_KX | I_FP | I_DEC | I_MIL))
&& (iclasses_seen & (I_CX | I_CX2)))
return R_IPRMED;
abort ();
+ return 0;
}
int
return ((addr + (1 << section_alignment[(int) seg]) - 1) & (-1 << section_alignment[(int) seg]));
} /* md_section_align() */
+extern int coff_flags;
+
#ifdef OBJ_COFF
void
tc_headers_hook (headers)
object_headers *headers;
{
- if (iclasses_seen == I_BASE)
- {
- headers->filehdr.f_flags |= F_I960CORE;
- }
- else if (iclasses_seen & I_CX)
- {
- headers->filehdr.f_flags |= F_I960CA;
- }
- else if (iclasses_seen & I_XL)
- headers->filehdr.f_flags |= F_I960XL;
- else if (iclasses_seen & I_CX2)
- {
- headers->filehdr.f_flags |= F_I960CA;
- }
- else if (iclasses_seen & I_MIL)
- {
- headers->filehdr.f_flags |= F_I960MC;
- }
- else if (iclasses_seen & (I_DEC | I_FP))
+ switch (architecture)
{
- headers->filehdr.f_flags |= F_I960KB;
+ case ARCH_KA:
+ coff_flags |= F_I960KA;
+ break;
+
+ case ARCH_KB:
+ coff_flags |= F_I960KB;
+ break;
+
+ case ARCH_MC:
+ coff_flags |= F_I960MC;
+ break;
+
+ case ARCH_CA:
+ coff_flags |= F_I960CA;
+ break;
+
+ case ARCH_HX:
+ coff_flags |= F_I960HX;
+ break;
+
+ case ARCH_XL:
+ coff_flags |= F_I960XL;
+ break; /* XL */
+
+ default:
+ if (iclasses_seen == I_BASE)
+ coff_flags |= F_I960CORE;
+ else if (iclasses_seen & I_CX)
+ coff_flags |= F_I960CA;
+ else if (iclasses_seen & (I_HX | I_HX2))
+ coff_flags |= F_I960HX;
+ else if (iclasses_seen & I_CX2)
+ coff_flags |= F_I960CA;
+ else if (iclasses_seen & I_MIL)
+ coff_flags |= F_I960MC;
+ else if (iclasses_seen & (I_DEC | I_FP))
+ coff_flags |= F_I960KB;
+ else
+ coff_flags |= F_I960KA;
+ break;
}
- else
- {
- headers->filehdr.f_flags |= F_I960KA;
- } /* set arch flag */
if (flag_readonly_data_in_text)
{
i960_handle_align (fragp)
fragS *fragp;
{
- fixS *fixp;
-
if (!linkrelax)
return;
return;
/* alignment directive */
- fixp = fix_new (fragp, fragp->fr_fix, fragp->fr_offset, 0, 0, 0,
- (int) fragp->fr_type);
+ fix_new (fragp, fragp->fr_fix, fragp->fr_offset, 0, 0, 0,
+ (int) fragp->fr_type);
#endif /* OBJ_BOUT */
}