re PR rtl-optimization/9812 ([m68k] ICE in extract_insn, at recog.c:2148)
PR optimization/9812 * rtl.h (mem_for_const_double): Delete prototype. * varasm.c (mem_for_const_double): Delete function. * config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m68k/netbsd-elf.h (LEGITIMATE_PIC_OPERAND_P): Delete duplicate definitions. * config/m68k/m68k.h (LEGITIMATE_CONSTANT_P): Disallow XFmode. (LEGITIMATE_PIC_OPERAND_P): Delete CONST_DOUBLE tests. * config/m68k/m68k.md (movxf): Add reload_in_progress guard. Add comment about confused support for XFmode constants. From-SVN: r69027
This commit is contained in:
parent
9ca9944176
commit
8338d44d83
@ -1,3 +1,16 @@
|
||||
2003-07-06 James E Wilson <wilson@tuliptree.org>
|
||||
|
||||
PR optimization/9812
|
||||
* rtl.h (mem_for_const_double): Delete prototype.
|
||||
* varasm.c (mem_for_const_double): Delete function.
|
||||
* config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68kelf.h,
|
||||
config/m68k/m68kv4.h, config/m68k/netbsd-elf.h
|
||||
(LEGITIMATE_PIC_OPERAND_P): Delete duplicate definitions.
|
||||
* config/m68k/m68k.h (LEGITIMATE_CONSTANT_P): Disallow XFmode.
|
||||
(LEGITIMATE_PIC_OPERAND_P): Delete CONST_DOUBLE tests.
|
||||
* config/m68k/m68k.md (movxf): Add reload_in_progress guard. Add
|
||||
comment about confused support for XFmode constants.
|
||||
|
||||
Mon Jul 7 02:03:56 CEST 2003 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* cfglayout.c (fixup_reorder_chain): Call delete_dead_jumptables.
|
||||
|
@ -555,18 +555,6 @@ do { size_t i, limit = (SIZE); \
|
||||
|
||||
#endif /* not HPUX_ASM */
|
||||
|
||||
/* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an
|
||||
operand of a function call. */
|
||||
#undef LEGITIMATE_PIC_OPERAND_P
|
||||
#define LEGITIMATE_PIC_OPERAND_P(X) \
|
||||
((! symbolic_operand (X, VOIDmode) \
|
||||
&& ! (GET_CODE (X) == CONST_DOUBLE && mem_for_const_double (X) != 0 \
|
||||
&& GET_CODE (mem_for_const_double (X)) == MEM \
|
||||
&& symbolic_operand (XEXP (mem_for_const_double (X), 0), \
|
||||
VOIDmode))) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
|| PCREL_GENERAL_OPERAND_OK)
|
||||
|
||||
/* hpux8 and later have C++ compatible include files, so do not
|
||||
pretend they are `extern "C"'. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
@ -283,18 +283,6 @@ do { \
|
||||
? gen_rtx_REG ((MODE), 16) \
|
||||
: gen_rtx_REG ((MODE), 0))
|
||||
|
||||
/* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is
|
||||
an operand of a function call. */
|
||||
#undef LEGITIMATE_PIC_OPERAND_P
|
||||
#define LEGITIMATE_PIC_OPERAND_P(X) \
|
||||
((! symbolic_operand (X, VOIDmode) \
|
||||
&& ! (GET_CODE (X) == CONST_DOUBLE && mem_for_const_double (X) != 0 \
|
||||
&& GET_CODE (mem_for_const_double (X)) == MEM \
|
||||
&& symbolic_operand (XEXP (mem_for_const_double (X), 0), \
|
||||
VOIDmode))) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
|| PCREL_GENERAL_OPERAND_OK)
|
||||
|
||||
/* For m68k SVR4, structures are returned using the reentrant
|
||||
technique. */
|
||||
#undef PCC_STATIC_STRUCT_RETURN
|
||||
|
@ -998,7 +998,7 @@ __transfer_from_trampoline () \
|
||||
/* Nonzero if the constant value X is a legitimate general operand.
|
||||
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
|
||||
|
||||
#define LEGITIMATE_CONSTANT_P(X) 1
|
||||
#define LEGITIMATE_CONSTANT_P(X) (GET_MODE (X) != XFmode)
|
||||
|
||||
/* Nonzero if the constant value X is a legitimate general operand
|
||||
when generating PIC code. It is given that flag_pic is on and
|
||||
@ -1015,12 +1015,8 @@ __transfer_from_trampoline () \
|
||||
#endif
|
||||
|
||||
#define LEGITIMATE_PIC_OPERAND_P(X) \
|
||||
((! symbolic_operand (X, VOIDmode) \
|
||||
&& ! (GET_CODE (X) == CONST_DOUBLE && mem_for_const_double (X) != 0 \
|
||||
&& GET_CODE (mem_for_const_double (X)) == MEM \
|
||||
&& symbolic_operand (XEXP (mem_for_const_double (X), 0), \
|
||||
VOIDmode))) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
(! symbolic_operand (X, VOIDmode) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
|| PCREL_GENERAL_OPERAND_OK)
|
||||
|
||||
/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
|
||||
|
@ -999,27 +999,35 @@
|
||||
"TARGET_5200"
|
||||
"* return output_move_double (operands);")
|
||||
|
||||
;; ??? The XFmode patterns are schizophrenic about whether constants are
|
||||
;; allowed. Most but not all have predicates and constraint that disallow
|
||||
;; constants. Most but not all have output templates that handle constants.
|
||||
;; See also LEGITIMATE_CONSTANT_P.
|
||||
|
||||
(define_expand "movxf"
|
||||
[(set (match_operand:XF 0 "nonimmediate_operand" "")
|
||||
(match_operand:XF 1 "general_operand" ""))]
|
||||
""
|
||||
"
|
||||
{
|
||||
if (CONSTANT_P (operands[1]))
|
||||
/* We can't rewrite operands during reload. */
|
||||
if (! reload_in_progress)
|
||||
{
|
||||
operands[1] = force_const_mem (XFmode, operands[1]);
|
||||
if (! memory_address_p (XFmode, XEXP (operands[1], 0))
|
||||
&& ! reload_in_progress)
|
||||
operands[1] = adjust_address (operands[1], XFmode, 0);
|
||||
}
|
||||
if (flag_pic && TARGET_PCREL && ! reload_in_progress)
|
||||
{
|
||||
/* Don't allow writes to memory except via a register;
|
||||
the m68k doesn't consider PC-relative addresses to be writable. */
|
||||
if (GET_CODE (operands[0]) == MEM
|
||||
&& symbolic_operand (XEXP (operands[0], 0), SImode))
|
||||
operands[0] = gen_rtx (MEM, XFmode,
|
||||
force_reg (SImode, XEXP (operands[0], 0)));
|
||||
if (CONSTANT_P (operands[1]))
|
||||
{
|
||||
operands[1] = force_const_mem (XFmode, operands[1]);
|
||||
if (! memory_address_p (XFmode, XEXP (operands[1], 0)))
|
||||
operands[1] = adjust_address (operands[1], XFmode, 0);
|
||||
}
|
||||
if (flag_pic && TARGET_PCREL)
|
||||
{
|
||||
/* Don't allow writes to memory except via a register; the
|
||||
m68k doesn't consider PC-relative addresses to be writable. */
|
||||
if (GET_CODE (operands[0]) == MEM
|
||||
&& symbolic_operand (XEXP (operands[0], 0), SImode))
|
||||
operands[0] = gen_rtx (MEM, XFmode,
|
||||
force_reg (SImode, XEXP (operands[0], 0)));
|
||||
}
|
||||
}
|
||||
}")
|
||||
|
||||
|
@ -246,16 +246,6 @@ extern int switch_table_difference_label_flag;
|
||||
#undef ASM_OUTPUT_BEFORE_CASE_LABEL
|
||||
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
|
||||
fprintf ((FILE), "%s&%d\n", SWBEG_ASM_OP, XVECLEN (PATTERN (TABLE), 1));
|
||||
|
||||
/* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an
|
||||
operand of a function call. */
|
||||
#undef LEGITIMATE_PIC_OPERAND_P
|
||||
|
||||
#define LEGITIMATE_PIC_OPERAND_P(X) \
|
||||
(! symbolic_operand (X, VOIDmode) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
|| PCREL_GENERAL_OPERAND_OK)
|
||||
|
||||
/* end of stuff from m68kv4.h */
|
||||
|
||||
#undef SGS_CMP_ORDER
|
||||
|
@ -277,18 +277,6 @@ int switch_table_difference_label_flag;
|
||||
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
|
||||
fprintf ((FILE), "%s&%d\n", SWBEG_ASM_OP, XVECLEN (PATTERN (TABLE), 1));
|
||||
|
||||
/* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an
|
||||
operand of a function call. */
|
||||
#undef LEGITIMATE_PIC_OPERAND_P
|
||||
#define LEGITIMATE_PIC_OPERAND_P(X) \
|
||||
((! symbolic_operand (X, VOIDmode) \
|
||||
&& ! (GET_CODE (X) == CONST_DOUBLE && mem_for_const_double (X) != 0 \
|
||||
&& GET_CODE (mem_for_const_double (X)) == MEM \
|
||||
&& symbolic_operand (XEXP (mem_for_const_double (X), 0), \
|
||||
VOIDmode))) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
|| PCREL_GENERAL_OPERAND_OK)
|
||||
|
||||
/* Output assembler code for a block containing the constant parts
|
||||
of a trampoline, leaving space for the variable parts. */
|
||||
|
||||
|
@ -385,20 +385,6 @@ while (0)
|
||||
#define BIGGEST_ALIGNMENT 64
|
||||
|
||||
|
||||
/* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is
|
||||
an operand of a function call. */
|
||||
|
||||
#undef LEGITIMATE_PIC_OPERAND_P
|
||||
#define LEGITIMATE_PIC_OPERAND_P(X) \
|
||||
((! symbolic_operand (X, VOIDmode) \
|
||||
&& ! (GET_CODE (X) == CONST_DOUBLE && mem_for_const_double (X) \
|
||||
&& GET_CODE (mem_for_const_double (X)) == MEM \
|
||||
&& symbolic_operand (XEXP (mem_for_const_double (X), 0), \
|
||||
VOIDmode))) \
|
||||
|| (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \
|
||||
|| PCREL_GENERAL_OPERAND_OK)
|
||||
|
||||
|
||||
/* For m68k SVR4, structures are returned using the reentrant
|
||||
technique. */
|
||||
|
||||
|
@ -1477,7 +1477,6 @@ extern void end_full_sequence (rtx*, rtx*);
|
||||
/* In varasm.c */
|
||||
extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
|
||||
enum machine_mode);
|
||||
extern rtx mem_for_const_double (rtx);
|
||||
extern rtx force_const_mem (enum machine_mode, rtx);
|
||||
|
||||
/* In varasm.c */
|
||||
|
17
gcc/varasm.c
17
gcc/varasm.c
@ -2931,23 +2931,6 @@ record_constant_rtx (enum machine_mode mode, rtx x)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/* Given a constant rtx X, return a MEM for the location in memory at which
|
||||
this constant has been placed. Return 0 if it not has been placed yet. */
|
||||
|
||||
rtx
|
||||
mem_for_const_double (rtx x)
|
||||
{
|
||||
enum machine_mode mode = GET_MODE (x);
|
||||
struct constant_descriptor_rtx *desc;
|
||||
|
||||
for (desc = const_rtx_hash_table[const_hash_rtx (mode, x)]; desc;
|
||||
desc = desc->next)
|
||||
if (compare_constant_rtx (mode, x, desc))
|
||||
return desc->rtl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Given a constant rtx X, make (or find) a memory constant for its value
|
||||
and return a MEM rtx to refer to it in memory. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user