+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>
* config/rs6000/rs6000.c (debug_stack_info): Invert the test
#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
high and lo relocs that calculate the base address using a PC
relative reloc.
int aarch64_get_condition_code (rtx);
bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode);
int aarch64_branch_cost (bool, bool);
-enum aarch64_symbol_type
-aarch64_classify_symbolic_expression (rtx, enum aarch64_symbol_context);
+enum aarch64_symbol_type aarch64_classify_symbolic_expression (rtx);
bool aarch64_const_vec_all_same_int_p (rtx, HOST_WIDE_INT);
bool aarch64_constant_address_p (rtx);
bool aarch64_expand_movmem (rtx *);
bool aarch64_modes_tieable_p (machine_mode mode1,
machine_mode mode2);
bool aarch64_move_imm (HOST_WIDE_INT, machine_mode);
-bool aarch64_mov_operand_p (rtx, enum aarch64_symbol_context,
- machine_mode);
+bool aarch64_mov_operand_p (rtx, machine_mode);
int aarch64_simd_attr_length_rglist (enum machine_mode);
rtx aarch64_reverse_mask (enum machine_mode);
bool aarch64_offset_7bit_signed_scaled_p (machine_mode, HOST_WIDE_INT);
const char *aarch64_output_casesi (rtx *);
const char *aarch64_rewrite_selected_cpu (const char *name);
-enum aarch64_symbol_type aarch64_classify_symbol (rtx, rtx,
- enum aarch64_symbol_context);
+enum aarch64_symbol_type aarch64_classify_symbol (rtx, rtx);
enum aarch64_symbol_type aarch64_classify_tls_symbol (rtx);
enum reg_class aarch64_regno_regclass (unsigned);
int aarch64_asm_preferred_eh_data_format (int, int);
before we start classifying the symbol. */
split_const (imm, &base, &offset);
- sty = aarch64_classify_symbol (base, offset, SYMBOL_CONTEXT_ADR);
+ sty = aarch64_classify_symbol (base, offset);
switch (sty)
{
case SYMBOL_FORCE_TO_MEM:
split_const (x, &base, &offset);
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)
return true;
else
rtx sym, offs;
split_const (info->offset, &sym, &offs);
if (GET_CODE (sym) == SYMBOL_REF
- && (aarch64_classify_symbol (sym, offs, SYMBOL_CONTEXT_MEM)
- == SYMBOL_SMALL_ABSOLUTE))
+ && (aarch64_classify_symbol (sym, offs) == SYMBOL_SMALL_ABSOLUTE))
{
/* The symbol and offset must be aligned to the access size. */
unsigned int align;
return GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF;
}
-/* Classify the base of symbolic expression X, given that X appears in
- context CONTEXT. */
+/* Classify the base of symbolic expression X. */
enum aarch64_symbol_type
-aarch64_classify_symbolic_expression (rtx x,
- enum aarch64_symbol_context context)
+aarch64_classify_symbolic_expression (rtx x)
{
rtx offset;
split_const (x, &x, &offset);
- return aarch64_classify_symbol (x, offset, context);
+ return aarch64_classify_symbol (x, offset);
}
if (GET_CODE (x) == HIGH)
x = XEXP (x, 0);
- switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
+ switch (aarch64_classify_symbolic_expression (x))
{
case SYMBOL_SMALL_GOT_4G:
asm_fprintf (asm_out_file, ":got:");
break;
case 'L':
- switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
+ switch (aarch64_classify_symbolic_expression (x))
{
case SYMBOL_SMALL_GOT_4G:
asm_fprintf (asm_out_file, ":lo12:");
case 'G':
- switch (aarch64_classify_symbolic_expression (x, SYMBOL_CONTEXT_ADR))
+ switch (aarch64_classify_symbolic_expression (x))
{
case SYMBOL_TLSLE24:
asm_fprintf (asm_out_file, ":tprel_hi12:");
}
/* 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
-aarch64_classify_symbol (rtx x, rtx offset,
- enum aarch64_symbol_context context ATTRIBUTE_UNUSED)
+aarch64_classify_symbol (rtx x, rtx offset)
{
if (GET_CODE (x) == LABEL_REF)
{
}
bool
-aarch64_mov_operand_p (rtx x,
- enum aarch64_symbol_context context,
- machine_mode mode)
+aarch64_mov_operand_p (rtx x, machine_mode mode)
{
if (GET_CODE (x) == HIGH
&& aarch64_valid_symref (XEXP (x, 0), GET_MODE (XEXP (x, 0))))
if (GET_CODE (x) == SYMBOL_REF && mode == DImode && CONSTANT_ADDRESS_P (x))
return true;
- return aarch64_classify_symbolic_expression (x, context)
+ return aarch64_classify_symbolic_expression (x)
== SYMBOL_TINY_ABSOLUTE;
}
(define_predicate "aarch64_valid_symref"
(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);
})
(and (match_code "reg,subreg,mem,const,const_int,symbol_ref,label_ref,high")
(ior (match_operand 0 "register_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"
(and (match_code "reg,subreg,mem,const_int")