Commit c3c3ddbb by Jeff Law Committed by Jeff Law

h8300.c (h8300_insn_length_from_table): Consolidate ADDB...

	* config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
	ADDB, ADDW and ADDL into a single ADD attribute which selects the
	right table based on the size of the operand.
	* config/h8300/h8300.md (length_table): Corresponding changes. All
	references to "addb", "addw" and "addl" changed to "add".
	(btst patterns): Merge two variants into a single pattern.
	(tstqi, tsthi): Likewise.
	(addhi3_incdec, addsi3_incdec): Likewise.
	(subhi3_h8300hs, subsi3_h8300hs): Likewise.
	(mulhi3, mulsi3): Likewise.
	(udivhi3, udivsi3): Likewise.
	(divhi3, divsi3): Likewise.
	(andorqi3, andorhi3, andorsi3): Likewise.

From-SVN: r262357
parent 15333be7
2018-07-03 Jeff Law <law@redhat.com>
* config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
ADDB, ADDW and ADDL into a single ADD attribute which selects the
right table based on the size of the operand.
* config/h8300/h8300.md (length_table): Corresponding changes. All
references to "addb", "addw" and "addl" changed to "add".
(btst patterns): Merge two variants into a single pattern.
(tstqi, tsthi): Likewise.
(addhi3_incdec, addsi3_incdec): Likewise.
(subhi3_h8300hs, subsi3_h8300hs): Likewise.
(mulhi3, mulsi3): Likewise.
(udivhi3, udivsi3): Likewise.
(divhi3, divsi3): Likewise.
(andorqi3, andorhi3, andorsi3): Likewise.
2018-07-03 Uros Bizjak <ubizjak@gmail.com> 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
PR target/85694 PR target/85694
......
...@@ -2551,14 +2551,14 @@ h8300_insn_length_from_table (rtx_insn *insn, rtx * operands) ...@@ -2551,14 +2551,14 @@ h8300_insn_length_from_table (rtx_insn *insn, rtx * operands)
case LENGTH_TABLE_NONE: case LENGTH_TABLE_NONE:
gcc_unreachable (); gcc_unreachable ();
case LENGTH_TABLE_ADDB: case LENGTH_TABLE_ADD:
return h8300_binary_length (insn, &addb_length_table); if (GET_MODE (operands[0]) == QImode)
return h8300_binary_length (insn, &addb_length_table);
case LENGTH_TABLE_ADDW: else if (GET_MODE (operands[0]) == HImode)
return h8300_binary_length (insn, &addw_length_table); return h8300_binary_length (insn, &addw_length_table);
else if (GET_MODE (operands[0]) == SImode)
case LENGTH_TABLE_ADDL: return h8300_binary_length (insn, &addl_length_table);
return h8300_binary_length (insn, &addl_length_table); gcc_unreachable ();
case LENGTH_TABLE_LOGICB: case LENGTH_TABLE_LOGICB:
return h8300_binary_length (insn, &logicb_length_table); return h8300_binary_length (insn, &logicb_length_table);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment