Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
authorIan Lance Taylor <ian@airs.com>
Fri, 3 Jan 1997 03:07:01 +0000 (03:07 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 3 Jan 1997 03:07:01 +0000 (03:07 +0000)
* read.c (read_a_source_file): Check for conditional operators
before doing an MRI pending alignment.
* config/tc-m68k.h (m68k_conditional_pseudoop): Declare.
(tc_conditional_pseudop): Define.
* config/tc-m68k.c (m68k_conditional_pseudop): New function.
* doc/internals.texi (CPU backend): Describe
tc_conditional_pseudoop.

gas/ChangeLog
gas/config/tc-m68k.c
gas/config/tc-m68k.h
gas/read.c

index 1e4a048f739ad9b8da084ab9dcb517780c5aa7ae..349e17b04ea81fbbe184de358577c6fb93a65869 100644 (file)
@@ -1,5 +1,14 @@
 Thu Jan  2 13:37:29 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
+       * read.c (read_a_source_file): Check for conditional operators
+       before doing an MRI pending alignment.
+       * config/tc-m68k.h (m68k_conditional_pseudoop): Declare.
+       (tc_conditional_pseudop): Define.
+       * config/tc-m68k.c (m68k_conditional_pseudop): New function.
+       * doc/internals.texi (CPU backend): Describe
+       tc_conditional_pseudoop.
+
        Based on patch from Ronald F. Guilmette <rfg@monkeys.com>:
        * config/tc-m68k.c (m68k_rel32_from_cmdline): New static
        variable.
index 27ace69f2defaacbef1fe8f98c42b36305f1a53b..0e40fa31c022134dfd922175d2a790c80028b60a 100644 (file)
@@ -4715,6 +4715,18 @@ s_proc (ignore)
 \f
 /* Pseudo-ops handled for MRI compatibility.  */
 
+/* This function returns non-zero if the argument is a conditional
+   pseudo-op.  This is called when checking whether a pending
+   alignment is needed.  */
+
+int
+m68k_conditional_pseudoop (pop)
+     pseudo_typeS *pop;
+{
+  return (pop->poc_handler == s_mri_if
+         || pop->poc_handler == s_mri_else);
+}
+
 /* Handle an MRI style chip specification.  */
 
 static void
index 56028579f5b7a67a6c62ae2ea0b412c83c5d81cb..85fb20c56bb3e8debcca66c2a43863b4707cef0d 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is tc-m68k.h
 
-   Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 1996
+   Copyright (C) 1987, 89, 90, 91, 92, 93, 94, 95, 96, 1997
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 #ifdef OBJ_AOUT
 #ifdef TE_SUN3
 #define TARGET_FORMAT "a.out-sunos-big"
-#else
+#endif
 #ifdef TE_NetBSD
 #define TARGET_FORMAT "a.out-m68k-netbsd"
-#else
-#define TARGET_FORMAT "a.out-zero-big"
 #endif
+#ifdef TE_LINUX
+#define TARGET_FORMAT "a.out-m68k-linux"
+#endif
+#ifndef TARGET_FORMAT
+#define TARGET_FORMAT "a.out-zero-big"
 #endif
 #endif
 
@@ -76,6 +79,9 @@ extern int tc_coff_sizemachdep PARAMS ((struct frag *));
 extern int m68k_aout_machtype;
 #endif
 
+#define tc_comment_chars m68k_comment_chars
+extern const char *m68k_comment_chars;
+
 #define tc_crawl_symbol_chain(a)       {;}     /* not used */
 #define tc_headers_hook(a)             {;}     /* not used */
 #define tc_aout_pre_write_hook(x)      {;}     /* not used */
@@ -86,12 +92,6 @@ extern int m68k_aout_machtype;
 #define LISTING_LHS_CONT_LINES 4/* And 4 lines max */
 #define LISTING_HEADER "68K GAS "
 
-/* Copied from write.c */
-#define M68K_AIM_KLUDGE(aim, this_state,this_type) \
-    if (aim==0 && this_state== 4) { /* hard encoded from tc-m68k.c */ \
-                                       aim=this_type->rlx_forward+1; /* Force relaxation into word mode */ \
-                                   }
-
 #ifndef REGISTER_PREFIX
 #define REGISTER_PREFIX '%'
 #endif
@@ -119,6 +119,9 @@ extern int m68k_aout_machtype;
 extern void m68k_mri_mode_change PARAMS ((int));
 #define MRI_MODE_CHANGE(i) m68k_mri_mode_change (i)
 
+extern int m68k_conditional_pseudoop PARAMS ((pseudo_typeS *));
+#define tc_conditional_pseudoop(pop) m68k_conditional_pseudoop (pop)
+
 #ifdef BFD_ASSEMBLER
 
 #define tc_frob_symbol(sym,punt) \
@@ -163,4 +166,11 @@ extern int m68k_parse_long_option PARAMS ((char *));
 extern struct relax_type md_relax_table[];
 #define TC_GENERIC_RELAX_TABLE md_relax_table
 
+/* Copied from write.c */
+/* This was formerly called M68K_AIM_KLUDGE.  */
+#define md_prepare_relax_scan(fragP, address, aim, this_state, this_type) \
+  if (aim==0 && this_state== 4) { /* hard encoded from tc-m68k.c */ \
+    aim=this_type->rlx_forward+1; /* Force relaxation into word mode */ \
+  }
+
 /* end of tc-m68k.h */
index 08084af71113abace1d834f78e30a3ea35041c61..7c4e23a447097a05022bb61214f05c3131166862 100644 (file)
@@ -1,5 +1,5 @@
 /* read.c - read a source file -
-   Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 1996
+   Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 1997
    Free Software Foundation, Inc.
 
 This file is part of GAS, the GNU Assembler.
@@ -692,7 +692,16 @@ read_a_source_file (name)
                              || ! ((pop->poc_handler == cons
                                     && pop->poc_val == 1)
                                    || (pop->poc_handler == s_space
-                                       && pop->poc_val == 1))))
+                                       && pop->poc_val == 1)
+#ifdef tc_conditional_pseudoop
+                                   || tc_conditional_pseudoop (pop)
+#endif
+                                   || pop->poc_handler == s_if
+                                   || pop->poc_handler == s_ifdef
+                                   || pop->poc_handler == s_ifc
+                                   || pop->poc_handler == s_ifeqs
+                                   || pop->poc_handler == s_else
+                                   || pop->poc_handler == s_endif)))
                        {
                          do_align (1, (char *) NULL, 0);
                          mri_pending_align = 0;
This page took 0.037391 seconds and 4 git commands to generate.