i386.md (SWI48, SDWI, DWI): New mode iterators.

* config/i386/i386.md (SWI48, SDWI, DWI): New mode iterators.
	(DWIH, g, di, doubleint_general_operand): New mode attributes.
	(general_operand): Handle TI mode.
	(add<mode>3): Macroize expander from add{qi,hi,si,di,ti}3 patterns
	using SDWI mode iterator.
	(*add<mode>3_doubleword): New insn_and_split pattern.  Macroize
	pattern from *add{di,ti}3_1 patterns and corresponding splitters
	using SDWI mode iterator.
	(add<mode>3_carry): Macroize insn from add{qi,hi,si,di}3_carry
	patterns using SWI mode iterator.
	(*add<mode>3_cc): Macroize insn from add{si,di}3_cc patterns
	using SWI48 mode iterator.
	(*add<mode>_1): Ditto from add{si,di}_1 patterns.
	(*add<mode>_2): Ditto from add{si,di}_2 patterns.
	(*add<mode>_3): Ditto from add{si,di}_3 patterns.
	(*add<mode>_5): Ditto from add{si,di}_5 patterns.
	(sub<mode>3): Macroize expander from sub{qi,hi,si,di,ti}3 patterns
	using SDWI mode iterator.
	(*sub<mode>3_doubleword): New insn_and_split pattern.  Macroize
	pattern from *sub{di,ti}3_1 patterns and corresponding splitters
	using SDWI mode iterator.
	(sub<mode>3_carry): Macroize insn from sub{qi,hi,si,di}3_carry
	patterns using SWI mode iterator.
	(*sub<mode>_1): Ditto from from sub{qi,hi,si,di}_1 patterns.
	(*sub<mode>_2): Ditto from sub{qi,hi,si,di}_2 patterns.
	(*sub<mode>_3): Ditto from sub{qi,hi,si,di}_3 patterns.
	(<plusminus_insn>xf3): Macroize expander from addxf3 and subxf3
	patterns using plusminus code iterator.
	(<plusminus_insn><mode>3): Macroize expander from add<mode>3 and
	sub<mode>3 patterns using plusminus code iterator.
	* config/i386/i386.c (override_options): Update call to
	gen_subdi_carry_rex64 for renamed function.
	(ix86_expand_int_addcc): Update calls to gen_subdi3_carry_rex64
	and gen_adddi3_carry_rex64 for renamed functions.  Use indirect
	calls to instruction expanders.

From-SVN: r152495
This commit is contained in:
Uros Bizjak 2009-10-06 15:52:59 +02:00
parent 7b7c01e739
commit d2407a7aca
3 changed files with 1470 additions and 1917 deletions

View File

@ -1,3 +1,41 @@
2009-10-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (SWI48, SDWI, DWI): New mode iterators.
(DWIH, g, di, doubleint_general_operand): New mode attributes.
(general_operand): Handle TI mode.
(add<mode>3): Macroize expander from add{qi,hi,si,di,ti}3 patterns
using SDWI mode iterator.
(*add<mode>3_doubleword): New insn_and_split pattern. Macroize
pattern from *add{di,ti}3_1 patterns and corresponding splitters
using SDWI mode iterator.
(add<mode>3_carry): Macroize insn from add{qi,hi,si,di}3_carry
patterns using SWI mode iterator.
(*add<mode>3_cc): Macroize insn from add{si,di}3_cc patterns
using SWI48 mode iterator.
(*add<mode>_1): Ditto from add{si,di}_1 patterns.
(*add<mode>_2): Ditto from add{si,di}_2 patterns.
(*add<mode>_3): Ditto from add{si,di}_3 patterns.
(*add<mode>_5): Ditto from add{si,di}_5 patterns.
(sub<mode>3): Macroize expander from sub{qi,hi,si,di,ti}3 patterns
using SDWI mode iterator.
(*sub<mode>3_doubleword): New insn_and_split pattern. Macroize
pattern from *sub{di,ti}3_1 patterns and corresponding splitters
using SDWI mode iterator.
(sub<mode>3_carry): Macroize insn from sub{qi,hi,si,di}3_carry
patterns using SWI mode iterator.
(*sub<mode>_1): Ditto from from sub{qi,hi,si,di}_1 patterns.
(*sub<mode>_2): Ditto from sub{qi,hi,si,di}_2 patterns.
(*sub<mode>_3): Ditto from sub{qi,hi,si,di}_3 patterns.
(<plusminus_insn>xf3): Macroize expander from addxf3 and subxf3
patterns using plusminus code iterator.
(<plusminus_insn><mode>3): Macroize expander from add<mode>3 and
sub<mode>3 patterns using plusminus code iterator.
* config/i386/i386.c (override_options): Update call to
gen_subdi_carry_rex64 for renamed function.
(ix86_expand_int_addcc): Update calls to gen_subdi3_carry_rex64
and gen_adddi3_carry_rex64 for renamed functions. Use indirect
calls to instruction expanders.
2009-10-06 Martin Jambor <mjambor@suse.cz>
PR bootstrap/41395
@ -215,8 +253,8 @@
2009-10-05 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/arm/arm.c (arm_override_options): Really initialize
flag_dwarf2_cfi_asm to 0.
* config/arm/arm.c (arm_override_options): Really initialize
flag_dwarf2_cfi_asm to 0.
2009-10-05 Doug Kwan <dougkwan@google.com>

View File

@ -3394,7 +3394,7 @@ override_options (bool main_args_p)
ix86_gen_pop1 = gen_popdi1;
ix86_gen_add3 = gen_adddi3;
ix86_gen_sub3 = gen_subdi3;
ix86_gen_sub3_carry = gen_subdi3_carry_rex64;
ix86_gen_sub3_carry = gen_subdi3_carry;
ix86_gen_one_cmpl2 = gen_one_cmpldi2;
ix86_gen_monitor = gen_sse3_monitor64;
ix86_gen_andsp = gen_anddi3;
@ -16171,6 +16171,7 @@ int
ix86_expand_int_addcc (rtx operands[])
{
enum rtx_code code = GET_CODE (operands[1]);
rtx (*insn)(rtx, rtx, rtx, rtx);
rtx compare_op;
rtx val = const0_rtx;
bool fpcmp = false;
@ -16211,16 +16212,16 @@ ix86_expand_int_addcc (rtx operands[])
switch (GET_MODE (operands[0]))
{
case QImode:
emit_insn (gen_subqi3_carry (operands[0], operands[2], val, compare_op));
insn = gen_subqi3_carry;
break;
case HImode:
emit_insn (gen_subhi3_carry (operands[0], operands[2], val, compare_op));
insn = gen_subhi3_carry;
break;
case SImode:
emit_insn (gen_subsi3_carry (operands[0], operands[2], val, compare_op));
insn = gen_subsi3_carry;
break;
case DImode:
emit_insn (gen_subdi3_carry_rex64 (operands[0], operands[2], val, compare_op));
insn = gen_subdi3_carry;
break;
default:
gcc_unreachable ();
@ -16231,21 +16232,23 @@ ix86_expand_int_addcc (rtx operands[])
switch (GET_MODE (operands[0]))
{
case QImode:
emit_insn (gen_addqi3_carry (operands[0], operands[2], val, compare_op));
insn = gen_addqi3_carry;
break;
case HImode:
emit_insn (gen_addhi3_carry (operands[0], operands[2], val, compare_op));
insn = gen_addhi3_carry;
break;
case SImode:
emit_insn (gen_addsi3_carry (operands[0], operands[2], val, compare_op));
insn = gen_addsi3_carry;
break;
case DImode:
emit_insn (gen_adddi3_carry_rex64 (operands[0], operands[2], val, compare_op));
insn = gen_adddi3_carry;
break;
default:
gcc_unreachable ();
}
}
emit_insn (insn (operands[0], operands[2], val, compare_op));
return 1; /* DONE */
}

File diff suppressed because it is too large Load Diff