This also ensures that the correct print_insn routine is found on ARM where opcodes will include both big and little endian versions in all cases. --- gcl/configure | 255 ++++++------------------------------------------------- gcl/configure.in | 38 +++++---- 2 files changed, 48 insertions(+), 245 deletions(-)
diff --git a/gcl/configure b/gcl/configure index ebfbf1f..b5b50a1 100755 --- a/gcl/configure +++ b/gcl/configure @@ -10017,6 +10017,26 @@ fi done +case $use in + aarch64*) print_insn_func=print_insn_aarch64;; + alpha*) print_insn_func=print_insn_alpha;; + armeb-*) print_insn_func=print_insn_big_arm;; + arm-*) print_insn_func=print_insn_little_arm;; + hppa*) print_insn_func=print_insn_hppa;; + *86*) print_insn_func=print_insn_i386;; + ia64*) print_insn_func=print_insn_ia64;; + m68k*) print_insn_func=print_insn_m68k;; + mips-*) print_insn_func=print_insn_big_mips;; + mipsel-*) print_insn_func=print_insn_little_mips;; + powerpc-*) print_insn_func=print_insn_big_powerpc;; + powerpcle-*) print_insn_func=print_insn_little_powerpc;; + s390*) print_insn_func=print_insn_s390;; + sh-*) print_insn_func=print_insn_sh;; + sh64-*) print_insn_func=print_insn_sh64;; + sparc*) print_insn_func=print_insn_sparc;; + *) print_insn_func=print_insn_unknown;; +esac + for ac_header in dis-asm.h do : ac_fn_c_check_header_mongrel "$LINENO" "dis-asm.h" "ac_cv_header_dis_asm_h" "$ac_includes_default" @@ -10069,240 +10089,19 @@ _ACEOF fi - for ac_func in print_insn_aarch64 -do : - ac_fn_c_check_func "$LINENO" "print_insn_aarch64" "ac_cv_func_print_insn_aarch64" -if test "x$ac_cv_func_print_insn_aarch64" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_AARCH64 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_aarch64" >>confdefs.h - -else - for ac_func in print_insn_alpha -do : - ac_fn_c_check_func "$LINENO" "print_insn_alpha" "ac_cv_func_print_insn_alpha" -if test "x$ac_cv_func_print_insn_alpha" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_ALPHA 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_alpha" >>confdefs.h - -else - for ac_func in print_insn_avr -do : - ac_fn_c_check_func "$LINENO" "print_insn_avr" "ac_cv_func_print_insn_avr" -if test "x$ac_cv_func_print_insn_avr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_AVR 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_avr" >>confdefs.h - -else - for ac_func in print_insn_big_arm -do : - ac_fn_c_check_func "$LINENO" "print_insn_big_arm" "ac_cv_func_print_insn_big_arm" -if test "x$ac_cv_func_print_insn_big_arm" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_BIG_ARM 1 -_ACEOF - -$as_echo "#define PRINT_INSN insn_big_arm" >>confdefs.h - -else - for ac_func in print_insn_big_mips -do : - ac_fn_c_check_func "$LINENO" "print_insn_big_mips" "ac_cv_func_print_insn_big_mips" -if test "x$ac_cv_func_print_insn_big_mips" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_BIG_MIPS 1 -_ACEOF - -$as_echo "#define PRINT_INSN insn_big_mips" >>confdefs.h - -else - for ac_func in print_insn_big_powerpc -do : - ac_fn_c_check_func "$LINENO" "print_insn_big_powerpc" "ac_cv_func_print_insn_big_powerpc" -if test "x$ac_cv_func_print_insn_big_powerpc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_BIG_POWERPC 1 -_ACEOF - -$as_echo "#define PRINT_INSN insn_big_powerpc" >>confdefs.h - -else - for ac_func in print_insn_hppa -do : - ac_fn_c_check_func "$LINENO" "print_insn_hppa" "ac_cv_func_print_insn_hppa" -if test "x$ac_cv_func_print_insn_hppa" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_HPPA 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_hppa" >>confdefs.h - -else - for ac_func in print_insn_i386 -do : - ac_fn_c_check_func "$LINENO" "print_insn_i386" "ac_cv_func_print_insn_i386" -if test "x$ac_cv_func_print_insn_i386" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_I386 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_i386" >>confdefs.h - -else - for ac_func in print_insn_ia64 -do : - ac_fn_c_check_func "$LINENO" "print_insn_ia64" "ac_cv_func_print_insn_ia64" -if test "x$ac_cv_func_print_insn_ia64" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_IA64 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_ia64" >>confdefs.h - -else - for ac_func in print_insn_little_arm -do : - ac_fn_c_check_func "$LINENO" "print_insn_little_arm" "ac_cv_func_print_insn_little_arm" -if test "x$ac_cv_func_print_insn_little_arm" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_LITTLE_ARM 1 -_ACEOF - -$as_echo "#define PRINT_INSN insn_little_arm" >>confdefs.h - -else - for ac_func in print_insn_little_mips -do : - ac_fn_c_check_func "$LINENO" "print_insn_little_mips" "ac_cv_func_print_insn_little_mips" -if test "x$ac_cv_func_print_insn_little_mips" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_LITTLE_MIPS 1 -_ACEOF - -$as_echo "#define PRINT_INSN insn_little_mips" >>confdefs.h - -else - for ac_func in print_insn_little_powerpc -do : - ac_fn_c_check_func "$LINENO" "print_insn_little_powerpc" "ac_cv_func_print_insn_little_powerpc" -if test "x$ac_cv_func_print_insn_little_powerpc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_LITTLE_POWERPC 1 -_ACEOF - -$as_echo "#define PRINT_INSN insn_little_powerpc" >>confdefs.h - -else - for ac_func in print_insn_m68k + for ac_func in $print_insn_func do : - ac_fn_c_check_func "$LINENO" "print_insn_m68k" "ac_cv_func_print_insn_m68k" -if test "x$ac_cv_func_print_insn_m68k" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_M68K 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_m68k" >>confdefs.h - -else - for ac_func in print_insn_s390 -do : - ac_fn_c_check_func "$LINENO" "print_insn_s390" "ac_cv_func_print_insn_s390" -if test "x$ac_cv_func_print_insn_s390" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_S390 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_s390" >>confdefs.h - -else - for ac_func in print_insn_sh64 -do : - ac_fn_c_check_func "$LINENO" "print_insn_sh64" "ac_cv_func_print_insn_sh64" -if test "x$ac_cv_func_print_insn_sh64" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_SH64 1 -_ACEOF - -$as_echo "#define PRINT_INSN print_insn_sh64" >>confdefs.h - -else - for ac_func in print_insn_sh -do : - ac_fn_c_check_func "$LINENO" "print_insn_sh" "ac_cv_func_print_insn_sh" -if test "x$ac_cv_func_print_insn_sh" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_SH 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -$as_echo "#define PRINT_INSN print_insn_sh" >>confdefs.h - -else - for ac_func in print_insn_sparc -do : - ac_fn_c_check_func "$LINENO" "print_insn_sparc" "ac_cv_func_print_insn_sparc" -if test "x$ac_cv_func_print_insn_sparc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRINT_INSN_SPARC 1 +cat >>confdefs.h <<_ACEOF +#define PRINT_INSN $print_insn_func _ACEOF -$as_echo "#define PRINT_INSN print_insn_sparc" >>confdefs.h - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - -fi -done - fi done diff --git a/gcl/configure.in b/gcl/configure.in index 17d863c..ea0fe6f 100644 --- a/gcl/configure.in +++ b/gcl/configure.in @@ -2419,25 +2419,29 @@ AC_MSG_RESULT(no)) AC_CHECK_FUNCS(sigaltstack) AC_CHECK_FUNCS(feenableexcept) +case $use in + aarch64*) print_insn_func=print_insn_aarch64;; + alpha*) print_insn_func=print_insn_alpha;; + armeb-*) print_insn_func=print_insn_big_arm;; + arm-*) print_insn_func=print_insn_little_arm;; + hppa*) print_insn_func=print_insn_hppa;; + *86*) print_insn_func=print_insn_i386;; + ia64*) print_insn_func=print_insn_ia64;; + m68k*) print_insn_func=print_insn_m68k;; + mips-*) print_insn_func=print_insn_big_mips;; + mipsel-*) print_insn_func=print_insn_little_mips;; + powerpc-*) print_insn_func=print_insn_big_powerpc;; + powerpcle-*) print_insn_func=print_insn_little_powerpc;; + s390*) print_insn_func=print_insn_s390;; + sh-*) print_insn_func=print_insn_sh;; + sh64-*) print_insn_func=print_insn_sh64;; + sparc*) print_insn_func=print_insn_sparc;; + *) print_insn_func=print_insn_unknown;; +esac + AC_CHECK_HEADERS(dis-asm.h, AC_CHECK_LIB(opcodes,init_disassemble_info) - AC_CHECK_FUNCS(print_insn_aarch64,AC_DEFINE([PRINT_INSN],[print_insn_aarch64],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_alpha,AC_DEFINE([PRINT_INSN],[print_insn_alpha],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_avr,AC_DEFINE([PRINT_INSN],[print_insn_avr],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_big_arm,AC_DEFINE([PRINT_INSN],[insn_big_arm],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_big_mips,AC_DEFINE([PRINT_INSN],[insn_big_mips],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_big_powerpc,AC_DEFINE([PRINT_INSN],[insn_big_powerpc],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_hppa,AC_DEFINE([PRINT_INSN],[print_insn_hppa],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_i386,AC_DEFINE([PRINT_INSN],[print_insn_i386],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_ia64,AC_DEFINE([PRINT_INSN],[print_insn_ia64],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_little_arm,AC_DEFINE([PRINT_INSN],[insn_little_arm],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_little_mips,AC_DEFINE([PRINT_INSN],[insn_little_mips],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_little_powerpc,AC_DEFINE([PRINT_INSN],[insn_little_powerpc],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_m68k,AC_DEFINE([PRINT_INSN],[print_insn_m68k],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_s390,AC_DEFINE([PRINT_INSN],[print_insn_s390],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_sh64,AC_DEFINE([PRINT_INSN],[print_insn_sh64],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_sh,AC_DEFINE([PRINT_INSN],[print_insn_sh],[instruction disassemble routine]), - AC_CHECK_FUNCS(print_insn_sparc,AC_DEFINE([PRINT_INSN],[print_insn_sparc],[instruction disassemble routine]))))))))))))))))))) + AC_CHECK_FUNCS($print_insn_func,AC_DEFINE_UNQUOTED([PRINT_INSN],$print_insn_func,[instruction disassemble routine]))) #if test $use = "386-linux" ; then AC_CHECK_HEADERS(asm/sigcontext.h) -- 1.9.3 _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel