From a75f31ce1b0fce9ebaaf759dc20ffb5334fc22bc Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 3 Nov 1995 03:58:09 +0000 Subject: [PATCH] Wed Nov 1 15:17:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 * configure.in (m88k-motorola-sysv*): New target. * configure: Rebuild. * config/te-delta88.h: New file. * config/obj-coff.c (write_object_file): Use md_do_align if it is defined. * config/tc-m88k.h (SUB_SEGMENT_ALIGN): Define. (md_do_align): Define. * config/tc-m88k.c: Include "subsegs.h". (m88k_do_align): New function. * config/te-delta.h (STRIP_UNDERSCORE): Don't define. (COFF_NOLOAD_PROBLEM): Define. (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): Define. --- gas/config/.Sanitize | 1 + gas/config/tc-m88k.c | 18 ++++++++++++++++++ gas/config/tc-m88k.h | 11 +++++++++++ gas/config/te-delta.h | 11 ++++++++--- gas/config/te-delta88.h | 13 +++++++++++++ gas/configure | 33 +++++++++++++++++---------------- gas/configure.in | 1 + 7 files changed, 69 insertions(+), 19 deletions(-) create mode 100644 gas/config/te-delta88.h diff --git a/gas/config/.Sanitize b/gas/config/.Sanitize index b65c06368f9..39ad355400e 100644 --- a/gas/config/.Sanitize +++ b/gas/config/.Sanitize @@ -126,6 +126,7 @@ tc-z8k.c tc-z8k.h te-386bsd.h te-delta.h +te-delta88.h te-dpx2.h te-generic.h te-go32.h diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c index 586e274eaf6..e9b22738e72 100644 --- a/gas/config/tc-m88k.c +++ b/gas/config/tc-m88k.c @@ -21,6 +21,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307 #include #include "as.h" +#include "subsegs.h" #include "m88k-opcode.h" struct field_val_assoc @@ -1428,4 +1429,21 @@ md_pcrel_from (fixp) /*NOTREACHED*/ } +/* When we align the .init section, insert the correct NOP pattern. */ + +int +m88k_do_align (n, fill) + int n; + const char *fill; +{ + if (!fill + && strcmp (obj_segment_name (now_seg), ".init") == 0) + { + static const unsigned char nop_pattern[] = { 0xf4, 0x00, 0x58, 0x00 }; + frag_align_pattern (n, nop_pattern, sizeof (nop_pattern)); + return 1; + } + return 0; +} + #endif /* M88KCOFF */ diff --git a/gas/config/tc-m88k.h b/gas/config/tc-m88k.h index ac8289e9ab9..f938ee46c71 100644 --- a/gas/config/tc-m88k.h +++ b/gas/config/tc-m88k.h @@ -90,4 +90,15 @@ struct reloc_info_m88k /* No special hook needed for symbols. */ #define tc_coff_symbol_emit_hook(s) +/* Align sections to a four byte boundary. */ +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#define SUB_SEGMENT_ALIGN(SEG) max (section_alignment[(int) (SEG)], 4) + +/* We use a special alignment function to insert the correct nop + pattern in .init. */ +extern int m88k_do_align PARAMS ((int, const char *)); +#define md_do_align(n,fill,l) if (m88k_do_align(n,fill)) goto l + #endif /* M88KCOFF */ diff --git a/gas/config/te-delta.h b/gas/config/te-delta.h index 4debb28f0ef..363a004ea67 100644 --- a/gas/config/te-delta.h +++ b/gas/config/te-delta.h @@ -1,8 +1,13 @@ -/* Remove leading underscore from the gcc generated symbol names */ -#define STRIP_UNDERSCORE - #define TE_DELTA #include "obj-format.h" +#define COFF_NOLOAD_PROBLEM 1 + +/* Added these, because if we don't know what we're targetting we may + need an assembler version of libgcc, and that will use local + labels. */ +#define LOCAL_LABELS_DOLLAR 1 +#define LOCAL_LABELS_FB 1 + /* end of te-delta.h */ diff --git a/gas/config/te-delta88.h b/gas/config/te-delta88.h new file mode 100644 index 00000000000..adcd6b7f7b6 --- /dev/null +++ b/gas/config/te-delta88.h @@ -0,0 +1,13 @@ +/* This file is te-delta88.h. */ + +#define TE_DELTA88 1 + +#define COFF_NOLOAD_PROBLEM 1 + +/* Added these, because if we don't know what we're targetting we may + need an assembler version of libgcc, and that will use local + labels. */ +#define LOCAL_LABELS_DOLLAR 1 +#define LOCAL_LABELS_FB 1 + +#include "obj-format.h" diff --git a/gas/configure b/gas/configure index bd805490eed..5929ea213da 100755 --- a/gas/configure +++ b/gas/configure @@ -731,6 +731,7 @@ for this_target in $target $canon_targets ; do em=lynx ;; m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delta88 ;; m88k-*-coff*) fmt=coff targ=m88kcoff ;; # don't change em like *-*-bsd does @@ -1245,7 +1246,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 @@ -1259,7 +1260,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -1292,7 +1293,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 @@ -1344,7 +1345,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1398,7 +1399,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 <&6 else cat > conftest.$ac_ext < #include @@ -1782,7 +1783,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 <