Commit 719c8642 by Andre Simoes Dias Vieira Committed by Andre Vieira

gcc, Arm: Revert changes to {get,set}_fpscr

MVE made changes to {get,set}_fpscr to enable the compiler to optimize
unneccesary gets and sets when using these for intrinsics that use and/or write
the carry bit.  However, these actually get and set the full FPSCR register and
are used by fp env intrinsics to modify the fp context.  So MVE should not be
using these.

gcc/ChangeLog:
2020-03-20  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/arm/unspecs.md (UNSPEC_GET_FPSCR): Rename this to ...
	(VUNSPEC_GET_FPSCR): ... this, and move it to vunspec.
	* config/arm/vfp.md: (get_fpscr, set_fpscr): Revert to old patterns.
parent 005f6fc5
2020-03-20 Andre Vieira <andre.simoesdiasvieira@arm.com> 2020-03-20 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/unspecs.md (UNSPEC_GET_FPSCR): Rename this to ...
(VUNSPEC_GET_FPSCR): ... this, and move it to vunspec.
* config/arm/vfp.md: (get_fpscr, set_fpscr): Revert to old patterns.
2020-03-20 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/mve.md (mve_mov<mode>): Fix R->R case. * config/arm/mve.md (mve_mov<mode>): Fix R->R case.
2020-03-20 Jakub Jelinek <jakub@redhat.com> 2020-03-20 Jakub Jelinek <jakub@redhat.com>
......
...@@ -170,7 +170,6 @@ ...@@ -170,7 +170,6 @@
UNSPEC_TORC ; Used by the intrinsic form of the iWMMXt TORC instruction. UNSPEC_TORC ; Used by the intrinsic form of the iWMMXt TORC instruction.
UNSPEC_TORVSC ; Used by the intrinsic form of the iWMMXt TORVSC instruction. UNSPEC_TORVSC ; Used by the intrinsic form of the iWMMXt TORVSC instruction.
UNSPEC_TEXTRC ; Used by the intrinsic form of the iWMMXt TEXTRC instruction. UNSPEC_TEXTRC ; Used by the intrinsic form of the iWMMXt TEXTRC instruction.
UNSPEC_GET_FPSCR ; Represent fetch of FPSCR content.
]) ])
...@@ -217,6 +216,7 @@ ...@@ -217,6 +216,7 @@
VUNSPEC_SLX ; Represent a store-register-release-exclusive. VUNSPEC_SLX ; Represent a store-register-release-exclusive.
VUNSPEC_LDA ; Represent a store-register-acquire. VUNSPEC_LDA ; Represent a store-register-acquire.
VUNSPEC_STL ; Represent a store-register-release. VUNSPEC_STL ; Represent a store-register-release.
VUNSPEC_GET_FPSCR ; Represent fetch of FPSCR content.
VUNSPEC_SET_FPSCR ; Represent assign of FPSCR content. VUNSPEC_SET_FPSCR ; Represent assign of FPSCR content.
VUNSPEC_PROBE_STACK_RANGE ; Represent stack range probing. VUNSPEC_PROBE_STACK_RANGE ; Represent stack range probing.
VUNSPEC_CDP ; Represent the coprocessor cdp instruction. VUNSPEC_CDP ; Represent the coprocessor cdp instruction.
......
...@@ -2096,9 +2096,8 @@ ...@@ -2096,9 +2096,8 @@
;; Write Floating-point Status and Control Register. ;; Write Floating-point Status and Control Register.
(define_insn "set_fpscr" (define_insn "set_fpscr"
[(set (reg:SI VFPCC_REGNUM) [(unspec_volatile [(match_operand:SI 0 "register_operand" "r")]
(unspec_volatile:SI VUNSPEC_SET_FPSCR)]
[(match_operand:SI 0 "register_operand" "r")] VUNSPEC_SET_FPSCR))]
"TARGET_VFP_BASE" "TARGET_VFP_BASE"
"mcr\\tp10, 7, %0, cr1, cr0, 0\\t @SET_FPSCR" "mcr\\tp10, 7, %0, cr1, cr0, 0\\t @SET_FPSCR"
[(set_attr "type" "mrs")]) [(set_attr "type" "mrs")])
...@@ -2106,7 +2105,7 @@ ...@@ -2106,7 +2105,7 @@
;; Read Floating-point Status and Control Register. ;; Read Floating-point Status and Control Register.
(define_insn "get_fpscr" (define_insn "get_fpscr"
[(set (match_operand:SI 0 "register_operand" "=r") [(set (match_operand:SI 0 "register_operand" "=r")
(unspec:SI [(reg:SI VFPCC_REGNUM)] UNSPEC_GET_FPSCR))] (unspec_volatile:SI [(const_int 0)] VUNSPEC_GET_FPSCR))]
"TARGET_VFP_BASE" "TARGET_VFP_BASE"
"mrc\\tp10, 7, %0, cr1, cr0, 0\\t @GET_FPSCR" "mrc\\tp10, 7, %0, cr1, cr0, 0\\t @GET_FPSCR"
[(set_attr "type" "mrs")]) [(set_attr "type" "mrs")])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment