> Minor nit.  Since this is used in an unspec_volatile, the name should be
> UNSPECV_ and defined in the unspecv enum.

Ouch.  It turns out that the ARM implementation has it too so I have installed 
the attached patchlet on top of the others after minimal retesting.


        PR middle-end/65958
        * config/arm/unspecs.md (unspec): Remove UNSPEC_PROBE_STACK_RANGE.
        (unspecv): Add VUNSPEC_PROBE_STACK_RANGE.
        * config/arm/arm.md (probe_stack_range): Adjust.
        * config/aarch64/aarch64.md (unspec): Remove UNSPEC_PROBE_STACK_RANGE.
        (unspecv): Add UNSPECV_PROBE_STACK_RANGE.
        (probe_stack_range_<PTR:mode>): Adjust.

-- 
Eric Botcazou
Index: config/arm/arm.md
===================================================================
--- config/arm/arm.md	(revision 231250)
+++ config/arm/arm.md	(working copy)
@@ -8183,7 +8183,7 @@ (define_insn "probe_stack_range"
   [(set (match_operand:SI 0 "register_operand" "=r")
 	(unspec_volatile:SI [(match_operand:SI 1 "register_operand" "0")
 			     (match_operand:SI 2 "register_operand" "r")]
-			     UNSPEC_PROBE_STACK_RANGE))]
+			     VUNSPEC_PROBE_STACK_RANGE))]
   "TARGET_32BIT"
 {
   return output_probe_stack_range (operands[0], operands[2]);
Index: config/arm/unspecs.md
===================================================================
--- config/arm/unspecs.md	(revision 231250)
+++ config/arm/unspecs.md	(working copy)
@@ -84,7 +84,6 @@ (define_c_enum "unspec" [
   UNSPEC_VRINTA         ; Represent a float to integral float rounding
                         ; towards nearest, ties away from zero.
   UNSPEC_PROBE_STACK    ; Probe stack memory reference
-  UNSPEC_PROBE_STACK_RANGE ; Probe stack range
 ])
 
 (define_c_enum "unspec" [
@@ -147,6 +146,7 @@ (define_c_enum "unspecv" [
   VUNSPEC_STL		; Represent a store-register-release.
   VUNSPEC_GET_FPSCR	; Represent fetch of FPSCR content.
   VUNSPEC_SET_FPSCR	; Represent assign of FPSCR content.
+  VUNSPEC_PROBE_STACK_RANGE ; Represent stack range probing.
 ])
 
 ;; Enumerators for NEON unspecs.
Index: config/aarch64/aarch64.md
===================================================================
--- config/aarch64/aarch64.md	(revision 231259)
+++ config/aarch64/aarch64.md	(working copy)
@@ -104,7 +104,6 @@ (define_c_enum "unspec" [
     UNSPEC_MB
     UNSPEC_NOP
     UNSPEC_PRLG_STK
-    UNSPEC_PROBE_STACK_RANGE
     UNSPEC_RBIT
     UNSPEC_SISD_NEG
     UNSPEC_SISD_SSHL
@@ -139,6 +138,7 @@ (define_c_enum "unspecv" [
     UNSPECV_GET_FPSR		; Represent fetch of FPSR content.
     UNSPECV_SET_FPSR		; Represent assign of FPSR content.
     UNSPECV_BLOCKAGE		; Represent a blockage
+    UNSPECV_PROBE_STACK_RANGE	; Represent stack range probing.
   ]
 )
 
@@ -4968,7 +4968,7 @@ (define_insn "probe_stack_range_<PTR:mod
   [(set (match_operand:PTR 0 "register_operand" "=r")
 	(unspec_volatile:PTR [(match_operand:PTR 1 "register_operand" "0")
 			      (match_operand:PTR 2 "register_operand" "r")]
-			       UNSPEC_PROBE_STACK_RANGE))]
+			       UNSPECV_PROBE_STACK_RANGE))]
   ""
 {
   return aarch64_output_probe_stack_range (operands[0], operands[2]);

Reply via email to