aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/ft32
diff options
context:
space:
mode:
authorJames Bowman <james.bowman@ftdichip.com>2016-03-29 00:37:26 +0000
committerJames Bowman <jamesbowman@gcc.gnu.org>2016-03-29 00:37:26 +0000
commitdc2e89953683df032f15d65845eb2d287f646423 (patch)
tree78033af93edbf5cad8e24458d1ab5cabd304f47b /gcc/config/ft32
parenta06c2388e6c0215901673bd3f5328040bb70fc04 (diff)
downloadgcc-dc2e89953683df032f15d65845eb2d287f646423.zip
gcc-dc2e89953683df032f15d65845eb2d287f646423.tar.gz
gcc-dc2e89953683df032f15d65845eb2d287f646423.tar.bz2
ft32.opt (mnodiv): New.
* 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. From-SVN: r234516
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 e8029af..35b38a8 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 e48c72b..20054a2 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