[4/9] LoongArch: Fix movgr2frh.w operand order

Message ID 20230806125010.283900-4-c@jia.je
State Unresolved
Headers
Series [1/9] LoongArch: Introduce loongarch32 target |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jiajie Chen Aug. 6, 2023, 12:50 p.m. UTC
  The operand order of movgr2frh.w was wrong. The correct order should be
`movgr2frh.w fd, rj`.

gcc/ChangeLog:

	* config/loongarch/loongarch.md (movgr2frh<mode>): Correct
	  movgr2frh.w operand order.
---
 gcc/config/loongarch/loongarch.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
index 95c5b25d22a..93d8bf5bcca 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -2297,7 +2297,7 @@ 
 			(match_operand:SPLITF 2 "register_operand" "0")]
 			UNSPEC_MOVGR2FRH))]
   "TARGET_DOUBLE_FLOAT"
-  "movgr2frh.w\t%z1,%0"
+  "movgr2frh.w\t%0,%z1"
   [(set_attr "move_type" "mgtf")
    (set_attr "mode" "<HALFMODE>")])