summaryrefslogtreecommitdiff
path: root/gcc/config/ft32
diff options
context:
space:
mode:
authorjamesbowman <jamesbowman@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-29 00:37:26 +0000
committerjamesbowman <jamesbowman@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-29 00:37:26 +0000
commit28a5f3349421493f193cb2c2c29f1bd690ca240e (patch)
tree78033af93edbf5cad8e24458d1ab5cabd304f47b /gcc/config/ft32
parenta3d8eb507c47ddbfc90c34a05607ac6c032e2d12 (diff)
downloadgcc-28a5f3349421493f193cb2c2c29f1bd690ca240e.tar.gz
* config/ft32/ft32.opt (mnodiv): New.
* config/ft32/ft32.md (*divsi3, *modsi3): Qualify with TARGET_NODIV. * doc/invoke.texi (FT32 Options -mnodiv): New. * libgcc/config/ft32/lib1funcs.S (*divsi3, *modsi3): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ft32')
-rw-r--r--gcc/config/ft32/ft32.md8
-rw-r--r--gcc/config/ft32/ft32.opt4
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/config/ft32/ft32.md b/gcc/config/ft32/ft32.md
index e8029af76ea..35b38a8896f 100644
--- a/gcc/config/ft32/ft32.md
+++ b/gcc/config/ft32/ft32.md
@@ -101,7 +101,7 @@
(div:SI
(match_operand:SI 1 "register_operand" "r,r")
(match_operand:SI 2 "ft32_rimm_operand" "r,KA")))]
- ""
+ "!TARGET_NODIV"
"div.l %0,%1,%2")
(define_insn "modsi3"
@@ -109,7 +109,7 @@
(mod:SI
(match_operand:SI 1 "register_operand" "r,r")
(match_operand:SI 2 "ft32_rimm_operand" "r,KA")))]
- ""
+ "!TARGET_NODIV"
"mod.l %0,%1,%2")
(define_insn "udivsi3"
@@ -117,7 +117,7 @@
(udiv:SI
(match_operand:SI 1 "register_operand" "r,r")
(match_operand:SI 2 "ft32_rimm_operand" "r,KA")))]
- ""
+ "!TARGET_NODIV"
"udiv.l %0,%1,%2")
(define_insn "umodsi3"
@@ -125,7 +125,7 @@
(umod:SI
(match_operand:SI 1 "register_operand" "r,r")
(match_operand:SI 2 "register_operand" "r,KA")))]
- ""
+ "!TARGET_NODIV"
"umod.l %0,%1,%2")
(define_insn "extvsi"
diff --git a/gcc/config/ft32/ft32.opt b/gcc/config/ft32/ft32.opt
index e48c72b172e..20054a20b3c 100644
--- a/gcc/config/ft32/ft32.opt
+++ b/gcc/config/ft32/ft32.opt
@@ -25,3 +25,7 @@ target the software simulator.
mlra
Target Report Var(ft32_lra_flag) Init(0) Save
Use LRA instead of reload.
+
+mnodiv
+Target Report Mask(NODIV)
+Avoid use of the DIV and MOD instructions