diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-09-16 18:05:37 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2010-09-16 11:05:37 -0700 |
commit | 26ec93086a8792dc68ffe89f4f464af72757ef90 (patch) | |
tree | 797fdd065c3e3f1f6265ea61cbd86e2a5fb0ec03 /gcc/doc | |
parent | 782d5172bbffd2eda9c6a167ab161078b2c2e1da (diff) | |
download | gcc-26ec93086a8792dc68ffe89f4f464af72757ef90.zip gcc-26ec93086a8792dc68ffe89f4f464af72757ef90.tar.gz gcc-26ec93086a8792dc68ffe89f4f464af72757ef90.tar.bz2 |
Add -m8bit-idiv for x86.
gcc/
2010-09-16 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386-protos.h (ix86_split_idivmod): New prototype.
* config/i386/i386.c (predict_jump): Add prototype.
(flag_opts): Add -m8bit-idiv.
(ix86_split_idivmod): New.
* config/i386/i386.md (UNSPEC_DIV_ALREADY_SPLIT): New.
Add 2 splitters for SI/DI mode divide.
(divmod<mode>4_1): New pattern.
(udivmod<mode>4_1): Likewise.
(testdi_ccno_1): Likewise.
* config/i386/i386.opt (m8bit-idiv): New.
* doc/invoke.texi: Document -m8bit-idiv.
gcc/testsuite/
2010-09-16 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/divmod-1.c: New.
* gcc.target/i386/divmod-2.c: Likewise.
* gcc.target/i386/divmod-3.c: Likewise.
* gcc.target/i386/divmod-4.c: Likewise.
* gcc.target/i386/divmod-4a.c: Likewise.
* gcc.target/i386/divmod-5.c: Likewise.
* gcc.target/i386/divmod-6.c: Likewise.
* gcc.target/i386/divmod-7.c: Likewise.
* gcc.target/i386/divmod-8.c: Likewise.
* gcc.target/i386/udivmod-1.c: Likewise.
* gcc.target/i386/udivmod-2.c: Likewise.
* gcc.target/i386/udivmod-3.c: Likewise.
* gcc.target/i386/udivmod-4.c: Likewise.
* gcc.target/i386/udivmod-4a.c: Likewise.
* gcc.target/i386/udivmod-5.c: Likewise.
* gcc.target/i386/udivmod-6.c: Likewise.
* gcc.target/i386/udivmod-7.c: Likewise.
* gcc.target/i386/udivmod-8.c: Likewise.
From-SVN: r164346
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b354382..08d929a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -602,7 +602,7 @@ Objective-C and Objective-C++ Dialects}. -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol -mcmodel=@var{code-model} -mabi=@var{name} @gol -m32 -m64 -mlarge-data-threshold=@var{num} @gol --msse2avx -mfentry} +-msse2avx -mfentry -m8bit-idiv} @emph{IA-64 Options} @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol @@ -12647,6 +12647,16 @@ If profiling is active @option{-pg} put the profiling counter call before prologue. Note: On x86 architectures the attribute @code{ms_hook_prologue} isn't possible at the moment for @option{-mfentry} and @option{-pg}. + +@item -m8bit-idiv +@itemx -mno-8bit-idiv +@opindex 8bit-idiv +On some processors, like Intel Atom, 8bit unsigned integer divide is +much faster than 32bit/64bit integer divide. This option will generate a +runt-time check. If both dividend and divisor are within range of 0 +to 255, 8bit unsigned integer divide will be used instead of +32bit/64bit integer divide. + @end table These @samp{-m} switches are supported in addition to the above |