aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ia64.h
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2000-11-07 01:21:10 +0000
committerJim Wilson <wilson@tuliptree.org>2000-11-07 01:21:10 +0000
commit44f5c83ad358d6f9aa54d08ebe240c2e6b94fbf1 (patch)
tree4c3fbcce54f1b9552b5eb749f23fe9b0296608d1 /gas/config/tc-ia64.h
parentef99799a42e1d93d6025967df807ad442e29304d (diff)
downloadgdb-44f5c83ad358d6f9aa54d08ebe240c2e6b94fbf1.zip
gdb-44f5c83ad358d6f9aa54d08ebe240c2e6b94fbf1.tar.gz
gdb-44f5c83ad358d6f9aa54d08ebe240c2e6b94fbf1.tar.bz2
ia64-hpux patches from Steve Ellcey.
* config/tc-ia64.c (md_shortopts, md_parse_option, md_show_usage): Change M to m for -milp32 or -mlp64 to match gcc. (dot_endp): Use bytes_per_address instead of 8. (emit_one_bundle): Use number_to_chars_littleendian instead of md_number_to_chars. (fix_insn): Likewise. (ia64_init): New function. (ia64_target_format): New function. (md_begin): Set endianness, arch, and machine as appropriate. * config/tc-ia64.h: (TARGET_BYTES_BIG_ENDIAN, md_number_to_chars): Make these macros depend on TE_HPUX macro. (TARGET_FORMAT): Define. (HOST_SPECIAL_INIT): Define. * config/te-hpux.h: New file. * configure.in: Add "ia64-*-hpux*" target to configure. * configure: Regenerate.
Diffstat (limited to 'gas/config/tc-ia64.h')
-rw-r--r--gas/config/tc-ia64.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/gas/config/tc-ia64.h b/gas/config/tc-ia64.h
index 29d4f6b..264fe12 100644
--- a/gas/config/tc-ia64.h
+++ b/gas/config/tc-ia64.h
@@ -24,14 +24,27 @@
#define TC_IA64
-#define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_elf_flavour \
- ? "elf64-ia64-little" \
- : "unknown-format")
+/* Linux is little endian by default. HPUX is big endian by default. */
+#ifdef TE_HPUX
+#define md_number_to_chars number_to_chars_bigendian
+#define TARGET_BYTES_BIG_ENDIAN 1
+#else
+#define md_number_to_chars number_to_chars_littleendian
+#define TARGET_BYTES_BIG_ENDIAN 0
+#endif /* TE_HPUX */
+
+/* We need to set the default object file format in ia64_init and not in
+ md_begin. This is because parse_args is called before md_begin, and we
+ do not want md_begin to wipe out the flag settings set by options parsed in
+ md_parse_args. */
+
+#define HOST_SPECIAL_INIT ia64_init
+
+#define TARGET_FORMAT ia64_target_format()
+extern const char *ia64_target_format PARAMS ((void));
#define TARGET_ARCH bfd_arch_ia64
-#define TARGET_BYTES_BIG_ENDIAN 0
#define DOUBLESLASH_LINE_COMMENTS /* allow //-style comments */
-#define md_number_to_chars number_to_chars_littleendian
#define TC_HANDLES_FX_DONE
#define NEED_LITERAL_POOL /* need gp literal pool */