]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: Add fdiv define_expand template.
authorLulu Cheng <chenglulu@loongson.cn>
Wed, 27 Apr 2022 07:07:05 +0000 (15:07 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Wed, 27 Apr 2022 11:55:17 +0000 (19:55 +0800)
gcc/ChangeLog:

* config/loongarch/loongarch.md: Add fdiv define_expand template,
then generate floating-point division and floating-point reciprocal
instructions.

gcc/config/loongarch/loongarch.md

index 5a7641703b54a60ee0690da171bfda981fad31d9..d3c809e25f34bd55591c3547ddfe870fbc7f4afb 100644 (file)
 ;;
 
 ;; Float division and modulus.
+(define_expand "div<mode>3"
+  [(set (match_operand:ANYF 0 "register_operand")
+       (div:ANYF (match_operand:ANYF 1 "reg_or_1_operand")
+                 (match_operand:ANYF 2 "register_operand")))]
+  "")
+
 (define_insn "*div<mode>3"
   [(set (match_operand:ANYF 0 "register_operand" "=f")
        (div:ANYF (match_operand:ANYF 1 "register_operand" "f")