Add little endian PowerPC support.

This commit is contained in:
Michael Meissner
1995-05-09 21:17:19 +00:00
parent c7b44b0425
commit 8370e93e49
6 changed files with 57 additions and 23 deletions

View File

@ -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) 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 * config/tc-hppa.c (md_apply_fix): Cast *valp to an integer when

View File

@ -71,6 +71,8 @@ obj-som.c
obj-som.h obj-som.h
obj-vms.c obj-vms.c
obj-vms.h obj-vms.h
ppc-big.mt
ppc-lit.mt
tc-a29k.c tc-a29k.c
tc-a29k.h tc-a29k.h
tc-alpha.c tc-alpha.c

1
gas/config/ppc-big.mt Normal file
View File

@ -0,0 +1 @@
TDEFINES=-DTARGET_BYTES_BIG_ENDIAN=1

1
gas/config/ppc-lit.mt Normal file
View File

@ -0,0 +1 @@
TDEFINES=-DTARGET_BYTES_LITTLE_ENDIAN=1

43
gas/configure vendored
View File

@ -551,7 +551,8 @@ case ${target_cpu} in
m8*) cpu_type=m88k ;; m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little;; mips*el) cpu_type=mips endian=little;;
mips*) cpu_type=mips endian=big ;; 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 ;; rs6000*) cpu_type=ppc ;;
sparc64) cpu_type=sparc obj_format=elf sparc64) cpu_type=sparc obj_format=elf
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
@ -674,10 +675,14 @@ case ${generic_target} in
esac esac
;; ;;
ppc-*-aix*) obj_format=coff ;; ppc-*-aix*) obj_format=coff ;;
ppc-*-elf*) obj_format=elf ;; ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
ppc-*-eabi*) obj_format=elf ;; obj_format=elf
case "$endian" in
big) gas_target=ppc-big ;;
*) gas_target=ppc-lit ;;
esac
;;
ppc-*-netware*) obj_format=elf emulation=ppcnw ;; ppc-*-netware*) obj_format=elf emulation=ppcnw ;;
ppc-*-sysv4*) obj_format=elf ;;
sh-*-coff) obj_format=coff ;; sh-*-coff) obj_format=coff ;;
@ -935,7 +940,7 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 938 "configure" #line 944 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
@ -949,7 +954,7 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 952 "configure" #line 958 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 983 "configure" #line 989 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
@ -1032,7 +1037,7 @@ else
ac_cv_c_cross=yes ac_cv_c_cross=yes
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1035 "configure" #line 1041 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1058 "configure" #line 1064 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alloca.h> #include <alloca.h>
int main() { return 0; } 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1089 "configure" #line 1095 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef __GNUC__ #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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1147 "configure" #line 1153 "configure"
#include "confdefs.h" #include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2) #if defined(CRAY) && ! defined(CRAY2)
webecray 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1175 "configure" #line 1181 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -1226,7 +1231,7 @@ else
ac_cv_c_stack_direction=0 ac_cv_c_stack_direction=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1229 "configure" #line 1235 "configure"
#include "confdefs.h" #include "confdefs.h"
find_stack_direction () find_stack_direction ()
{ {
@ -1268,7 +1273,7 @@ else
ac_cv_c_inline=no ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1271 "configure" #line 1277 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { return 0; } 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1310 "configure" #line 1316 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1363 "configure" #line 1369 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
#include <stdio.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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1420 "configure" #line 1426 "configure"
#include "confdefs.h" #include "confdefs.h"
$gas_test_headers $gas_test_headers
int main() { return 0; } 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1456 "configure" #line 1462 "configure"
#include "confdefs.h" #include "confdefs.h"
$gas_test_headers $gas_test_headers
int main() { return 0; } 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 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1495 "configure" #line 1501 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef HAVE_ERRNO_H #ifdef HAVE_ERRNO_H

View File

@ -41,7 +41,8 @@ changequote([,])dnl
m8*) cpu_type=m88k ;; m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little;; mips*el) cpu_type=mips endian=little;;
mips*) cpu_type=mips endian=big ;; 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 ;; rs6000*) cpu_type=ppc ;;
sparc64) cpu_type=sparc obj_format=elf sparc64) cpu_type=sparc obj_format=elf
AC_DEFINE(sparcv9) ;; AC_DEFINE(sparcv9) ;;
@ -161,10 +162,14 @@ case ${generic_target} in
esac esac
;; ;;
ppc-*-aix*) obj_format=coff ;; ppc-*-aix*) obj_format=coff ;;
ppc-*-elf*) obj_format=elf ;; ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
ppc-*-eabi*) obj_format=elf ;; obj_format=elf
case "$endian" in
big) gas_target=ppc-big ;;
*) gas_target=ppc-lit ;;
esac
;;
ppc-*-netware*) obj_format=elf emulation=ppcnw ;; ppc-*-netware*) obj_format=elf emulation=ppcnw ;;
ppc-*-sysv4*) obj_format=elf ;;
sh-*-coff) obj_format=coff ;; sh-*-coff) obj_format=coff ;;