CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2014-03-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Mar 18 23:43:41 UTC 2014

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: vax.c vax.h vax.md

Log Message:
Add a register definition for the Processor Status Word on VAX.
Change the unwind definition to specify the CFA base via %fp before
using it in the various register locations.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/gnu/dist/gcc4/gcc/config/vax/vax.c
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gcc4/gcc/config/vax/vax.h
cvs rdiff -u -r1.17 -r1.18 src/gnu/dist/gcc4/gcc/config/vax/vax.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.c
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.19 src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.20
--- src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.19	Mon Apr  8 12:10:53 2013
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.c	Tue Mar 18 23:43:40 2014
@@ -124,16 +124,22 @@ vax_output_function_prologue (FILE * fil
   if (dwarf2out_do_frame ())
 {
   const char *label = dwarf2out_cfi_label ();
-  int offset = 0;
+  int offset;
 
-  for (regno = FIRST_PSEUDO_REGISTER-1; regno >= 0; --regno)
-	if (regs_ever_live[regno] && !call_used_regs[regno])
-	  dwarf2out_reg_save (label, regno, offset -= 4);
-
-  dwarf2out_reg_save (label, PC_REGNUM, offset -= 4);
-  dwarf2out_reg_save (label, FRAME_POINTER_REGNUM, offset -= 4);
-  dwarf2out_reg_save (label, ARG_POINTER_REGNUM, offset -= 4);
-  dwarf2out_def_cfa (label, FRAME_POINTER_REGNUM, -(offset - 4));
+  offset = -20;
+  for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
+if (regs_ever_live[regno] && !call_used_regs[regno])
+  offset -= 4;
+
+  dwarf2out_def_cfa (label, FRAME_POINTER_REGNUM, -offset);
+  dwarf2out_reg_save (label, PSW_REGNUM, offset += 4);
+  dwarf2out_reg_save (label, ARG_POINTER_REGNUM, offset += 4);
+  dwarf2out_reg_save (label, FRAME_POINTER_REGNUM, offset += 4);
+  dwarf2out_reg_save (label, PC_REGNUM, offset += 4);
+
+  for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
+if (regs_ever_live[regno] && !call_used_regs[regno])
+  dwarf2out_reg_save (label, regno, offset += 4);
 }
 
   size -= STARTING_FRAME_OFFSET;

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.h
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.h:1.5 src/gnu/dist/gcc4/gcc/config/vax/vax.h:1.6
--- src/gnu/dist/gcc4/gcc/config/vax/vax.h:1.5	Mon Apr  2 16:44:17 2007
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.h	Tue Mar 18 23:43:40 2014
@@ -166,6 +166,9 @@ Boston, MA 02110-1301, USA.  */
 /* Specify the registers used for certain standard purposes.
The values of these macros are register numbers.  */
 
+/* VAX PSW for DWARF-2 */
+#define PSW_REGNUM VAX_PSW_REGNUM
+
 /* VAX pc is overloaded on a register.  */
 #define PC_REGNUM VAX_PC_REGNUM
 

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.17 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.18
--- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.17	Mon Apr  8 12:10:53 2013
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.md	Tue Mar 18 23:43:40 2014
@@ -40,6 +40,7 @@
(VAX_FP_REGNUM 13)	; Register 13 contains the frame pointer
(VAX_SP_REGNUM 14)	; Register 14 contains the stack pointer
(VAX_PC_REGNUM 15)	; Register 15 contains the program counter
+   (VAX_PSW_REGNUM 16)	; Program Status Word
   ]
 )
 



CVS commit: src/gnu/dist/gcc4/gcc/config

2014-03-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Mar 16 13:33:14 UTC 2014

Modified Files:
src/gnu/dist/gcc4/gcc/config: netbsd-elf.h

Log Message:
Link with --eh-frame-hdr.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gcc4/gcc/config/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/netbsd-elf.h
diff -u src/gnu/dist/gcc4/gcc/config/netbsd-elf.h:1.3 src/gnu/dist/gcc4/gcc/config/netbsd-elf.h:1.4
--- src/gnu/dist/gcc4/gcc/config/netbsd-elf.h:1.3	Mon Aug 12 21:22:18 2013
+++ src/gnu/dist/gcc4/gcc/config/netbsd-elf.h	Sun Mar 16 13:33:14 2014
@@ -81,7 +81,7 @@ Boston, MA 02110-1301, USA.  */
Target-specific code must provide the %(netbsd_entry_point) spec.  */
 
 #define NETBSD_LINK_SPEC_ELF \
-  "%{assert*} %{R*} %{rpath*} \
+  "--eh-frame-hdr %{assert*} %{R*} %{rpath*} \
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
%{!shared: \



CVS commit: src/gnu/dist/gcc4/gcc/config/arm

2013-01-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jan 25 08:32:04 UTC 2013

Modified Files:
src/gnu/dist/gcc4/gcc/config/arm: arm.h

Log Message:
Make GCC define __ARM_PCS and __ARM_PCS_VFP as defined by the ARM C Language
Extentions (clang already defines them):
__ARM_PCS is defined to 1 if the default procedure calling standard for
the translation unit conforms to the "base PCS" defined in [AAPCS].
__ARM_PCS_VFP is defined to 1 if the default is to pass floating-point
parameters in hardware floating-point registers using the "VFP variant PCS"
defined in [AAPCS].


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/arm/arm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/arm/arm.h
diff -u src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.2
--- src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1	Thu Apr 20 09:50:52 2006
+++ src/gnu/dist/gcc4/gcc/config/arm/arm.h	Fri Jan 25 08:32:04 2013
@@ -77,7 +77,12 @@ extern char arm_arch_name[];
 	if (arm_arch_iwmmxt)\
 	  builtin_define ("__IWMMXT__");		\
 	if (TARGET_AAPCS_BASED)\
-	  builtin_define ("__ARM_EABI__");		\
+	  {		\
+	builtin_define ("__ARM_EABI__");		\
+	builtin_define ("__ARM_PCS");		\
+	if (TARGET_HARD_FLOAT && TARGET_VFP)	\
+	  builtin_define ("__ARM_PCS_VFP");		\
+	  }		\
 } while (0)
 
 /* The various ARM cores.  */



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2012-07-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jul 16 17:39:29 UTC 2012

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: builtins.md vax.md

Log Message:
Fix ffssi2 again.
Use a UNSPEC for the internal ffs.
use (match_dup 1) since Z will be set if it is 0 just as if tst:SI was done.
This can let gcc produce better code if you code appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gcc4/gcc/config/vax/builtins.md
cvs rdiff -u -r1.15 -r1.16 src/gnu/dist/gcc4/gcc/config/vax/vax.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/builtins.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.3 src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.4
--- src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.3	Wed Jul 11 13:34:45 2012
+++ src/gnu/dist/gcc4/gcc/config/vax/builtins.md	Mon Jul 16 17:39:29 2012
@@ -25,7 +25,7 @@
   "
 {
   rtx label = gen_label_rtx ();
-  emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[1]));
+  emit_insn (gen_unspec_ffssi2 (operands[0], operands[1]));
   emit_jump_insn (gen_bne (label));
   emit_insn (gen_negsi2 (operands[0], const1_rtx));
   emit_label (label);
@@ -33,9 +33,15 @@
   DONE;
 }")
 
-(define_insn "ffssi2_internal"
+;;
+;; Set cc0 to match argument 1 since if it is 0, Z will be set just as
+;; if a tst:SI was performed.  If we did a match_dup 0, that wouldn't be
+;; right since 0 will be set to (0+32) [the position (relative to the base)
+;; of a bit one position to the left of the specified field].
+;;
+(define_insn "unspec_ffssi2"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
-(ffs:SI (match_operand:SI 1 "general_operand" "nrQ")))
-   (set (cc0) (ffs:SI (match_operand:SI 2 "general_operand" "1")))]
+(unspec:SI [(match_operand:SI 1 "general_operand" "nrQ")] VUNSPEC_FFS))
+   (set (cc0) (match_dup 1))]
   ""
   "ffs $0,$32,%1,%0")

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.16
--- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15	Sun Feb  5 17:34:34 2012
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.md	Mon Jul 16 17:39:29 2012
@@ -34,6 +34,8 @@
   [(VUNSPEC_BLOCKAGE 0)	; `blockage' insn to prevent scheduling across an
 			; insn in the code.
(VUNSPEC_SYNC_ISTREAM 1) ; sequence of insns to sync the I-stream
+   (VUNSPEC_FFS 2)  ; internal FFS for the expand
+   (VUNSPEC_FFC 3)  ; internal FFC for the expand
(VAX_AP_REGNUM 12)	; Register 12 contains the argument pointer
(VAX_FP_REGNUM 13)	; Register 13 contains the frame pointer
(VAX_SP_REGNUM 14)	; Register 14 contains the stack pointer



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2012-07-11 Thread Anders Magnusson
Module Name:src
Committed By:   ragge
Date:   Wed Jul 11 13:34:45 UTC 2012

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: builtins.md

Log Message:
Bugfix builtin ffs, fixes PR port-vax/46677, fix from Paul Koning.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gcc4/gcc/config/vax/builtins.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/builtins.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2 src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.3
--- src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2	Mon Apr  2 16:45:39 2007
+++ src/gnu/dist/gcc4/gcc/config/vax/builtins.md	Wed Jul 11 13:34:45 2012
@@ -25,7 +25,7 @@
   "
 {
   rtx label = gen_label_rtx ();
-  emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[0]));
+  emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[1]));
   emit_jump_insn (gen_bne (label));
   emit_insn (gen_negsi2 (operands[0], const1_rtx));
   emit_label (label);
@@ -36,6 +36,6 @@
 (define_insn "ffssi2_internal"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
 (ffs:SI (match_operand:SI 1 "general_operand" "nrQ")))
-   (set (cc0) (match_operand:SI 2 "nonimmediate_operand" "0"))]
+   (set (cc0) (ffs:SI (match_operand:SI 2 "general_operand" "1")))]
   ""
   "ffs $0,$32,%1,%0")



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2012-02-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb  5 17:34:34 UTC 2012

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: vax.c vax.md

Log Message:
Use REG_P, CONST_INT_P, and gcc_unreachable.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/gnu/dist/gcc4/gcc/config/vax/vax.c
cvs rdiff -u -r1.14 -r1.15 src/gnu/dist/gcc4/gcc/config/vax/vax.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.c
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.17 src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.18
--- src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.17	Thu Feb  2 18:33:03 2012
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.c	Sun Feb  5 17:34:34 2012
@@ -1097,14 +1097,14 @@ vax_output_int_move (rtx insn ATTRIBUTE_
 	  || GET_CODE (XEXP (operands[0], 0)) == PRE_DEC
 	  || GET_CODE (XEXP (operands[0], 0)) == POST_INC
 	  || !illegal_addsub_di_memory_operand (operands[0], DImode))
-	  && ((GET_CODE (operands[1]) == CONST_INT
+	  && ((CONST_INT_P (operands[1])
 	   && (unsigned HOST_WIDE_INT) INTVAL (operands[1]) >= 64)
 	  || GET_CODE (operands[1]) == CONST_DOUBLE))
 	{
 	  hi[0] = operands[0];
 	  hi[1] = operands[1];
 
-	  split_quadword_operands(insn, SET, hi, lo, 2);
+	  split_quadword_operands (insn, SET, hi, lo, 2);
 
 	  pattern_lo = vax_output_int_move (NULL, lo, SImode);
 	  pattern_hi = vax_output_int_move (NULL, hi, SImode);
@@ -1549,12 +1549,12 @@ mkrtx(enum rtx_code code, enum machine_m
   rtx b = XEXP (base, 1);
   if (GET_CODE (b) == CONST)
 	b = XEXP (b, 0);
-  if (GET_CODE (b) == CONST_INT)
+  if (CONST_INT_P (b))
 	{
   off += INTVAL (b);
   base = a;
 	}
-  else if (GET_CODE (a) == REG && GET_CODE (b) == SYMBOL_REF)
+  else if (REG_P (a) && GET_CODE (b) == SYMBOL_REF)
 	{
 	  if (off != 0)
 	{
@@ -1562,7 +1562,7 @@ mkrtx(enum rtx_code code, enum machine_m
 	  off = 0;
 	}
 	}
-  else if (GET_CODE (a) == REG && GET_CODE (b) == PLUS)
+  else if (REG_P (a) && GET_CODE (b) == PLUS)
 	{
   off += INTVAL (XEXP (b, 1));
 	  base = gen_rtx_PLUS (Pmode, a, plus_constant(XEXP (b, 0), off));
@@ -1570,8 +1570,8 @@ mkrtx(enum rtx_code code, enum machine_m
 	}
   else
 {
-	  print_rtl(stderr, base); fprintf(stderr, "\n");
-	  gcc_assert(0);
+	  debug_rtx(base);
+	  gcc_unreachable ();
 	}
 }
   if (code == POST_INC)

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.14 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15
--- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.14	Tue Jul 27 16:30:38 2010
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.md	Sun Feb  5 17:34:34 2012
@@ -191,7 +191,7 @@
   ""
   "*
 {
-  if (GET_CODE (operands[1]) == CONST_INT)
+  if (CONST_INT_P (operands[1]))
 {
   int i = INTVAL (operands[1]);
   if (i == 0)
@@ -212,7 +212,7 @@
   ""
   "*
 {
-  if (GET_CODE (operands[1]) == CONST_INT)
+  if (CONST_INT_P (operands[1]))
 {
   int i = INTVAL (operands[1]);
   if (i == 0)
@@ -565,14 +565,14 @@
   rtx op1 = operands[1];
 
   /* If there is a constant argument, complement that one.  */
-  if (GET_CODE (operands[2]) == CONST_INT && GET_CODE (op1) != CONST_INT)
+  if (CONST_INT_P (operands[2]) && ! CONST_INT_P (op1))
 {
   operands[1] = operands[2];
   operands[2] = op1;
   op1 = operands[1];
 }
 
-  if (GET_CODE (op1) == CONST_INT)
+  if (CONST_INT_P (op1))
 operands[1] = GEN_INT (~INTVAL (op1));
   else
 operands[1] = expand_unop (mode, one_cmpl_optab, op1, 0, 1);
@@ -658,7 +658,7 @@
   ""
   "
 {
-  if (GET_CODE (operands[2]) != CONST_INT)
+  if (! CONST_INT_P (operands[2]))
 operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2]));
 }")
 
@@ -685,8 +685,7 @@
 {
   if (operands[2] == const1_rtx && rtx_equal_p (operands[0], operands[1]))
 return \"addl2 %0,%0\";
-  if (GET_CODE (operands[1]) == REG
-  && GET_CODE (operands[2]) == CONST_INT)
+  if (REG_P (operands[1]) && CONST_INT_P (operands[2]))
 {
   int i = INTVAL (operands[2]);
   if (i == 1)
@@ -760,7 +759,7 @@
   ""
   "
 {
-  if (GET_CODE (operands[2]) != CONST_INT)
+  if (! CONST_INT_P (operands[2]))
 operands[2] = gen_rtx_NEG (QImode, negate_rtx (QImode, operands[2]));
 }")
 
@@ -806,7 +805,7 @@
 	(match_operand:SI 3 "general_operand" "g"))]
"(INTVAL (operands[1]) == 8 || INTVAL (operands[1]) == 16)
&& INTVAL (operands[2]) % INTVAL (operands[1]) == 0
-   && (GET_CODE (operands[0]) == REG
+   && (REG_P (operands[0])
|| ! mode_dependent_address_p (XEXP (operands[0], 0)))"
   "*
 {
@@ -834,7 +833,7 @@
 			 (match_operand:SI 3 "const_int_operand" "n")))]
   "(INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16)
&& INTVAL (operands[3]) % INTVAL (operands[2]) == 0
-   && (GET_CODE (operands[1]) == REG
+   && (REG_P (operands[1])
|| ! mode_dep

CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2012-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb  2 18:33:04 UTC 2012

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: vax.c

Log Message:
Handle another case the new gcc_assert(0) caught.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/gnu/dist/gcc4/gcc/config/vax/vax.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.c
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.16 src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.17
--- src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.16	Thu Feb  2 13:32:17 2012
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.c	Thu Feb  2 18:33:03 2012
@@ -1547,6 +1547,8 @@ mkrtx(enum rtx_code code, enum machine_m
 {
   rtx a = XEXP (base, 0);
   rtx b = XEXP (base, 1);
+  if (GET_CODE (b) == CONST)
+	b = XEXP (b, 0);
   if (GET_CODE (b) == CONST_INT)
 	{
   off += INTVAL (b);
@@ -1567,7 +1569,10 @@ mkrtx(enum rtx_code code, enum machine_m
 	  off = 0;
 	}
   else
-	gcc_assert(0);
+{
+	  print_rtl(stderr, base); fprintf(stderr, "\n");
+	  gcc_assert(0);
+	}
 }
   if (code == POST_INC)
 tmp = gen_rtx_POST_INC (SImode, base);



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2012-02-02 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb  2 13:32:18 UTC 2012

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: vax.c

Log Message:
Fix a bug in movmemsi in which couldn't handle sym(reg) expressions properly.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/gnu/dist/gcc4/gcc/config/vax/vax.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.c
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.15 src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.16
--- src/gnu/dist/gcc4/gcc/config/vax/vax.c:1.15	Fri Apr 20 16:30:32 2007
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.c	Thu Feb  2 13:32:17 2012
@@ -1545,8 +1545,29 @@ mkrtx(enum rtx_code code, enum machine_m
 
   if (GET_CODE (base) == PLUS)
 {
-  off += INTVAL (XEXP (base, 1));
-  base = XEXP (base, 0);
+  rtx a = XEXP (base, 0);
+  rtx b = XEXP (base, 1);
+  if (GET_CODE (b) == CONST_INT)
+	{
+  off += INTVAL (b);
+  base = a;
+	}
+  else if (GET_CODE (a) == REG && GET_CODE (b) == SYMBOL_REF)
+	{
+	  if (off != 0)
+	{
+	  base = gen_rtx_PLUS (Pmode, a, plus_constant(b, off));
+	  off = 0;
+	}
+	}
+  else if (GET_CODE (a) == REG && GET_CODE (b) == PLUS)
+	{
+  off += INTVAL (XEXP (b, 1));
+	  base = gen_rtx_PLUS (Pmode, a, plus_constant(XEXP (b, 0), off));
+	  off = 0;
+	}
+  else
+	gcc_assert(0);
 }
   if (code == POST_INC)
 tmp = gen_rtx_POST_INC (SImode, base);



CVS commit: src/gnu/dist/gcc4/gcc/config/rs6000

2011-06-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jun 11 00:57:29 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/rs6000: netbsd.h

Log Message:
If we are compiling -msoft-float, define _SOFT_FLOAT


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.7 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.8
--- src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.7	Sat Mar 12 07:57:38 2011
+++ src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h	Sat Jun 11 00:57:29 2011
@@ -46,6 +46,8 @@
   builtin_assert ("machine=powerpc");	\
   if (TARGET_SECURE_PLT)			\
 builtin_define ("_SECURE_PLT");		\
+  if (TARGET_SOFT_FLOAT)			\
+builtin_define ("_SOFT_FLOAT");		\
 }		\
   while (0)
 



CVS commit: src/gnu/dist/gcc4/gcc/config/m68k

2011-06-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jun  7 14:22:14 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/m68k: fpgnulib.c lb1sf68.asm

Log Message:
Pull following m68k softfloat fixes from upstream:
---
Revision 109143
2005-12-29  Paul Brook  
* config/m68k/fpgnulib.c (__extendsfdf2): Handle negative zero.
(__truncdfsf2): Ditto.
(__extenddfxf2): Ditto.
(__truncxfdf2): Ditto.
* config/m68k/lb1sf68.asm (__addsf3): Return -0.0 for -0.0 + -0.0.
(__adddf3): Ditto.
---
Revision 109145
2005-12-29  Paul Brook  
* config/m68k/lb1sf68.asm (__cmpdf2): Fix typo in immediate mask.
Create wrapper and rename body...
(__cmpdf2_internal): ... to this.  Return correct value for unordered
result.
(__cmpsf2): Create wrapper and rename body...
(__cmpsf2_internal): ... to this.  Return corerct value for unordered
result.
(__eqdf2, __nedf2, __gtdf2, __gedf2, __ltdf2, __ledf2): Use
__cmpdf2_internal.
(__eqsf2, __nesf2, __gtsf2, __gesf2, __ltsf2, __lesf2): Use
__cmpsf2_internal.
---
Revision 110744
* gcc/config/m68k/lb1sf68.asm (__divsf3, __divdf3, __mulsf3,
__muldf3): Return a correctly signed zero.
---

Note:
 - lb1sf68.asm revision 110744 is still GPLv2.
 - fpgnulib.c is not GPLed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/m68k/lb1sf68.asm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c
diff -u src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.3 src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.4
--- src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.3	Mon Jun  6 12:02:26 2011
+++ src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c	Tue Jun  7 14:22:14 2011
@@ -241,13 +241,13 @@
 
   fl1.f = a1;
 
-  if (!fl1.l)
+  dl.l.upper = SIGN (fl1.l);
+  if ((fl1.l & ~SIGNBIT) == 0)
 {
-  dl.l.upper = dl.l.lower = 0;
+  dl.l.lower = 0;
   return dl.d;
 }
 
-  dl.l.upper = SIGN (fl1.l);
   exp = EXP(fl1.l);
   mant = MANT (fl1.l) & ~HIDDEN;
   if (exp == 0)
@@ -280,8 +280,11 @@
 
   dl1.d = a1;
 
-  if (!dl1.l.upper && !dl1.l.lower)
-return 0;
+  if ((dl1.l.upper & ~SIGNBIT) == 0 && !dl1.l.lower)
+{
+  fl.l = SIGND(dl1);
+  return fl.f;
+}
 
   exp = EXPD (dl1) - EXCESSD + EXCESS;
 
@@ -399,10 +402,14 @@
   dl.d = d;
   /*printf ("dfxf in: %g\n", d);*/
 
-  if (!dl.l.upper && !dl.l.lower)
-return 0;
-
   ldl.l.upper = SIGND (dl);
+  if ((dl.l.upper & ~SIGNBIT) == 0 && !dl.l.lower)
+{
+  ldl.l.middle = 0;
+  ldl.l.lower = 0;
+  return ldl.ld;
+}
+
   exp = EXPD (dl) - EXCESSD + EXCESSX;
   ldl.l.upper |= exp << 16;
   ldl.l.middle = HIDDENX;
@@ -428,14 +435,17 @@
   ldl.ld = ld;
   /*printf ("xfdf in: %s\n", dumpxf (ld));*/
 
-  if (!ldl.l.upper && !ldl.l.middle && !ldl.l.lower)
-return 0;
+  dl.l.upper = SIGNX (ldl);
+  if ((ldl.l.upper & ~SIGNBIT) == 0 && !ldl.l.middle && !ldl.l.lower)
+{
+  dl.l.lower = 0;
+  return dl.d;
+}
 
   exp = EXPX (ldl) - EXCESSX + EXCESSD;
   /* ??? quick and dirty: keep `exp' sane */
   if (exp >= EXPDMASK)
 exp = EXPDMASK - 1;
-  dl.l.upper = SIGNX (ldl);
   dl.l.upper |= exp << (32 - (EXPDBITS + 1));
   /* +1-1: add one for sign bit, but take one off for explicit-integer-bit */
   dl.l.upper |= (ldl.l.middle & MANTXMASK) >> (EXPDBITS + 1 - 1);

Index: src/gnu/dist/gcc4/gcc/config/m68k/lb1sf68.asm
diff -u src/gnu/dist/gcc4/gcc/config/m68k/lb1sf68.asm:1.1.1.1 src/gnu/dist/gcc4/gcc/config/m68k/lb1sf68.asm:1.2
--- src/gnu/dist/gcc4/gcc/config/m68k/lb1sf68.asm:1.1.1.1	Thu Apr 20 09:45:59 2006
+++ src/gnu/dist/gcc4/gcc/config/m68k/lb1sf68.asm	Tue Jun  7 14:22:14 2011
@@ -599,6 +599,7 @@
 	.globl SYM (__divdf3)
 	.globl SYM (__negdf2)
 	.globl SYM (__cmpdf2)
+	.globl SYM (__cmpdf2_internal)
 
 	.text
 	.even
@@ -1285,7 +1286,12 @@
 | Return b (if a is zero)
 	movel	d2,d0
 	movel	d3,d1
-	bra	1f
+	bne	1f			| Check if b is -0
+	cmpl	IMM (0x8000),d0
+	bne	1f
+	andl	IMM (0x8000),d7	| Use the sign of a
+	clrl	d0
+	bra	Ladddf$ret
 Ladddf$a:
 	movel	a6@(8),d0
 	movel	a6@(12),d1
@@ -1665,16 +1671,16 @@
 #ifndef __mcoldfire__
 	exg	d2,d0		| put b (==0) into d0-d1
 	exg	d3,d1		| and a (with sign bit cleared) into d2-d3
+	movel	a0,d0		| set result sign
 #else
-	movel	d2,d7
-	movel	d0,d2
-	movel	d7,d0
-	movel	d3,d7
+	movel	d0,d2		| put a into d2-d3
 	movel	d1,d3
-	movel	d7,d1
+	movel	a0,d0		| put result zero into d0-d1
+	movq	IMM(0),d1
 #endif
 	bra	1f
 Lmuldf$a$0:
+	movel	a0,d0		| set result sign
 	movel	a6@(16),d2	| put b into d2-d3 again
 	movel	a6@(20),d3	|
 	bclr	IMM (31),d2	| clear sign bit
@@ -1952,7 +1958,7 @@
 Ldivdf$a$0:
 | If a is zero check to see whether b is zero also. In that case return
 | NaN; 

CVS commit: src/gnu/dist/gcc4/gcc/config/m68k

2011-06-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun  6 12:02:26 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/m68k: fpgnulib.c

Log Message:
Pull the following revision from upstream to provide __unordsf2() and
other missing softfloat functions:
---
Revision 108487
2005-12-13  Paul Brook  
* config/m68k/fpgnulib.c (__unordsf2, __unorddf2, __unordxf2,
__floatunsidf, __floatunsisf, __floatunsixf): New functions.
---

Fixes link errors of sources that refer isnan() on m68000.

Note this file is not GPLed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c
diff -u src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.2 src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.3
--- src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.2	Thu May 19 03:18:01 2011
+++ src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c	Mon Jun  6 12:02:26 2011
@@ -105,6 +105,69 @@
 
 #ifndef EXTFLOAT
 
+int
+__unordsf2(float a, float b)
+{
+  union float_long fl;
+
+  fl.f = a;
+  if (EXP(fl.l) == EXP(~0u) && (MANT(fl.l) & ~HIDDEN) != 0)
+return 1;
+  fl.f = b;
+  if (EXP(fl.l) == EXP(~0u) && (MANT(fl.l) & ~HIDDEN) != 0)
+return 1;
+  return 0;
+}
+
+int
+__unorddf2(double a, double b)
+{
+  union double_long dl;
+
+  dl.d = a;
+  if (EXPD(dl) == EXPDMASK
+  && ((dl.l.upper & MANTDMASK) != 0 || dl.l.lower != 0))
+return 1;
+  dl.d = b;
+  if (EXPD(dl) == EXPDMASK
+  && ((dl.l.upper & MANTDMASK) != 0 || dl.l.lower != 0))
+return 1;
+  return 0;
+}
+
+/* convert unsigned int to double */
+double
+__floatunsidf (unsigned long a1)
+{
+  long exp = 32 + EXCESSD;
+  union double_long dl;
+
+  if (!a1)
+{
+  dl.l.upper = dl.l.lower = 0;
+  return dl.d;
+}
+
+  while (a1 < 0x200L)
+{
+  a1 <<= 4;
+  exp -= 4;
+}
+
+  while (a1 < 0x8000L)
+{
+  a1 <<= 1;
+  exp--;
+}
+
+  /* pack up and go home */
+  dl.l.upper = exp << 20L;
+  dl.l.upper |= (a1 >> 11L) & ~HIDDEND;
+  dl.l.lower = a1 << 21L;
+
+  return dl.d;
+}
+
 /* convert int to double */
 double
 __floatsidf (long a1)
@@ -151,6 +214,14 @@
   return dl.d;
 }
 
+/* convert unsigned int to float */
+float
+__floatunsisf (unsigned long l)
+{
+  double foo = __floatunsidf (l);
+  return foo;
+}
+
 /* convert int to float */
 float
 __floatsisf (long l)
@@ -292,6 +363,7 @@
We assume all numbers are normalized, don't do any rounding, etc.  */
 
 /* Prototypes for the above in case we use them.  */
+double __floatunsidf (unsigned long);
 double __floatsidf (long);
 float __floatsisf (long);
 double __extendsfdf2 (float);
@@ -300,6 +372,22 @@
 long __fixsfsi (float);
 int __cmpdf2 (double, double);
 
+int
+__unordxf2(long double a, long double b)
+{
+  union long_double_long ldl;
+
+  ldl.ld = a;
+  if (EXPX(ldl) == EXPXMASK
+  && ((ldl.l.middle & MANTXMASK) != 0 || ldl.l.lower != 0))
+return 1;
+  ldl.ld = b;
+  if (EXPX(ldl) == EXPXMASK
+  && ((ldl.l.middle & MANTXMASK) != 0 || ldl.l.lower != 0))
+return 1;
+  return 0;
+}
+
 /* convert double to long double */
 long double
 __extenddfxf2 (double d)
@@ -382,6 +470,14 @@
   return foo;
 }
 
+/* convert an unsigned int to a long double */
+long double
+__floatunsixf (unsigned long l)
+{
+  double foo = __floatunsidf (l);
+  return foo;
+}
+
 /* convert a long double to an int */
 long
 __fixxfsi (long double ld)



CVS commit: src/gnu/dist/gcc4/gcc/config/m68k

2011-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 19 03:18:01 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/m68k: fpgnulib.c

Log Message:
Add missing prototype for __cmpdf2


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c
diff -u src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.1.1.1 src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.2
--- src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c:1.1.1.1	Thu Apr 20 05:45:48 2006
+++ src/gnu/dist/gcc4/gcc/config/m68k/fpgnulib.c	Wed May 18 23:18:01 2011
@@ -298,6 +298,7 @@
 float __truncdfsf2 (double);
 long __fixdfsi (double);
 long __fixsfsi (float);
+int __cmpdf2 (double, double);
 
 /* convert double to long double */
 long double



CVS commit: src/gnu/dist/gcc4/gcc/config

2011-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Apr 10 21:25:56 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config: netbsd.h

Log Message:
Add back a stylish new line.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/gnu/dist/gcc4/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/netbsd.h:1.7 src/gnu/dist/gcc4/gcc/config/netbsd.h:1.8
--- src/gnu/dist/gcc4/gcc/config/netbsd.h:1.7	Sun Apr 10 16:50:18 2011
+++ src/gnu/dist/gcc4/gcc/config/netbsd.h	Sun Apr 10 21:25:56 2011
@@ -96,6 +96,7 @@
 
 #undef STANDARD_LIBEXEC_PREFIX
 #define STANDARD_LIBEXEC_PREFIX		STANDARD_EXEC_PREFIX
+
 #endif /* NETBSD_NATIVE */
 
 



CVS commit: src/gnu/dist/gcc4/gcc/config/rs6000

2011-03-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Mar 12 07:57:38 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/rs6000: netbsd.h

Log Message:
Define HAVE_AS_TLS until our build tools figure out how to do it.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.6 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.7
--- src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.6	Fri Feb 25 22:36:10 2011
+++ src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h	Sat Mar 12 07:57:38 2011
@@ -129,7 +129,9 @@
  * but until the cross build does the right thing...)
  */
 #undef TARGET_SECURE_PLT
-#define TARGET_SECURE_PLT   secure_plt
+#define TARGET_SECURE_PLT secure_plt
+#undef HAVE_AS_TLS
+#define HAVE_AS_TLS 1
 
 #undef TARGET_E500
 #undef TARGET_E500_SINGLE



CVS commit: src/gnu/dist/gcc4/gcc/config/rs6000

2011-02-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 25 22:36:10 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/rs6000: netbsd.h

Log Message:
Explicitly make sure TARGET_SECURE_PLT is defined correctly rather than
relying on HAVE_AS_REL16 from "auto-host.h".


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.5 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.6
--- src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.5	Thu Feb 10 07:18:29 2011
+++ src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h	Fri Feb 25 22:36:10 2011
@@ -124,6 +124,13 @@
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN)
 
+/*
+ * We know we have the right binutils for this (we shouldn't need to do this
+ * but until the cross build does the right thing...)
+ */
+#undef TARGET_SECURE_PLT
+#define TARGET_SECURE_PLT   secure_plt
+
 #undef TARGET_E500
 #undef TARGET_E500_SINGLE
 #undef TARGET_E500_DOUBLE



CVS commit: src/gnu/dist/gcc4/gcc/config/rs6000

2011-01-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 18 00:19:28 UTC 2011

Modified Files:
src/gnu/dist/gcc4/gcc/config/rs6000: netbsd.h

Log Message:
Enable E500 (mpc85xx) support in GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.3 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.4
--- src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h:1.3	Sat May 13 10:38:33 2006
+++ src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h	Tue Jan 18 00:19:28 2011
@@ -121,6 +121,13 @@
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN)
 
+#undef TARGET_E500
+#undef TARGET_E500_SINGLE
+#undef TARGET_E500_DOUBLE
+#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
+#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
+#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
+
 /* Attempt to enable execute permissions on the stack.  */
 #define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK
 #ifdef L_trampoline



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2010-12-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 22 02:58:35 UTC 2010

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: elf.h

Log Message:
Emit DWARF relocation in its expected form


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/gnu/dist/gcc4/gcc/config/vax/elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/elf.h
diff -u src/gnu/dist/gcc4/gcc/config/vax/elf.h:1.3 src/gnu/dist/gcc4/gcc/config/vax/elf.h:1.4
--- src/gnu/dist/gcc4/gcc/config/vax/elf.h:1.3	Sat Mar 31 05:55:11 2007
+++ src/gnu/dist/gcc4/gcc/config/vax/elf.h	Wed Dec 22 02:58:35 2010
@@ -107,5 +107,5 @@
 fputs (integer_asm_op (SIZE, FALSE), FILE);		\
 fprintf (FILE, "%%pcrel%d(", SIZE * 8);		\
 assemble_name (FILE, LABEL);			\
-fputc (')', FILE);	\
+fprintf (FILE, "%+d)", SIZE);			\
   } while (0)



CVS commit: src/gnu/dist/gcc4/gcc/config/pa

2010-11-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Nov 25 21:37:04 UTC 2010

Modified Files:
src/gnu/dist/gcc4/gcc/config/pa: pa.c

Log Message:
Don't create weird notes section in hppa binaries.

XXX maybe pa_netbsd_file_start is the proper fix.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/gnu/dist/gcc4/gcc/config/pa/pa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/pa/pa.c
diff -u src/gnu/dist/gcc4/gcc/config/pa/pa.c:1.7 src/gnu/dist/gcc4/gcc/config/pa/pa.c:1.8
--- src/gnu/dist/gcc4/gcc/config/pa/pa.c:1.7	Sun Aug 31 09:51:32 2008
+++ src/gnu/dist/gcc4/gcc/config/pa/pa.c	Thu Nov 25 21:37:04 2010
@@ -5258,7 +5258,7 @@
 static void
 pa_linux_file_start (void)
 {
-  pa_file_start_file (1);
+  pa_file_start_file (0);
   pa_file_start_level ();
   pa_file_start_mcount ("CODE");
 }



CVS commit: src/gnu/dist/gcc4/gcc/config/pa

2010-11-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Nov 10 18:28:29 UTC 2010

Modified Files:
src/gnu/dist/gcc4/gcc/config/pa: pa-netbsd.h

Log Message:
Update pa-netbsd.h to match pa-linux.h where it should. That is, remove
local definitions of

ASM_PREFERRED_EH_DATA_FORMAT
ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX

and make it obvious we're not using local ASM_OUTPUT_INTERNAL_LABEL

This fixes the current build problems (and probably more)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/gnu/dist/gcc4/gcc/config/pa/pa-netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/pa/pa-netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/pa/pa-netbsd.h:1.4 src/gnu/dist/gcc4/gcc/config/pa/pa-netbsd.h:1.5
--- src/gnu/dist/gcc4/gcc/config/pa/pa-netbsd.h:1.4	Mon Nov 12 12:58:10 2007
+++ src/gnu/dist/gcc4/gcc/config/pa/pa-netbsd.h	Wed Nov 10 18:28:29 2010
@@ -19,43 +19,6 @@
 Boston, MA 02111-1307, USA.  */
 
 
-/* A C expression whose value is RTL representing the location of the
-   incoming return address at the beginning of any function, before the
-   prologue.  You only need to define this macro if you want to support
-   call frame debugging information like that provided by DWARF 2.  */
-#define INCOMING_RETURN_ADDR_RTX (gen_rtx_REG (word_mode, 2))
-#define DWARF_FRAME_RETURN_COLUMN (DWARF_FRAME_REGNUM (2))
-
-/* This macro chooses the encoding of pointers embedded in the exception
-   handling sections.  If at all possible, this should be defined such
-   that the exception handling section will not require dynamic relocations,
-   and so may be read-only.
-
-   FIXME: We use DW_EH_PE_aligned to output a PLABEL constructor for
-   global function pointers.  */
-/* XXXMRG: should we use the version in ?  */
-#undef ASM_PREFERRED_EH_DATA_FORMAT
-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			\
-  (CODE == 2 && GLOBAL ? DW_EH_PE_aligned : DW_EH_PE_absptr)
-
-/* Handle special EH pointer encodings.  Absolute, pc-relative, and
-   indirect are handled automatically.  Since pc-relative encoding is
-   not possible on the PA and we don't have the infrastructure for
-   data relative encoding, we use aligned plabels for global function
-   pointers.  */
-/* XXXMRG: should we use the version in ?  */
-#undef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX
-#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
-  do {	\
-if (((ENCODING) & 0x0F) == DW_EH_PE_aligned)			\
-  {	\
-	fputs (integer_asm_op (SIZE, FALSE), FILE);			\
-	fputs ("P%", FILE);		\
-	assemble_name (FILE, XSTR (ADDR, 0));\
-	goto DONE;			\
-  }	\
-} while (0)
-
 #undef TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()		\
   do		\
@@ -130,6 +93,9 @@
ASM_GENERATE_INTERNAL_LABEL(), so do not define it here.  */
 
 /* Use the default.  */
+#undef ASM_OUTPUT_INTERNAL_LABEL
+
+/* Use the default.  */
 #undef TARGET_ASM_GLOBALIZE_LABEL
 /* Globalizing directive for a label.  */
 #define GLOBAL_ASM_OP ".globl "



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2010-07-27 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 27 16:30:38 UTC 2010

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: vax.md

Log Message:
Don't use/rely on a constraint.  Move the constraint predicate
to the pattern's condition.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/gnu/dist/gcc4/gcc/config/vax/vax.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.13 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.14
--- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.13	Tue Jul 27 01:13:41 2010
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.md	Tue Jul 27 16:30:38 2010
@@ -1129,16 +1129,17 @@
 (define_insn ""
   [(set (pc)
 	(if_then_else
-	 (ne (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q")
+	 (ne (zero_extract:SI (match_operand:QI 0 "memory_operand" "g")
 			  (const_int 1)
 			  (const_int 0))
 	 (const_int 0))
 	 (label_ref (match_operand 1 "" ""))
 	 (pc)))]
-  "GET_CODE (XEXP (operands[0], 0)) != PLUS
-   || !REG_P (XEXP (XEXP (operands[0], 0), 0))
-   || !CONST_INT_P (XEXP (XEXP (operands[0], 0), 1))
-   || (INTVAL (XEXP (XEXP (operands[0], 0), 1)) & 3) == 0"
+  "! mode_dependent_address_p (XEXP (operands[0], 0))
+   && (GET_CODE (XEXP (operands[0], 0)) != PLUS
+   || !REG_P (XEXP (XEXP (operands[0], 0), 0))
+   || !CONST_INT_P (XEXP (XEXP (operands[0], 0), 1))
+   || (INTVAL (XEXP (XEXP (operands[0], 0), 1)) & 3) == 0)"
   "jlbs %0,%l1")
 
 (define_insn ""
@@ -1156,16 +1157,17 @@
 (define_insn ""
   [(set (pc)
 	(if_then_else
-	 (eq (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q")
+	 (eq (zero_extract:SI (match_operand:QI 0 "memory_operand" "g")
 			  (const_int 1)
 			  (const_int 0))
 	 (const_int 0))
 	 (label_ref (match_operand 1 "" ""))
 	 (pc)))]
-  "GET_CODE (XEXP (operands[0], 0)) != PLUS
-   || !REG_P (XEXP (XEXP (operands[0], 0), 0))
-   || !CONST_INT_P (XEXP (XEXP (operands[0], 0), 1))
-   || (INTVAL (XEXP (XEXP (operands[0], 0), 1)) & 3) == 0"
+  "! mode_dependent_address_p (XEXP (operands[0], 0))
+   && (GET_CODE (XEXP (operands[0], 0)) != PLUS
+   || !REG_P (XEXP (XEXP (operands[0], 0), 0))
+   || !CONST_INT_P (XEXP (XEXP (operands[0], 0), 1))
+   || (INTVAL (XEXP (XEXP (operands[0], 0), 1)) & 3) == 0)"
   "jlbc %0,%l1")
 
 (define_insn ""



CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2010-07-26 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jul 27 01:13:41 UTC 2010

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: vax.md

Log Message:
Only allow jbls/jblc x(r) iff (x & 3) == 0


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/gnu/dist/gcc4/gcc/config/vax/vax.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.12 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.13
--- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.12	Fri Apr 20 16:30:32 2007
+++ src/gnu/dist/gcc4/gcc/config/vax/vax.md	Tue Jul 27 01:13:41 2010
@@ -1129,30 +1129,56 @@
 (define_insn ""
   [(set (pc)
 	(if_then_else
-	 (ne (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q,g")
+	 (ne (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q")
 			  (const_int 1)
-			  (match_operand:SI 1 "general_operand" "I,nrmT"))
+			  (const_int 0))
+	 (const_int 0))
+	 (label_ref (match_operand 1 "" ""))
+	 (pc)))]
+  "GET_CODE (XEXP (operands[0], 0)) != PLUS
+   || !REG_P (XEXP (XEXP (operands[0], 0), 0))
+   || !CONST_INT_P (XEXP (XEXP (operands[0], 0), 1))
+   || (INTVAL (XEXP (XEXP (operands[0], 0), 1)) & 3) == 0"
+  "jlbs %0,%l1")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else
+	 (ne (zero_extract:SI (match_operand:QI 0 "memory_operand" "g")
+			  (const_int 1)
+			  (match_operand:SI 1 "general_operand" "nrmT"))
 	 (const_int 0))
 	 (label_ref (match_operand 2 "" ""))
 	 (pc)))]
   ""
-  "@
-   jlbs %0,%l2
-   jbs %1,%0,%l2")
+  "jbs %1,%0,%l2")
 
 (define_insn ""
   [(set (pc)
 	(if_then_else
-	 (eq (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q,g")
+	 (eq (zero_extract:SI (match_operand:QI 0 "memory_operand" "Q")
 			  (const_int 1)
-			  (match_operand:SI 1 "general_operand" "I,nrmT"))
+			  (const_int 0))
+	 (const_int 0))
+	 (label_ref (match_operand 1 "" ""))
+	 (pc)))]
+  "GET_CODE (XEXP (operands[0], 0)) != PLUS
+   || !REG_P (XEXP (XEXP (operands[0], 0), 0))
+   || !CONST_INT_P (XEXP (XEXP (operands[0], 0), 1))
+   || (INTVAL (XEXP (XEXP (operands[0], 0), 1)) & 3) == 0"
+  "jlbc %0,%l1")
+
+(define_insn ""
+  [(set (pc)
+	(if_then_else
+	 (eq (zero_extract:SI (match_operand:QI 0 "memory_operand" "g")
+			  (const_int 1)
+			  (match_operand:SI 1 "general_operand" "nrmT"))
 	 (const_int 0))
 	 (label_ref (match_operand 2 "" ""))
 	 (pc)))]
   ""
-  "@
-   jlbc %0,%l2
-   jbc %1,%0,%l2")
+  "jbc %1,%0,%l2")
 
 (define_insn ""
   [(set (pc)



CVS commit: src/gnu/dist/gcc4/gcc/config/rs6000

2010-03-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Mar 27 20:11:06 UTC 2010

Modified Files:
src/gnu/dist/gcc4/gcc/config/rs6000: netbsd64.h

Log Message:
don't include linux unwind support.  we don't do this on 32 bit ppc,
we don't have the symbols to support it, and it breaks c++ linking.
from dennis.c.fergu...@gmail.com in PR#43041.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h
diff -u src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h:1.5 src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h:1.6
--- src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h:1.5	Mon Feb  4 04:20:51 2008
+++ src/gnu/dist/gcc4/gcc/config/rs6000/netbsd64.h	Sat Mar 27 20:11:06 2010
@@ -571,6 +571,4 @@
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
-#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
-
 #define POWERPC_NETBSD



CVS commit: src/gnu/dist/gcc4/gcc/config/i386

2009-08-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Aug 16 17:33:14 UTC 2009

Modified Files:
src/gnu/dist/gcc4/gcc/config/i386: t-netbsd64

Log Message:
Use += in previous so the flags from config/t-netbsd aren't lost.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64
diff -u src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.2 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.3
--- src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.2	Sun Aug 16 13:16:52 2009
+++ src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64	Sun Aug 16 17:33:14 2009
@@ -12,4 +12,4 @@
 # crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables,
 # because then __FRAME_END__ might not be the last thing in .eh_frame
 # section.
-CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
+CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables



CVS commit: src/gnu/dist/gcc4/gcc/config/i386

2009-08-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug 16 13:16:53 UTC 2009

Modified Files:
src/gnu/dist/gcc4/gcc/config/i386: t-netbsd64

Log Message:
Pull in a hunk from t-linux64 for compile flags for CRTSTUFF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64
diff -u src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.1 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.2
--- src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.1	Sat Oct 11 05:03:43 2008
+++ src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64	Sun Aug 16 13:16:52 2009
@@ -7,3 +7,9 @@
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
+
+# The pushl in CTOR initialization interferes with frame pointer elimination.
+# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables,
+# because then __FRAME_END__ might not be the last thing in .eh_frame
+# section.
+CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables



CVS commit: src/gnu/dist/gcc4/gcc/config/mips

2009-08-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Aug 12 02:12:45 UTC 2009

Modified Files:
src/gnu/dist/gcc4/gcc/config/mips: netbsd.h

Log Message:
Merge most of the builtin_defines from Linux since they are far superior
to the ones NetBSD has and it allows easier porting.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/mips/netbsd.h
diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.2
--- src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1	Thu Apr 20 09:53:35 2006
+++ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h	Wed Aug 12 02:12:44 2009
@@ -29,28 +29,74 @@
 #define MACHINE_TYPE "NetBSD/mipsel ELF"
 #endif
 
-#define TARGET_OS_CPP_BUILTINS()			\
-  do			\
-{			\
-  NETBSD_OS_CPP_BUILTINS_ELF();			\
-  builtin_define ("__NO_LEADING_UNDERSCORES__");	\
-  builtin_define ("__GP_SUPPORT__");		\
-  if (TARGET_LONG64)\
-	builtin_define ("__LONG64");			\
-			\
-  if (TARGET_ABICALLS)\
-	builtin_define ("__ABICALLS__");		\
-			\
-  if (mips_abi == ABI_EABI)\
-	builtin_define ("__mips_eabi");			\
-  else if (mips_abi == ABI_N32)			\
-	builtin_define ("__mips_n32");			\
-  else if (mips_abi == ABI_64)			\
-	builtin_define ("__mips_n64");			\
-  else if (mips_abi == ABI_O64)			\
-	builtin_define ("__mips_o64");			\
-}			\
-  while (0)
+#define TARGET_OS_CPP_BUILTINS()\
+  do\
+{\
+  NETBSD_OS_CPP_BUILTINS_ELF();\
+  builtin_define ("__NO_LEADING_UNDERSCORES__");		\
+  builtin_define ("__GP_SUPPORT__");			\
+  if (TARGET_LONG64)	\
+	builtin_define ("__LONG64");\
+\
+  if (TARGET_ABICALLS)	\
+	builtin_define ("__ABICALLS__");			\
+\
+/* The GNU C++ standard library requires this.  */		\
+if (c_dialect_cxx ())	\
+  builtin_define ("_GNU_SOURCE");\
+\
+if (mips_abi == ABI_N32)	\
+  {\
+	builtin_define ("__mips_n32");\
+builtin_define ("_ABIN32=2");\
+builtin_define ("_MIPS_SIM=_ABIN32");			\
+builtin_define ("_MIPS_SZLONG=32");			\
+builtin_define ("_MIPS_SZPTR=32");			\
+  }\
+else if (mips_abi == ABI_64)\
+  {\
+	builtin_define ("__mips_n64");\
+builtin_define ("_ABI64=3");\
+builtin_define ("_MIPS_SIM=_ABI64");			\
+builtin_define ("_MIPS_SZLONG=64");			\
+builtin_define ("_MIPS_SZPTR=64");			\
+  }\
+else if (mips_abi == ABI_O64)\
+  {\
+	builtin_define ("__mips_o64");\
+builtin_define ("_ABIO64=4");\
+builtin_define ("_MIPS_SIM=_ABIO64");			\
+builtin_define ("_MIPS_SZLONG=64");			\
+builtin_define ("_MIPS_SZPTR=64");			\
+  }\
+else if (mips_abi == ABI_EABI)\
+  {\
+	builtin_define ("__mips_eabi");\
+builtin_define ("_ABIEMB=5");\
+builtin_define ("_MIPS_SIM=_ABIEMB");			\
+	if (TARGET_LONG64)	\
+  builtin_define ("_MIPS_SZLONG=64");			\
+	else			\
+  builtin_define ("_MIPS_SZLONG=32");			\
+	if (TARGET_64BIT)	\
+  builtin_define ("_MIPS_SZPTR=64");			\
+	else			\
+  builtin_define ("_MIPS_SZPTR=32");			\
+  }\
+else			\
+  {\
+	builtin_define ("_ABIO32=1");\
+	builtin_define ("_MIPS_SIM=_ABIO32");			\
+builtin_define ("_MIPS_SZLONG=32");			\
+builtin_define ("_MIPS_SZPTR=32");			\
+  }\
+if (TARGET_FLOAT64)		\
+  builtin_define ("_MIPS_FPSET=32");			\
+else			\
+  builtin_define ("_MIPS_FPSET=16");			\
+\
+builtin_define ("_MIPS_SZINT=32");\
+  } while (0)
 
 /* The generic MIPS TARGET_CPU_CPP_BUILTINS are incorrect for NetBSD.
Specifically, they define too many namespace-invasive macros.  Override