Commit 5c5e8419 by Joern Rennecke Committed by Joern Rennecke

re PR target/44758 (frv.md: incompatible enum comparisons / return)

2010-11-08  Joern Rennecke  <amylaar@spamcop.net>
	    Richard Henderson <rth@redhat.com>

	PR target/44758
	* config/frv/frv.md (attribute cpu): Cast value to enum attr_cpu.
	(attribute acc_group): Cast value to enum attr_acc_group.
	(*movdi_nodouble+6): Use gen_int_mode.
	* config/frv/frv-protos.h (frv_trampoline_size): Declare no matter
	if RTX_CODE is defined or not.
	* config/frv/frv.c (enum frv_io_type): New enum, broken out of
	struct frv_io.
	(frv_handle_option): Mark parameter value with ATTRIBUTE_UNUSED.
	(frv_frame_access, frv_expand_prologue): Remove unused variables.
	(frv_expand_block_clear): Likewise.
	(frv_trampoline_init): Use LCT_NORMAL.
	(struct frv_packet_group): New struct, broken out of type of
	frv_packet.
	(frv_start_packet, frv_reorder_packet): Initialize group to GROUP_I,
	use cast in loop counter increment.
	(frv_extract_membar): Cast HOST_WIDE_INT to enum frv_io_type before
	assigning to io->type.
	(bdesc_set): Use rtx_code UNKNOWN in initializer.
	(bdesc_1arg, bdesc_2arg, bdesc_int_void2arg): Likewise.
	(bdesc_prefetches, bdesc_cut, bdesc_2argimm, bdesc_void2arg): Likewise.
	(bdesc_void3arg, bdesc_voidacc, bdesc_loads, bdesc_stores): Likewise.
	(frv_read_argument): Use expand_normal.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r166447
parent d079459e
2010-11-08 Joern Rennecke <amylaar@spamcop.net>
Richard Henderson <rth@redhat.com>
PR target/44758
* config/frv/frv.md (attribute cpu): Cast value to enum attr_cpu.
(attribute acc_group): Cast value to enum attr_acc_group.
(*movdi_nodouble+6): Use gen_int_mode.
* config/frv/frv-protos.h (frv_trampoline_size): Declare no matter
if RTX_CODE is defined or not.
* config/frv/frv.c (enum frv_io_type): New enum, broken out of
struct frv_io.
(frv_handle_option): Mark parameter value with ATTRIBUTE_UNUSED.
(frv_frame_access, frv_expand_prologue): Remove unused variables.
(frv_expand_block_clear): Likewise.
(frv_trampoline_init): Use LCT_NORMAL.
(struct frv_packet_group): New struct, broken out of type of
frv_packet.
(frv_start_packet, frv_reorder_packet): Initialize group to GROUP_I,
use cast in loop counter increment.
(frv_extract_membar): Cast HOST_WIDE_INT to enum frv_io_type before
assigning to io->type.
(bdesc_set): Use rtx_code UNKNOWN in initializer.
(bdesc_1arg, bdesc_2arg, bdesc_int_void2arg): Likewise.
(bdesc_prefetches, bdesc_cut, bdesc_2argimm, bdesc_void2arg): Likewise.
(bdesc_void3arg, bdesc_voidacc, bdesc_loads, bdesc_stores): Likewise.
(frv_read_argument): Use expand_normal.
2010-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2010-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/i386/i386.c (ix86_function_arg_boundary): Fix warning * config/i386/i386.c (ix86_function_arg_boundary): Fix warning
...@@ -89,7 +89,6 @@ extern rtx frv_ifcvt_modify_insn (ce_if_block_t *, rtx, rtx); ...@@ -89,7 +89,6 @@ extern rtx frv_ifcvt_modify_insn (ce_if_block_t *, rtx, rtx);
extern void frv_ifcvt_modify_final (ce_if_block_t *); extern void frv_ifcvt_modify_final (ce_if_block_t *);
extern void frv_ifcvt_modify_cancel (ce_if_block_t *); extern void frv_ifcvt_modify_cancel (ce_if_block_t *);
#endif #endif
extern int frv_trampoline_size (void);
extern enum reg_class frv_secondary_reload_class extern enum reg_class frv_secondary_reload_class
(enum reg_class, (enum reg_class,
enum machine_mode, rtx); enum machine_mode, rtx);
...@@ -101,6 +100,7 @@ extern int frv_legitimate_constant_p (rtx); ...@@ -101,6 +100,7 @@ extern int frv_legitimate_constant_p (rtx);
extern enum machine_mode frv_select_cc_mode (enum rtx_code, rtx, rtx); extern enum machine_mode frv_select_cc_mode (enum rtx_code, rtx, rtx);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
extern int frv_trampoline_size (void);
extern int direct_return_p (void); extern int direct_return_p (void);
extern int frv_issue_rate (void); extern int frv_issue_rate (void);
extern int frv_acc_group (rtx); extern int frv_acc_group (rtx);
......
...@@ -345,7 +345,7 @@ ...@@ -345,7 +345,7 @@
;; enumeration in frv-protos.h. ;; enumeration in frv-protos.h.
(define_attr "cpu" "generic,fr550,fr500,fr450,fr405,fr400,fr300,simple,tomcat" (define_attr "cpu" "generic,fr550,fr500,fr450,fr405,fr400,fr300,simple,tomcat"
(const (symbol_ref "frv_cpu_type"))) (const (symbol_ref "(enum attr_cpu) frv_cpu_type")))
;; Attribute is "yes" for branches and jumps that span too great a distance ;; Attribute is "yes" for branches and jumps that span too great a distance
;; to be implemented in the most natural way. Such instructions will use ;; to be implemented in the most natural way. Such instructions will use
...@@ -360,7 +360,7 @@ ...@@ -360,7 +360,7 @@
(const_string "unknown")) (const_string "unknown"))
(define_attr "acc_group" "none,even,odd" (define_attr "acc_group" "none,even,odd"
(symbol_ref "frv_acc_group (insn)")) (symbol_ref "(enum attr_acc_group) frv_acc_group (insn)"))
;; Scheduling and Packing Overview ;; Scheduling and Packing Overview
;; ------------------------------- ;; -------------------------------
...@@ -1895,10 +1895,8 @@ ...@@ -1895,10 +1895,8 @@
} }
else else
{ {
operands[4] = GEN_INT ((((unsigned HOST_WIDE_INT)INTVAL (op1) >> 16) operands[4] = gen_int_mode ((INTVAL (op1) >> 16) >> 16, SImode);
>> 16) ^ ((unsigned HOST_WIDE_INT)1 << 31) operands[5] = gen_int_mode (INTVAL (op1), SImode);
- ((unsigned HOST_WIDE_INT)1 << 31));
operands[5] = GEN_INT (trunc_int_for_mode (INTVAL (op1), SImode));
} }
}") }")
......
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