Patchwork [SPARC] Minor tweaks

login
register
mail settings
Submitter Eric Botcazou
Date March 23, 2013, 11:31 a.m.
Message ID <1438600.zm6KTiKpQZ@polaris>
Download mbox | patch
Permalink /patch/230327/
State New
Headers show

Comments

Eric Botcazou - March 23, 2013, 11:31 a.m.
The correct test for the pointer size in sparc_emit_probe_stack_range is 
TARGET_ARCH64 instead of TARGET_64BIT.  The patch also adds predicates to the 
3rd argument of ctrapsi4 and ctrapdi4.

Tested on SPARC/Solaris, applied on the mainline.


2013-03-23  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc.c (sparc_emit_probe_stack_range): Fix small
	inaccuracy in the probing code.

	* config/sparc/sparc.md (ctrapsi4): Add predicate for operand #3.
	(ctrapdi4): Likewise.

Patch

Index: config/sparc/sparc.md
===================================================================
--- config/sparc/sparc.md	(revision 196816)
+++ config/sparc/sparc.md	(working copy)
@@ -7217,7 +7217,7 @@  (define_expand "ctrapsi4"
   [(trap_if (match_operator 0 "noov_compare_operator"
 	     [(match_operand:SI 1 "compare_operand" "")
 	      (match_operand:SI 2 "arith_operand" "")])
-	   (match_operand 3 ""))]
+	   (match_operand 3 "arith_operand"))]
   ""
   "operands[1] = gen_compare_reg (operands[0]);
    if (GET_MODE (operands[1]) != CCmode && GET_MODE (operands[1]) != CCXmode)
@@ -7228,7 +7228,7 @@  (define_expand "ctrapdi4"
   [(trap_if (match_operator 0 "noov_compare_operator"
 	     [(match_operand:DI 1 "compare_operand" "")
 	      (match_operand:DI 2 "arith_operand" "")])
-	   (match_operand 3 ""))]
+	   (match_operand 3 "arith_operand"))]
   "TARGET_ARCH64"
   "operands[1] = gen_compare_reg (operands[0]);
    if (GET_MODE (operands[1]) != CCmode && GET_MODE (operands[1]) != CCXmode)
Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c	(revision 196816)
+++ config/sparc/sparc.c	(working copy)
@@ -4777,7 +4777,7 @@  sparc_emit_probe_stack_range (HOST_WIDE_
 	 probes at FIRST + N * PROBE_INTERVAL for values of N from 1
 	 until it is equal to ROUNDED_SIZE.  */
 
-      if (TARGET_64BIT)
+      if (TARGET_ARCH64)
 	emit_insn (gen_probe_stack_rangedi (g1, g1, g4));
       else
 	emit_insn (gen_probe_stack_rangesi (g1, g1, g4));