aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-05-09 21:17:19 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-05-09 21:17:19 +0000
commit8370e93e49f0166d09e15906c6eb63f7843c0672 (patch)
tree1be213df87386538311dc18f4f7eb2c9f19a5c8d
parentc7b44b0425dc1a4ee75abee5897de77a2b86648d (diff)
downloadfsf-binutils-gdb-8370e93e49f0166d09e15906c6eb63f7843c0672.zip
fsf-binutils-gdb-8370e93e49f0166d09e15906c6eb63f7843c0672.tar.gz
fsf-binutils-gdb-8370e93e49f0166d09e15906c6eb63f7843c0672.tar.bz2
Add little endian PowerPC support.
-rw-r--r--gas/ChangeLog20
-rw-r--r--gas/config/.Sanitize2
-rw-r--r--gas/config/ppc-big.mt1
-rw-r--r--gas/config/ppc-lit.mt1
-rwxr-xr-xgas/configure43
-rw-r--r--gas/configure.in13
6 files changed, 57 insertions, 23 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 39c1f84..356c157 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,23 @@
+Tue May 9 17:07:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * 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 20282ec..c58498b 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 0000000..da08852
--- /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 0000000..b16a45d
--- /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 601d952..e3fac7b 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 <<EOF
-#line 938 "configure"
+#line 944 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@@ -949,7 +954,7 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 952 "configure"
+#line 958 "configure"
#include "confdefs.h"
#include <assert.h>
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
-#line 983 "configure"
+#line 989 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@@ -1032,7 +1037,7 @@ else
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1035 "configure"
+#line 1041 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
@@ -1055,7 +1060,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1058 "configure"
+#line 1064 "configure"
#include "confdefs.h"
#include <alloca.h>
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 <<EOF
-#line 1089 "configure"
+#line 1095 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1144,7 +1149,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1147 "configure"
+#line 1153 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1172,7 +1177,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1175 "configure"
+#line 1181 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1226,7 +1231,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1229 "configure"
+#line 1235 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1268,7 +1273,7 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1271 "configure"
+#line 1277 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1307,7 +1312,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1316 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1360,7 +1365,7 @@ if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1363 "configure"
+#line 1369 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -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 <<EOF
-#line 1420 "configure"
+#line 1426 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
@@ -1453,7 +1458,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1456 "configure"
+#line 1462 "configure"
#include "confdefs.h"
$gas_test_headers
int main() { return 0; }
@@ -1492,7 +1497,7 @@ if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1495 "configure"
+#line 1501 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
diff --git a/gas/configure.in b/gas/configure.in
index 088a04a..82ee491 100644
--- a/gas/configure.in
+++ b/gas/configure.in
@@ -41,7 +41,8 @@ changequote([,])dnl
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
AC_DEFINE(sparcv9) ;;
@@ -161,10 +162,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 ;;