[PATCH, i386]: Correction for Core2 fused-ops instructions

Uros Bizjak ubizjak@gmail.com
Fri Jun 20 13:51:00 GMT 2008


Hello!

According to updated Intel Optimization Manual [1], 65um Core2 can
fuse "test" insn with all conditional jump instructions. It is "cmp"
instruction that fuses with unsigned conditional jumps only. Also,
"test" and "cmp" insns with 8, 16 and 32 bit operands can be fused.
Attached patch updates gcc to match the optimization manual.

2008-06-20  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*jcc_fused_1): Handle all valid compare
	operators for "test" insn.  Macroize insn using SWI mode macro.
	(*jcc_fused_2): Ditto.
	(*jcc_fused_3): Macroize insn using SWI mode macro.
	(*jcc_fused_4): Ditto.

Patch was bootstrapped and regression tested on i686-pc-linux-gnu with
-mtune=core2. Patch is committed to mainline.

[1] http://developer.intel.com/design/processor/manuals/248966.pdf

Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080620/02246f3d/attachment.txt>


More information about the Gcc-patches mailing list