summaryrefslogtreecommitdiff
path: root/gas/config/tc-crx.h
diff options
context:
space:
mode:
authorTomer Levi <Tomer.Levi@nsc.com>2004-11-08 13:51:55 +0000
committerTomer Levi <Tomer.Levi@nsc.com>2004-11-08 13:51:55 +0000
commitcf506b2cedca81cb4a42d94bf95bf1abd2b41413 (patch)
tree6b9a848cdbdc1f02053c43700620673de38dc7e2 /gas/config/tc-crx.h
parent1632fbc78c674209a23b718d91f5d7ab1744dd5e (diff)
downloadbinutils-redhat-cf506b2cedca81cb4a42d94bf95bf1abd2b41413.tar.gz
2004-11-08 Tomer Levi <Tomer.Levi@nsc.com>
* config/tc-crx.c (print_insn): Check and set insn_addr. * config/tc-crx.h (md_frag_check): Define.
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 */