[AArch64] Delete aarch64_symbol_context which is not used
2015-09-24 Jiong Wang <jiong.wang@arm.com> * config/aarch64/aarch64-protos.h (aarch64_symbol_context): Delete. * config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Likewise. (aarch64_cannot_force_const_mem): Likewise. (aarch64_classify_address): Likewise. (aarch64_classify_symbolic_expression): Likewise. (aarch64_print_operand): Likewise. (aarch64_classify_symbol): Likewise. (aarch64_mov_operand_p): Likewise. * config/aarch64/predicates.md (aarch64_valid_symref): Likewise. (aarch64_mov_operand): Likewise. From-SVN: r228092
This commit is contained in:
parent
9bc5028273
commit
a6e0bfa7ca
@ -1,3 +1,16 @@
|
|||||||
|
2015-09-24 Jiong Wang <jiong.wang@arm.com>
|
||||||
|
|
||||||
|
* config/aarch64/aarch64-protos.h (aarch64_symbol_context): Delete.
|
||||||
|
* config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Likewise.
|
||||||
|
(aarch64_cannot_force_const_mem): Likewise.
|
||||||
|
(aarch64_classify_address): Likewise.
|
||||||
|
(aarch64_classify_symbolic_expression): Likewise.
|
||||||
|
(aarch64_print_operand): Likewise.
|
||||||
|
(aarch64_classify_symbol): Likewise.
|
||||||
|
(aarch64_mov_operand_p): Likewise.
|
||||||
|
* config/aarch64/predicates.md (aarch64_valid_symref): Likewise.
|
||||||
|
(aarch64_mov_operand): Likewise.
|
||||||
|
|
||||||
2015-09-24 Segher Boessenkool <segher@kernel.crashing.org>
|
2015-09-24 Segher Boessenkool <segher@kernel.crashing.org>
|
||||||
|
|
||||||
* config/rs6000/rs6000.c (debug_stack_info): Invert the test
|
* config/rs6000/rs6000.c (debug_stack_info): Invert the test
|
||||||
|
@ -24,18 +24,6 @@
|
|||||||
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
/*
|
|
||||||
SYMBOL_CONTEXT_ADR
|
|
||||||
The symbol is used in a load-address operation.
|
|
||||||
SYMBOL_CONTEXT_MEM
|
|
||||||
The symbol is used as the address in a MEM.
|
|
||||||
*/
|
|
||||||
enum aarch64_symbol_context
|
|
||||||
{
|
|
||||||
SYMBOL_CONTEXT_MEM,
|
|
||||||
SYMBOL_CONTEXT_ADR
|
|
||||||
};
|
|
||||||
|
|
||||||
/* SYMBOL_SMALL_ABSOLUTE: Generate symbol accesses through
|
/* SYMBOL_SMALL_ABSOLUTE: Generate symbol accesses through
|
||||||
high and lo relocs that calculate the base address using a PC
|
high and lo relocs that calculate the base address using a PC
|
||||||
relative reloc.
|
relative reloc.
|
||||||
@ -258,8 +246,7 @@ HOST_WIDE_INT aarch64_initial_elimination_offset (unsigned, unsigned);
|
|||||||
int aarch64_get_condition_code (rtx);
|
int aarch64_get_condition_code (rtx);
|
||||||
bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode);
|
bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode);
|
||||||
int aarch64_branch_cost (bool, bool);
|
int aarch64_branch_cost (bool, bool);
|
||||||
enum aarch64_symbol_type
|
enum aarch64_symbol_type aarch64_classify_symbolic_expression (rtx);
|
||||||
aarch64_classify_symbolic_expression (rtx, enum aarch64_symbol_context);
|
|
||||||
bool aarch64_const_vec_all_same_int_p (rtx, HOST_WIDE_INT);
|
bool aarch64_const_vec_all_same_int_p (rtx, HOST_WIDE_INT);
|
||||||
bool aarch64_constant_address_p (rtx);
|
bool aarch64_constant_address_p (rtx);
|
||||||
bool aarch64_expand_movmem (rtx *);
|
bool aarch64_expand_movmem (rtx *);
|
||||||
@ -278,8 +265,7 @@ bool aarch64_legitimate_pic_operand_p (rtx);
|
|||||||
bool aarch64_modes_tieable_p (machine_mode mode1,
|
bool aarch64_modes_tieable_p (machine_mode mode1,
|
||||||
machine_mode mode2);
|
machine_mode mode2);
|
||||||
bool aarch64_move_imm (HOST_WIDE_INT, machine_mode);
|
bool aarch64_move_imm (HOST_WIDE_INT, machine_mode);
|
||||||
bool aarch64_mov_operand_p (rtx, enum aarch64_symbol_context,
|
bool aarch64_mov_operand_p (rtx, machine_mode);
|
||||||
machine_mode);
|
|
||||||
int aarch64_simd_attr_length_rglist (enum machine_mode);
|
int aarch64_simd_attr_length_rglist (enum machine_mode);
|
||||||
rtx aarch64_reverse_mask (enum machine_mode);
|
rtx aarch64_reverse_mask (enum machine_mode);
|
||||||
bool aarch64_offset_7bit_signed_scaled_p (machine_mode, HOST_WIDE_INT);
|
bool aarch64_offset_7bit_signed_scaled_p (machine_mode, HOST_WIDE_INT);
|
||||||
@ -304,8 +290,7 @@ const char *aarch64_mangle_builtin_type (const_tree);
|
|||||||
const char *aarch64_output_casesi (rtx *);
|
const char *aarch64_output_casesi (rtx *);
|
||||||
const char *aarch64_rewrite_selected_cpu (const char *name);
|
const char *aarch64_rewrite_selected_cpu (const char *name);
|
||||||
|
|
||||||
enum aarch64_symbol_type aarch64_classify_symbol (rtx, rtx,
|
enum aarch64_symbol_type aarch64_classify_symbol (rtx, rtx);
|
||||||
enum aarch64_symbol_context);
|
|
||||||
enum aarch64_symbol_type aarch64_classify_tls_symbol (rtx);
|
enum aarch64_symbol_type aarch64_classify_tls_symbol (rtx);
|
||||||
enum reg_class aarch64_regno_regclass (unsigned);
|
enum reg_class aarch64_regno_regclass (unsigned);
|
||||||
int aarch64_asm_preferred_eh_data_format (int, int);
|
int aarch64_asm_preferred_eh_data_format (int, int);
|
||||||
|
@ -1547,7 +1547,7 @@ aarch64_expand_mov_immediate (rtx dest, rtx imm)
|
|||||||
before we start classifying the symbol. */
|
before we start classifying the symbol. */
|
||||||
split_const (imm, &base, &offset);
|
split_const (imm, &base, &offset);
|
||||||
|
|
||||||
sty = aarch64_classify_symbol (base, offset, SYMBOL_CONTEXT_ADR);
|
sty = aarch64_classify_symbol (base, offset);
|
||||||
switch (sty)
|
switch (sty)
|
||||||
{
|
{
|
||||||
case SYMBOL_FORCE_TO_MEM:
|
case SYMBOL_FORCE_TO_MEM:
|
||||||
@ -3250,7 +3250,7 @@ aarch64_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, rtx x)
|
|||||||
split_const (x, &base, &offset);
|
split_const (x, &base, &offset);
|
||||||
if (GET_CODE (base) == SYMBOL_REF || GET_CODE (base) == LABEL_REF)
|
if (GET_CODE (base) == SYMBOL_REF || GET_CODE (base) == LABEL_REF)
|
||||||
{
|
{
|
||||||
if (aarch64_classify_symbol (base, offset, SYMBOL_CONTEXT_ADR)
|
if (aarch64_classify_symbol (base, offset)
|
||||||
!= SYMBOL_FORCE_TO_MEM)
|
!= SYMBOL_FORCE_TO_MEM)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
@ -3696,8 +3696,7 @@ aarch64_classify_address (struct aarch64_address_info *info,
|
|||||||
rtx sym, offs;
|
rtx sym, offs;
|
||||||
split_const (info->offset, &sym, &offs);
|
split_const (info->offset, &sym, &offs);
|
||||||
if (GET_CODE (sym) == SYMBOL_REF
|
if (GET_CODE (sym) == SYMBOL_REF
|
||||||
&& (aarch64_classify_symbol (sym, offs, SYMBOL_CONTEXT_MEM)
|
&& (aarch64_classify_symbol (sym, offs) == SYMBOL_SMALL_ABSOLUTE))
|
||||||
== SYMBOL_SMALL_ABSOLUTE))
|
|
||||||
{
|
{
|
||||||
/* The symbol and offset must be aligned to the access size. */
|
/* The symbol and offset must be aligned to the access size. */
|
||||||
unsigned int align;
|
unsigned int align;
|
||||||
@ -3743,17 +3742,15 @@ aarch64_symbolic_address_p (rtx x)
|
|||||||
return GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF;
|
return GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Classify the base of symbolic expression X, given that X appears in
|
/* Classify the base of symbolic expression X. */
|
||||||
context CONTEXT. */
|
|
||||||
|
|
||||||
enum aarch64_symbol_type
|
enum aarch64_symbol_type
|
||||||
aarch64_classify_symbolic_expression (rtx x,
|
aarch64_classify_symbolic_expression (rtx x)
|
||||||
enum aarch64_symbol_context context)
|
|
||||||
{
|
{
|
||||||
rtx offset;
|
rtx offset;
|
||||||
|
|
||||||
split_const (x, &x, &offset);
|
split_const (x, &x, &offset);
|
||||||
return aarch64_classify_symbol (x, offset, context);
|
return aarch64_classify_symbol (x, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4441,7 +4438,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
|
|||||||
if (GET_CODE (x) == HIGH)
|
if (GET_CODE (x) == HIGH)
|
||||||
x = XEXP (x, 0);
|
x = XEXP (x, 0);
|
||||||
|
|
||||||
switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
|
switch (aarch64_classify_symbolic_expression (x))
|
||||||
{
|
{
|
||||||
case SYMBOL_SMALL_GOT_4G:
|
case SYMBOL_SMALL_GOT_4G:
|
||||||
asm_fprintf (asm_out_file, ":got:");
|
asm_fprintf (asm_out_file, ":got:");
|
||||||
@ -4474,7 +4471,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'L':
|
case 'L':
|
||||||
switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
|
switch (aarch64_classify_symbolic_expression (x))
|
||||||
{
|
{
|
||||||
case SYMBOL_SMALL_GOT_4G:
|
case SYMBOL_SMALL_GOT_4G:
|
||||||
asm_fprintf (asm_out_file, ":lo12:");
|
asm_fprintf (asm_out_file, ":lo12:");
|
||||||
@ -4516,7 +4513,7 @@ aarch64_print_operand (FILE *f, rtx x, char code)
|
|||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
|
|
||||||
switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
|
switch (aarch64_classify_symbolic_expression (x))
|
||||||
{
|
{
|
||||||
case SYMBOL_TLSLE24:
|
case SYMBOL_TLSLE24:
|
||||||
asm_fprintf (asm_out_file, ":tprel_hi12:");
|
asm_fprintf (asm_out_file, ":tprel_hi12:");
|
||||||
@ -8753,11 +8750,10 @@ aarch64_classify_tls_symbol (rtx x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return the method that should be used to access SYMBOL_REF or
|
/* Return the method that should be used to access SYMBOL_REF or
|
||||||
LABEL_REF X in context CONTEXT. */
|
LABEL_REF X. */
|
||||||
|
|
||||||
enum aarch64_symbol_type
|
enum aarch64_symbol_type
|
||||||
aarch64_classify_symbol (rtx x, rtx offset,
|
aarch64_classify_symbol (rtx x, rtx offset)
|
||||||
enum aarch64_symbol_context context ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
if (GET_CODE (x) == LABEL_REF)
|
if (GET_CODE (x) == LABEL_REF)
|
||||||
{
|
{
|
||||||
@ -10185,9 +10181,7 @@ aarch64_simd_imm_scalar_p (rtx x, machine_mode mode ATTRIBUTE_UNUSED)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
aarch64_mov_operand_p (rtx x,
|
aarch64_mov_operand_p (rtx x, machine_mode mode)
|
||||||
enum aarch64_symbol_context context,
|
|
||||||
machine_mode mode)
|
|
||||||
{
|
{
|
||||||
if (GET_CODE (x) == HIGH
|
if (GET_CODE (x) == HIGH
|
||||||
&& aarch64_valid_symref (XEXP (x, 0), GET_MODE (XEXP (x, 0))))
|
&& aarch64_valid_symref (XEXP (x, 0), GET_MODE (XEXP (x, 0))))
|
||||||
@ -10199,7 +10193,7 @@ aarch64_mov_operand_p (rtx x,
|
|||||||
if (GET_CODE (x) == SYMBOL_REF && mode == DImode && CONSTANT_ADDRESS_P (x))
|
if (GET_CODE (x) == SYMBOL_REF && mode == DImode && CONSTANT_ADDRESS_P (x))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return aarch64_classify_symbolic_expression (x, context)
|
return aarch64_classify_symbolic_expression (x)
|
||||||
== SYMBOL_TINY_ABSOLUTE;
|
== SYMBOL_TINY_ABSOLUTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
(define_predicate "aarch64_valid_symref"
|
(define_predicate "aarch64_valid_symref"
|
||||||
(match_code "const, symbol_ref, label_ref")
|
(match_code "const, symbol_ref, label_ref")
|
||||||
{
|
{
|
||||||
return (aarch64_classify_symbolic_expression (op, SYMBOL_CONTEXT_ADR)
|
return (aarch64_classify_symbolic_expression (op)
|
||||||
!= SYMBOL_FORCE_TO_MEM);
|
!= SYMBOL_FORCE_TO_MEM);
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -215,7 +215,7 @@
|
|||||||
(and (match_code "reg,subreg,mem,const,const_int,symbol_ref,label_ref,high")
|
(and (match_code "reg,subreg,mem,const,const_int,symbol_ref,label_ref,high")
|
||||||
(ior (match_operand 0 "register_operand")
|
(ior (match_operand 0 "register_operand")
|
||||||
(ior (match_operand 0 "memory_operand")
|
(ior (match_operand 0 "memory_operand")
|
||||||
(match_test "aarch64_mov_operand_p (op, SYMBOL_CONTEXT_ADR, mode)")))))
|
(match_test "aarch64_mov_operand_p (op, mode)")))))
|
||||||
|
|
||||||
(define_predicate "aarch64_movti_operand"
|
(define_predicate "aarch64_movti_operand"
|
||||||
(and (match_code "reg,subreg,mem,const_int")
|
(and (match_code "reg,subreg,mem,const_int")
|
||||||
|
Loading…
Reference in New Issue
Block a user