summaryrefslogtreecommitdiffstats
path: root/gas/config/tc-crx.h
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-crx.h')
-rw-r--r--gas/config/tc-crx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/config/tc-crx.h b/gas/config/tc-crx.h
index 29e59fe49b..b387651345 100644
--- a/gas/config/tc-crx.h
+++ b/gas/config/tc-crx.h
@@ -69,4 +69,12 @@ extern int crx_force_relocation (struct fix *);
: LEN == 4 ? BFD_RELOC_CRX_NUM32 \
: BFD_RELOC_NONE);
+/* Give an error if a frag containing code is not aligned to a 2-byte
+ boundary. */
+#define md_frag_check(FRAGP) \
+ if ((FRAGP)->has_code \
+ && (((FRAGP)->fr_address + (FRAGP)->insn_addr) & 1) != 0) \
+ as_bad_where ((FRAGP)->fr_file, (FRAGP)->fr_line, \
+ _("instruction address is not a multiple of 2"));
+
#endif /* TC_CRX_H */
OpenPOWER on IntegriCloud