diff -ur orig/calls.c ./calls.c
--- orig/calls.c	Fri Nov  4 21:57:08 1994
+++ ./calls.c	Fri Nov  4 22:56:02 1994
@@ -2168,6 +2168,12 @@
 
   argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
 
+/* how would you do this RIGHT ?? fake a DECL node? dunno... */
+#ifdef ENCODE_SECTION_INFO
+  /* mark it as a function (to be in the text section that is) */
+  SYMBOL_REF_FLAG (fun) = 1;
+#endif
+
   INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
 
   args_size.constant = 0;
@@ -2473,6 +2479,11 @@
      library functions shouldn't have many args.  */
 
   argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
+
+#ifdef ENCODE_SECTION_INFO
+  /* mark it as a function (to be in the text section that is) */
+  SYMBOL_REF_FLAG (fun) = 1;
+#endif
 
   INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
 
diff -ur orig/config/m68k/m68k.c ./config/m68k/m68k.c
--- orig/config/m68k/m68k.c	Mon Jul 18 19:22:36 1994
+++ ./config/m68k/m68k.c	Thu Oct 27 10:49:40 1994
@@ -229,7 +229,7 @@
       asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
 #endif
     }
-  if (flag_pic && current_function_uses_pic_offset_table)
+  if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
     {
 #ifdef MOTOROLA
       asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
@@ -818,9 +818,17 @@
   /* First handle a simple SYMBOL_REF or LABEL_REF */
   if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
     {
+#ifdef LEGITIMATE_BASEREL_OPERAND_P
+      if (LEGITIMATE_BASEREL_OPERAND_P (orig))
+	return orig;
+#endif
+
       if (reg == 0)
 	abort ();
 
+      if (flag_pic == 3)
+        pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
+      else
       pic_ref = gen_rtx (MEM, Pmode,
 			 gen_rtx (PLUS, Pmode,
 				  pic_offset_table_rtx, orig));
@@ -1882,6 +1890,9 @@
       output_address (XEXP (op, 0));
       if (letter == 'd' && ! TARGET_68020
 	  && CONSTANT_ADDRESS_P (XEXP (op, 0))
+	  && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+	       && SYMBOL_REF_FLAG (XEXP (op, 0))
+	       && !SYMBOL_REF_USED (XEXP (op, 0)))
 	  && !(GET_CODE (XEXP (op, 0)) == CONST_INT
 	       && INTVAL (XEXP (op, 0)) < 0x8000
 	       && INTVAL (XEXP (op, 0)) >= -0x8000))
@@ -2167,6 +2178,8 @@
 	          fprintf (file, ":w");
 	        if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
 	          fprintf (file, ":l");
+	        if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
+	          fprintf (file, ":w");
 	      }
 	    if (addr != 0 && ireg != 0)
 	      {
@@ -2231,6 +2244,18 @@
 	    fprintf (file, "%d:w", INTVAL (addr));
 #endif
 	  }
+	else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
+		 && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
+	  {
+#ifdef MOTOROLA
+	    output_addr_const (file, addr);
+	    fputs ("(pc)", file);
+#else
+	    fputs ("pc@(", file);
+	    output_addr_const (file, addr);
+	    putc (')', file);
+#endif
+	  }
 	else
 	  {
 	    output_addr_const (file, addr);
@@ -2297,3 +2322,19 @@
 
   return 0;
 }
+
+#ifdef ENCODE_SECTION_INFO
+/* Does operand (which is a symbolic_operand) live in text space? If
+   so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
+
+int
+read_only_operand (operand)
+     rtx operand;
+{
+  if (GET_CODE (operand) == CONST)
+    operand = XEXP (XEXP (operand, 0), 0);
+  if (GET_CODE (operand) == SYMBOL_REF)
+    return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
+  return 1;
+}
+#endif
diff -ur orig/config/m68k/m68k.h ./config/m68k/m68k.h
--- orig/config/m68k/m68k.h	Mon Jul 18 19:22:36 1994
+++ ./config/m68k/m68k.h	Thu Oct 27 10:51:58 1994
@@ -92,6 +92,12 @@
 /* Use the 68040-only fp instructions (-m68040).  */
 #define TARGET_68040_ONLY (target_flags & 01000)
 
+/* Use PC-relative addressing for refs to read-only data */
+#define TARGET_PC_REL (target_flags & 02000)
+
+/* Use base-relative addressing for refs to data&bss segments */
+#define TARGET_BASE_REL (target_flags & 04000)
+
 /* Macro to define tables used to set the flags.
    This is a list in braces of pairs in braces,
    each pair being { "NAME", VALUE }
@@ -356,6 +362,9 @@
 {                                               \
   if (flag_pic)                                 \
     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
+  /* prevent saving/restoring of the base reg */ \
+  if (flag_pic == 3)				 \
+    call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
 }
 
 #else /* defined SUPPORT_SUN_FPA */
@@ -380,6 +389,9 @@
     } 						\
   if (flag_pic)                                 \
     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
+  /* prevent saving/restoring of the base reg */ \
+  if (flag_pic == 3)				 \
+    call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
 }
 
 #endif /* defined SUPPORT_SUN_FPA */
@@ -1155,6 +1167,8 @@
        && GET_CODE (XEXP (X, 1)) == CONST_INT				\
        && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000)		\
    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
+       && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1)))		\
+   || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
        && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)		\
    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
        && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))		\
@@ -1221,7 +1234,8 @@
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\
 { GO_IF_NONINDEXED_ADDRESS (X, ADDR);					\
   GO_IF_INDEXED_ADDRESS (X, ADDR);					\
-  if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS	\
+  if (flag_pic && flag_pic != 3						\
+      && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS		\
       && LEGITIMATE_INDEX_P (XEXP (X, 0))				\
       && GET_CODE (XEXP (X, 1)) == LABEL_REF)				\
     goto ADDR; }
diff -ur orig/config/m68k/m68k.md ./config/m68k/m68k.md
--- orig/config/m68k/m68k.md	Fri Nov  4 22:00:06 1994
+++ ./config/m68k/m68k.md	Fri Nov  4 23:31:48 1994
@@ -711,6 +711,9 @@
   "
 {
   if (flag_pic && symbolic_operand (operands[1], SImode)) 
+#ifdef LEGITIMATE_BASEREL_OPERAND_P
+   if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
+#endif
     {
       /* The source is an address which requires PIC relocation.  
          Call legitimize_pic_address with the source, mode, and a relocation
@@ -1018,6 +1021,17 @@
 	  return \"st %0\";
 	}
     }
+  if (GET_CODE (operands[1]) == CONST_INT
+      && DATA_REG_P (operands[0])
+      && INTVAL (operands[1]) < 128
+      && INTVAL (operands[1]) >= -128)
+    {
+#if defined(MOTOROLA) && !defined(CRDS)
+      return \"moveq%.l %1,%0\";
+#else
+      return \"moveq %1,%0\";
+#endif
+    }
   if (GET_CODE (operands[1]) != CONST_INT && CONSTANT_P (operands[1]))
     return \"move%.l %1,%0\";
   if (ADDRESS_REG_P (operands[0]) || ADDRESS_REG_P (operands[1]))
@@ -3477,7 +3491,7 @@
 (define_insn "ashlsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(ashift:SI (match_operand:SI 1 "register_operand" "0")
-		   (match_operand:SI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "*
 {
@@ -3489,14 +3503,14 @@
 (define_insn "ashlhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(ashift:HI (match_operand:HI 1 "register_operand" "0")
-		   (match_operand:HI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asl%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(ashift:HI (match_dup 0)
-		   (match_operand:HI 1 "general_operand" "dI")))]
+		   (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "asl%.w %1,%0")
 
@@ -3540,21 +3554,21 @@
 (define_insn "ashrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(ashiftrt:SI (match_operand:SI 1 "register_operand" "0")
-		     (match_operand:SI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asr%.l %2,%0")
 
 (define_insn "ashrhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(ashiftrt:HI (match_operand:HI 1 "register_operand" "0")
-		     (match_operand:HI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asr%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(ashiftrt:HI (match_dup 0)
-		     (match_operand:HI 1 "general_operand" "dI")))]
+		     (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "asr%.w %1,%0")
 
@@ -3606,21 +3620,21 @@
 (define_insn "lshrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(lshiftrt:SI (match_operand:SI 1 "register_operand" "0")
-		     (match_operand:SI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "lsr%.l %2,%0")
 
 (define_insn "lshrhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(lshiftrt:HI (match_operand:HI 1 "register_operand" "0")
-		     (match_operand:HI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "lsr%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(lshiftrt:HI (match_dup 0)
-		     (match_operand:HI 1 "general_operand" "dI")))]
+		     (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "lsr%.w %1,%0")
 
@@ -3643,14 +3657,14 @@
 (define_insn "rotlsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(rotate:SI (match_operand:SI 1 "register_operand" "0")
-		   (match_operand:SI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "rol%.l %2,%0")
 
 (define_insn "rotlhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(rotate:HI (match_operand:HI 1 "register_operand" "0")
-		   (match_operand:HI 2 "general_operand" "dI")))]
+		   (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "rol%.w %2,%0")
 
@@ -3658,7 +3672,7 @@
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(rotate:HI (match_dup 0)
-		   (match_operand:HI 1 "general_operand" "dI")))]
+		   (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "rol%.w %1,%0")
 
@@ -3679,21 +3693,21 @@
 (define_insn "rotrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
 	(rotatert:SI (match_operand:SI 1 "register_operand" "0")
-		     (match_operand:SI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "ror%.l %2,%0")
 
 (define_insn "rotrhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
 	(rotatert:HI (match_operand:HI 1 "register_operand" "0")
-		     (match_operand:HI 2 "general_operand" "dI")))]
+		     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "ror%.w %2,%0")
 
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
 	(rotatert:HI (match_dup 0)
-		     (match_operand:HI 1 "general_operand" "dI")))]
+		     (match_operand:QI 1 "general_operand" "dI")))]
   ""
   "ror%.w %1,%0")
 
@@ -4769,7 +4783,7 @@
   ""
   "
 {
-  if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
+  if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
 #ifdef MOTOROLA
     SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
 #else
@@ -4784,7 +4798,7 @@
 	 (match_operand:SI 1 "general_operand" "g"))]
   ;; Operand 1 not really used on the m68000.
 
-  "! flag_pic"
+  "! flag_pic || flag_pic == 3"
   "*
 #ifdef MOTOROLA
 #ifdef MOTOROLA_BSR
@@ -4804,7 +4818,7 @@
 	 (match_operand:SI 1 "general_operand" "g"))]
   ;; Operand 1 not really used on the m68000.
 
-  "flag_pic"
+  "flag_pic && flag_pic < 3"
   "*
 #ifdef MOTOROLA
   if (GET_CODE (operands[0]) == MEM 
@@ -4829,7 +4843,7 @@
   ""
   "
 {
-  if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
+  if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
 #ifdef MOTOROLA
     SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
 #else
@@ -4844,7 +4858,7 @@
 	(call (match_operand:QI 1 "memory_operand" "o")
 	      (match_operand:SI 2 "general_operand" "g")))]
   ;; Operand 2 not really used on the m68000.
-  "! flag_pic"
+  "! flag_pic || flag_pic == 3"
   "*
 #ifdef MOTOROLA
 #ifdef MOTOROLA_BSR
@@ -4864,7 +4878,7 @@
 	(call (match_operand:QI 1 "memory_operand" "o")
 	      (match_operand:SI 2 "general_operand" "g")))]
   ;; Operand 2 not really used on the m68000.
-  "flag_pic"
+  "flag_pic && flag_pic < 3"
   "*
 #ifdef MOTOROLA
   if (GET_CODE (operands[1]) == MEM 
@@ -5182,6 +5196,52 @@
 	  (if_then_else
 	    (ge (plus:SI (match_operand:SI 0 "register_operand" "+d")
 		         (const_int -1))
+	        (const_int 0))
+	    (label_ref (match_operand 1 "" ""))
+	    (pc)))
+     (set (match_dup 0)
+	  (plus:SI (match_dup 0)
+		   (const_int -1)))])]
+  "DATA_REG_P (operands[0])"
+  "*
+{
+  CC_STATUS_INIT;
+  output_dbcc_and_branch (operands);
+  return \"\";
+}")
+
+(define_peephole
+  [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
+                             [(cc0) (const_int 0)])
+                           (label_ref (match_operand 2 "" ""))
+                           (pc)))
+   (parallel
+    [(set (pc)
+	  (if_then_else
+	    (ne (match_operand:HI 0 "register_operand" "+d")
+	        (const_int 0))
+	    (label_ref (match_operand 1 "" ""))
+	    (pc)))
+     (set (match_dup 0)
+	  (plus:HI (match_dup 0)
+		   (const_int -1)))])]
+  "DATA_REG_P (operands[0])"
+  "*
+{
+  CC_STATUS_INIT;
+  output_dbcc_and_branch (operands);
+  return \"\";
+}")
+
+(define_peephole
+  [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p"
+                             [(cc0) (const_int 0)])
+                           (label_ref (match_operand 2 "" ""))
+                           (pc)))
+   (parallel
+    [(set (pc)
+	  (if_then_else
+	    (ne (match_operand:SI 0 "register_operand" "+d")
 	        (const_int 0))
 	    (label_ref (match_operand 1 "" ""))
 	    (pc)))
diff -ur orig/config.guess ./config.guess
--- orig/config.guess	Fri Nov  4 22:02:00 1994
+++ ./config.guess	Fri Nov  4 23:52:28 1994
@@ -62,6 +62,9 @@
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
+    atari*:MiNT:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
     Pyramid*:OSx*:*:*)
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
 		echo pyramid-pyramid-sysv3
diff -ur orig/config.sub ./config.sub
--- orig/config.sub	Fri Nov  4 22:02:04 1994
+++ ./config.sub	Fri Nov  4 23:59:08 1994
@@ -178,6 +178,9 @@
 		basic_machine=m68k-apollo
 		os=-sysv
 		;;
+	atari)
+		basic_machine=m68k-atari
+		;;
 	balance)
 		basic_machine=ns32k-sequent
 		os=-dynix
@@ -340,6 +343,10 @@
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
+	mint)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
@@ -587,7 +594,7 @@
 	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-	      | -ptx* | -coff* | -winnt*)
+	      | -ptx* | -coff* | -winnt* | -mint*)
 		;;
 	-sunos5*)
 		os=`echo $os | sed -e 's|sunos5|solaris2|'`
@@ -778,6 +785,9 @@
 				;;
 			-genix*)
 				vendor=ns
+				;;
+			-mint*)
+				vendor=atari
 				;;
 			-mvs*)
 				vendor=ibm
diff -ur orig/configure ./configure
--- orig/configure	Fri Nov  4 22:02:14 1994
+++ ./configure	Sat Nov  5 00:05:34 1994
@@ -1053,6 +1053,18 @@
 		use_collect2=yes
 		header_files=math-68881.h
 		;;
+	m68k-atari-mint* | m68000-atari-mint*)	# Atari ST running MiNT
+       cpu_type=m68k
+		tm_file=m68k/mint.h
+		xm_file=m68k/xm-mint.h
+		tmake_file=m68k/t-mint
+		xmake_file=m68k/x-mint
+		fixincludes=Makefile.in
+		install_headers_dir=install-headers-cpio
+		case $machine in
+		  m68000-*-*) target_cpu_default=0 ;;
+		esac
+		;;
 	m68k-atari-sysv4*)              # Atari variant of V.4.
 		tm_file=m68k/atari.h
 		xm_file=m68k/xm-atari.h
diff -ur orig/getpwd.c ./getpwd.c
--- orig/getpwd.c	Fri Nov  4 22:24:22 1994
+++ ./getpwd.c	Sat Nov  5 00:32:38 1994
@@ -14,7 +14,7 @@
    BSD systems) now provides getcwd as called for by POSIX.  Allow for
    the few exceptions to the general rule here.  */
 
-#if !(defined (POSIX) || defined (USG) || defined (VMS)) || defined (HAVE_GETWD)
+#if !(defined (POSIX) || defined (USG) || defined (VMS) || defined (atarist)) || defined (HAVE_GETWD)
 #include <sys/param.h>
 extern char *getwd ();
 #define getcwd(buf,len) getwd(buf)
diff -ur orig/toplev.c ./toplev.c
--- orig/toplev.c	Fri Nov  4 22:27:42 1994
+++ ./toplev.c	Sat Nov  5 00:44:02 1994
@@ -3947,7 +3947,7 @@
 
   compile_file (filename);
 
-#if !defined(OS2) && !defined(VMS) && !defined(WINNT)
+#if !defined(OS2) && !defined(VMS) && !defined(WINNT) && !defined (atarist)
   if (flag_print_mem)
     {
 #ifdef __alpha
