aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-07-02 06:40:19 +0000
committerAlan Modra <amodra@gmail.com>2004-07-02 06:40:19 +0000
commit09b935accc9deb1b914b33090205574cee66b158 (patch)
treed8c12f33a7f61db10bcf5f1ee72827ac26778acb /gas/config/tc-ppc.h
parentd205ad70f2ce07f7cbe9debc8bc1859981613bb5 (diff)
downloadgdb-09b935accc9deb1b914b33090205574cee66b158.zip
gdb-09b935accc9deb1b914b33090205574cee66b158.tar.gz
gdb-09b935accc9deb1b914b33090205574cee66b158.tar.bz2
* frags.h (struct frag): Add has_code and insn_addr fields.
* write.c (cvt_frag_to_fill): Invoke md_frag_check. * config/tc-ppc.c (md_assemble): Check and set insn_addr. * config/tc-ppc.h (md_frag_check): Define.
Diffstat (limited to 'gas/config/tc-ppc.h')
-rw-r--r--gas/config/tc-ppc.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/config/tc-ppc.h b/gas/config/tc-ppc.h
index 0844f84..e08b12d 100644
--- a/gas/config/tc-ppc.h
+++ b/gas/config/tc-ppc.h
@@ -1,6 +1,6 @@
/* tc-ppc.h -- Header file for tc-ppc.c.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
@@ -110,6 +110,11 @@ extern char *ppc_target_format PARAMS ((void));
} \
}
+#define md_frag_check(FRAGP) \
+ if ((FRAGP)->has_code \
+ && (((FRAGP)->fr_address + (FRAGP)->insn_addr) & 3) != 0) \
+ as_bad_where ((FRAGP)->fr_file, (FRAGP)->fr_line, \
+ _("instruction address is not a multiple of 4"));
#ifdef TE_PE