From 8370e93e49f0166d09e15906c6eb63f7843c0672 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 9 May 1995 21:17:19 +0000 Subject: [PATCH] Add little endian PowerPC support. --- gas/ChangeLog | 20 ++++++++++++++++++++ gas/config/.Sanitize | 2 ++ gas/config/ppc-big.mt | 1 + gas/config/ppc-lit.mt | 1 + gas/configure | 43 ++++++++++++++++++++++++------------------- gas/configure.in | 13 +++++++++---- 6 files changed, 57 insertions(+), 23 deletions(-) create mode 100644 gas/config/ppc-big.mt create mode 100644 gas/config/ppc-lit.mt diff --git a/gas/ChangeLog b/gas/ChangeLog index 39c1f84ab0..356c1577a0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,23 @@ +Tue May 9 17:07:41 1995 Michael Meissner + + * configure.in: Add little endian PowerPC support. + * configure: Rebuild with autoconf. + * config/ppc-big.mt: New file for big endian PowerPC systems. + * config/ppc-lit.mt: New file for little endian PowerPC systems. + + * config/tc-ppc.h (target_big_endian): Declare. + (TARGET_FORMAT): Deal with little and big endian ELF variants. + (TARGET_BYTES_BIG_ENDIAN): Define as 1, not empty. + + * config/tc-ppc.c (ppc_big_endian): Delete variable, use + target_big_endian instead. + (md_parse_option): Parse -mlittle and -mlittle-endian to use + little endian support. Parse -mbig and -mbig-endian to use big + endian support. + (md_show_usage): Update to reflect current switches. + (ppc_set_cpu): Recognize powerpcle as little endian PowerPC. Use + as_fatal, not abort if unknown machine. + Tue May 9 10:58:41 1995 Jeff Law (law@snake.cs.utah.edu) * config/tc-hppa.c (md_apply_fix): Cast *valp to an integer when diff --git a/gas/config/.Sanitize b/gas/config/.Sanitize index 20282ec006..c58498b16e 100644 --- a/gas/config/.Sanitize +++ b/gas/config/.Sanitize @@ -71,6 +71,8 @@ obj-som.c obj-som.h obj-vms.c obj-vms.h +ppc-big.mt +ppc-lit.mt tc-a29k.c tc-a29k.h tc-alpha.c diff --git a/gas/config/ppc-big.mt b/gas/config/ppc-big.mt new file mode 100644 index 0000000000..da08852eda --- /dev/null +++ b/gas/config/ppc-big.mt @@ -0,0 +1 @@ +TDEFINES=-DTARGET_BYTES_BIG_ENDIAN=1 diff --git a/gas/config/ppc-lit.mt b/gas/config/ppc-lit.mt new file mode 100644 index 0000000000..b16a45d282 --- /dev/null +++ b/gas/config/ppc-lit.mt @@ -0,0 +1 @@ +TDEFINES=-DTARGET_BYTES_LITTLE_ENDIAN=1 diff --git a/gas/configure b/gas/configure index 601d9520a1..e3fac7b15d 100755 --- a/gas/configure +++ b/gas/configure @@ -551,7 +551,8 @@ case ${target_cpu} in m8*) cpu_type=m88k ;; mips*el) cpu_type=mips endian=little;; mips*) cpu_type=mips endian=big ;; - powerpc*) cpu_type=ppc ;; + powerpcle*) cpu_type=ppc endian=little;; + powerpc*) cpu_type=ppc endian=big;; rs6000*) cpu_type=ppc ;; sparc64) cpu_type=sparc obj_format=elf cat >> confdefs.h <<\EOF @@ -674,10 +675,14 @@ case ${generic_target} in esac ;; ppc-*-aix*) obj_format=coff ;; - ppc-*-elf*) obj_format=elf ;; - ppc-*-eabi*) obj_format=elf ;; + ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) + obj_format=elf + case "$endian" in + big) gas_target=ppc-big ;; + *) gas_target=ppc-lit ;; + esac + ;; ppc-*-netware*) obj_format=elf emulation=ppcnw ;; - ppc-*-sysv4*) obj_format=elf ;; sh-*-coff) obj_format=coff ;; @@ -935,7 +940,7 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error @@ -949,7 +954,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -980,7 +985,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1032,7 +1037,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1086,7 +1091,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < #include @@ -1417,7 +1422,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <