diff options
author | James Bowman <james.bowman@ftdichip.com> | 2016-03-29 00:37:26 +0000 |
---|---|---|
committer | James Bowman <jamesbowman@gcc.gnu.org> | 2016-03-29 00:37:26 +0000 |
commit | dc2e89953683df032f15d65845eb2d287f646423 (patch) | |
tree | 78033af93edbf5cad8e24458d1ab5cabd304f47b /gcc | |
parent | a06c2388e6c0215901673bd3f5328040bb70fc04 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/ft32/ft32.md | 8 | ||||
-rw-r--r-- | gcc/config/ft32/ft32.opt | 4 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 6 |
4 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fba5da7..93a2618 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-03-28 James Bowman <james.bowman@ftdichip.com> + + * config/ft32/ft32.opt (mnodiv): New. + * config/ft32/ft32.md (*divsi3, *modsi3): Qualify with + TARGET_NODIV. + * doc/invoke.texi (FT32 Options -mnodiv): New. + 2016-03-28 Kirill Yukhin <kirill.yukhin@intel.com> PR target/70406 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 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9e54bb7..ed1ad62 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -712,7 +712,7 @@ Objective-C and Objective-C++ Dialects}. @gccoptlist{-msmall-model -mno-lsim} @emph{FT32 Options} -@gccoptlist{-msim -mlra} +@gccoptlist{-msim -mlra -mnodiv} @emph{FRV Options} @gccoptlist{-mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64 @gol @@ -15827,6 +15827,10 @@ I/O functions are needed. Enable Local Register Allocation. This is still experimental for FT32, so by default the compiler uses standard reload. +@item -mnodiv +@opindex mnodiv +Do not use div and mod instructions. + @end table @node FRV Options |