Commit 81088e13 authored by Jeff Chapman's avatar Jeff Chapman

update to current svn

parent 3be25873
This diff is collapsed.
......@@ -3652,6 +3652,20 @@ compute_objsize (tree dest, int ostype)
if (!ostype)
return NULL_TREE;
if (TREE_CODE (dest) == MEM_REF)
{
tree ref = TREE_OPERAND (dest, 0);
tree off = TREE_OPERAND (dest, 1);
if (tree size = compute_objsize (ref, ostype))
{
if (tree_int_cst_lt (off, size))
return fold_build2 (MINUS_EXPR, size_type_node, size, off);
return integer_zero_node;
}
return NULL_TREE;
}
if (TREE_CODE (dest) != ADDR_EXPR)
return NULL_TREE;
......
2019-07-25 Martin Liska <mliska@suse.cz>
Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
PR c++/23383
* c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2019-07-25 Martin Liska <mliska@suse.cz>
* c-decl.c (merge_decls): Use new macros
(e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2019-07-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/83518
......
......@@ -2639,7 +2639,10 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
|= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
DECL_IS_OPERATOR_NEW (newdecl) |= DECL_IS_OPERATOR_NEW (olddecl);
if (DECL_IS_OPERATOR_NEW_P (olddecl))
DECL_SET_IS_OPERATOR_NEW (newdecl, true);
if (DECL_IS_OPERATOR_DELETE_P (olddecl))
DECL_SET_IS_OPERATOR_DELETE (newdecl, true);
TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
DECL_PURE_P (newdecl) |= DECL_PURE_P (olddecl);
DECL_IS_NOVOPS (newdecl) |= DECL_IS_NOVOPS (olddecl);
......
......@@ -1395,7 +1395,7 @@ maybe_warn_alloc_args_overflow (tree fn, tree exp, tree args[2], int idx[2])
&& fn
&& !args[1]
&& lang_GNU_CXX ()
&& DECL_IS_OPERATOR_NEW (fn)
&& DECL_IS_OPERATOR_NEW_P (fn)
&& integer_all_onesp (args[i]))
continue;
......
......@@ -846,17 +846,8 @@ symbol_table::create_edge (cgraph_node *caller, cgraph_node *callee,
gcc_assert (is_gimple_call (call_stmt));
}
if (free_edges)
{
edge = free_edges;
free_edges = NEXT_FREE_EDGE (edge);
}
else
{
edge = ggc_alloc<cgraph_edge> ();
edge->m_summary_id = -1;
}
edge = ggc_alloc<cgraph_edge> ();
edge->m_summary_id = -1;
edges_count++;
gcc_assert (++edges_max_uid != 0);
......@@ -1013,16 +1004,13 @@ cgraph_edge::remove_caller (void)
void
symbol_table::free_edge (cgraph_edge *e)
{
edges_count--;
if (e->m_summary_id != -1)
edge_released_summary_ids.safe_push (e->m_summary_id);
if (e->indirect_info)
ggc_free (e->indirect_info);
/* Clear out the edge so we do not dangle pointers. */
int summary_id = e->m_summary_id;
memset (e, 0, sizeof (*e));
e->m_summary_id = summary_id;
NEXT_FREE_EDGE (e) = free_edges;
free_edges = e;
edges_count--;
ggc_free (e);
}
/* Remove the edge in the cgraph. */
......
......@@ -2027,12 +2027,6 @@ is_a_helper <varpool_node *>::test (symtab_node *p)
return p && p->type == SYMTAB_VARIABLE;
}
/* Macros to access the next item in the list of free cgraph nodes and
edges. */
#define NEXT_FREE_NODE(NODE) dyn_cast<cgraph_node *> ((NODE)->next)
#define SET_NEXT_FREE_NODE(NODE,NODE2) ((NODE))->next = NODE2
#define NEXT_FREE_EDGE(EDGE) (EDGE)->prev_caller
typedef void (*cgraph_edge_hook)(cgraph_edge *, void *);
typedef void (*cgraph_node_hook)(cgraph_node *, void *);
typedef void (*varpool_node_hook)(varpool_node *, void *);
......@@ -2088,7 +2082,8 @@ public:
friend struct cgraph_edge;
symbol_table (): cgraph_max_uid (1), cgraph_max_summary_id (0),
edges_max_uid (1), edges_max_summary_id (0)
edges_max_uid (1), edges_max_summary_id (0),
cgraph_released_summary_ids (), edge_released_summary_ids ()
{
}
......@@ -2297,14 +2292,22 @@ public:
/* Assign a new summary ID for the callgraph NODE. */
inline int assign_summary_id (cgraph_node *node)
{
node->m_summary_id = cgraph_max_summary_id++;
if (!cgraph_released_summary_ids.is_empty ())
node->m_summary_id = cgraph_released_summary_ids.pop ();
else
node->m_summary_id = cgraph_max_summary_id++;
return node->m_summary_id;
}
/* Assign a new summary ID for the callgraph EDGE. */
inline int assign_summary_id (cgraph_edge *edge)
{
edge->m_summary_id = edges_max_summary_id++;
if (!edge_released_summary_ids.is_empty ())
edge->m_summary_id = edge_released_summary_ids.pop ();
else
edge->m_summary_id = edges_max_summary_id++;
return edge->m_summary_id;
}
......@@ -2320,14 +2323,15 @@ public:
int edges_max_uid;
int edges_max_summary_id;
/* Vector of released summary IDS for cgraph nodes. */
vec<int> GTY ((skip)) cgraph_released_summary_ids;
/* Vector of released summary IDS for cgraph nodes. */
vec<int> GTY ((skip)) edge_released_summary_ids;
symtab_node* GTY(()) nodes;
asm_node* GTY(()) asmnodes;
asm_node* GTY(()) asm_last_node;
cgraph_node* GTY(()) free_nodes;
/* Head of a linked list of unused (freed) call graph edges.
Do not GTY((delete)) this list so UIDs gets reliably recycled. */
cgraph_edge * GTY(()) free_edges;
/* The order index of the next symtab node to be created. This is
used so that we can sort the cgraph nodes in order by when we saw
......@@ -2687,15 +2691,9 @@ inline void
symbol_table::release_symbol (cgraph_node *node)
{
cgraph_count--;
/* Clear out the node to NULL all pointers and add the node to the free
list. */
int summary_id = node->m_summary_id;
memset (node, 0, sizeof (*node));
node->type = SYMTAB_FUNCTION;
node->m_summary_id = summary_id;
SET_NEXT_FREE_NODE (node, free_nodes);
free_nodes = node;
if (node->m_summary_id != -1)
cgraph_released_summary_ids.safe_push (node->m_summary_id);
ggc_free (node);
}
/* Allocate new callgraph node. */
......@@ -2705,17 +2703,9 @@ symbol_table::allocate_cgraph_symbol (void)
{
cgraph_node *node;
if (free_nodes)
{
node = free_nodes;
free_nodes = NEXT_FREE_NODE (node);
}
else
{
node = ggc_cleared_alloc<cgraph_node> ();
node->m_summary_id = -1;
}
node = ggc_cleared_alloc<cgraph_node> ();
node->type = SYMTAB_FUNCTION;
node->m_summary_id = -1;
node->m_uid = cgraph_max_uid++;
return node;
}
......
......@@ -2613,8 +2613,11 @@ symbol_table::compile (void)
/* Don't run the IPA passes if there was any error or sorry messages. */
if (!seen_error ())
{
timevar_start (TV_CGRAPH_IPA_PASSES);
ipa_passes ();
timevar_stop (TV_CGRAPH_IPA_PASSES);
}
/* Do nothing else if any IPA pass found errors or if we are just streaming LTO. */
if (seen_error ()
|| ((!in_lto_p || flag_incremental_link == INCREMENTAL_LINK_LTO)
......@@ -2680,7 +2683,11 @@ symbol_table::compile (void)
/* Output first asm statements and anything ordered. The process
flag is cleared for these nodes, so we skip them later. */
output_in_order ();
timevar_start (TV_CGRAPH_FUNC_EXPANSION);
expand_all_functions ();
timevar_stop (TV_CGRAPH_FUNC_EXPANSION);
output_variables ();
process_new_functions ();
......
......@@ -83,6 +83,10 @@ DEFCIFCODE(RECURSIVE_INLINING, CIF_FINAL_NORMAL,
DEFCIFCODE(UNLIKELY_CALL, CIF_FINAL_NORMAL,
N_("call is unlikely and code size would grow"))
/* Call is considered never executed. */
DEFCIFCODE(NEVER_CALL, CIF_FINAL_NORMAL,
N_("call is considered never executed and code size would grow"))
/* Function is not declared as inline. */
DEFCIFCODE(NOT_DECLARED_INLINED, CIF_FINAL_NORMAL,
N_("function not declared inline and code size would grow"))
......
......@@ -1955,7 +1955,7 @@ Common Var(flag_dce) Init(1) Optimization
Use the RTL dead code elimination pass.
fdse
Common Var(flag_dse) Init(1) Optimization
Common Var(flag_dse) Init(0) Optimization
Use the RTL dead store elimination pass.
freschedule-modulo-scheduled-loops
......@@ -2211,6 +2211,10 @@ Enum(live_patching_level) String(inline-only-static) Value(LIVE_PATCHING_INLINE_
EnumValue
Enum(live_patching_level) String(inline-clone) Value(LIVE_PATCHING_INLINE_CLONE)
fallocation-dce
Common Report Var(flag_allocation_dce) Init(1) Optimization
Tell DCE to remove unused C++ allocations.
flive-range-shrinkage
Common Report Var(flag_live_range_shrinkage) Init(0) Optimization
Relief of register pressure through live range shrinkage.
......
......@@ -2512,6 +2512,12 @@ msp430*-*-*)
cxx_target_objs="msp430-c.o"
tmake_file="${tmake_file} msp430/t-msp430"
extra_gcc_objs="driver-msp430.o"
# Enable .init_array unless it has been explicitly disabled.
# The MSP430 EABI mandates the use of .init_array, and the Newlib CRT
# code since mid-2019 expects it.
if test x${disable_initfini_array} != xyes; then
gcc_cv_initfini_array=yes
fi
;;
nds32*-*-*)
target_cpu_default="0"
......@@ -3896,32 +3902,40 @@ case "${target}" in
sed -e 's/,.*$//'`
fi
# Use the pre-processor to strip flatten the options.
# This makes the format less rigid than if we use
# grep and sed directly here.
opt_macro="AARCH64_OPT_EXTENSION(A, B, C, D, E, F)=A, B, C, D, E, F"
options_parsed="`$ac_cv_prog_CPP -D"$opt_macro" -x c \
${srcdir}/config/aarch64/aarch64-option-extensions.def`"
# Match one element inside AARCH64_OPT_EXTENSION, we
# consume anything that's not a ,.
elem="[ ]*\([^,]\+\)[ ]*"
# Repeat the pattern for the number of entries in the
# AARCH64_OPT_EXTENSION, currently 6 times.
sed_patt="^$elem,$elem,$elem,$elem,$elem,$elem"
while [ x"$ext_val" != x ]
do
ext_val=`echo $ext_val | sed -e 's/\+//'`
ext=`echo $ext_val | sed -e 's/\+.*//'`
base_ext=`echo $ext | sed -e 's/^no//'`
opt_line=`echo -e "$options_parsed" | \
grep "^\"$base_ext\""`
if [ x"$base_ext" = x ] \
|| grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
${srcdir}/config/aarch64/aarch64-option-extensions.def \
> /dev/null; then
ext_canon=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
${srcdir}/config/aarch64/aarch64-option-extensions.def | \
sed -e 's/^[^,]*,[ ]*//' | \
sed -e 's/,.*$//'`
ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
${srcdir}/config/aarch64/aarch64-option-extensions.def | \
sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*//' | \
sed -e 's/,.*$//' | \
sed -e 's/).*$//'`
ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
${srcdir}/config/aarch64/aarch64-option-extensions.def | \
sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*[^,]*,[ ]*//' | \
sed -e 's/,.*$//' | \
sed -e 's/).*$//'`
|| [[ -n $opt_line ]]; then
# These regexp extract the elements based on
# their group match index in the regexp.
ext_canon=`echo -e "$opt_line" | \
sed -e "s/$sed_patt/\2/"`
ext_on=`echo -e "$opt_line" | \
sed -e "s/$sed_patt/\3/"`
ext_off=`echo -e "$opt_line" | \
sed -e "s/$sed_patt/\4/"`
if [ $ext = $base_ext ]; then
# Adding extension
......
......@@ -3981,16 +3981,16 @@
)
(define_code_iterator SAT [smin smax])
(define_code_iterator SATrev [smin smax])
(define_code_attr SATrev [(smin "smax") (smax "smin")])
(define_code_attr SATlo [(smin "1") (smax "2")])
(define_code_attr SAThi [(smin "2") (smax "1")])
(define_insn "*satsi_<SAT:code>"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(SAT:SI (SATrev:SI (match_operand:SI 3 "s_register_operand" "r")
(SAT:SI (<SATrev>:SI (match_operand:SI 3 "s_register_operand" "r")
(match_operand:SI 1 "const_int_operand" "i"))
(match_operand:SI 2 "const_int_operand" "i")))]
"TARGET_32BIT && arm_arch6 && <SAT:CODE> != <SATrev:CODE>
"TARGET_32BIT && arm_arch6
&& arm_sat_operator_match (operands[<SAT:SATlo>], operands[<SAT:SAThi>], NULL, NULL)"
{
int mask;
......@@ -4011,12 +4011,12 @@
(define_insn "*satsi_<SAT:code>_shift"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(SAT:SI (SATrev:SI (match_operator:SI 3 "sat_shift_operator"
(SAT:SI (<SATrev>:SI (match_operator:SI 3 "sat_shift_operator"
[(match_operand:SI 4 "s_register_operand" "r")
(match_operand:SI 5 "const_int_operand" "i")])
(match_operand:SI 1 "const_int_operand" "i"))
(match_operand:SI 2 "const_int_operand" "i")))]
"TARGET_32BIT && arm_arch6 && <SAT:CODE> != <SATrev:CODE>
"TARGET_32BIT && arm_arch6
&& arm_sat_operator_match (operands[<SAT:SATlo>], operands[<SAT:SAThi>], NULL, NULL)"
{
int mask;
......
......@@ -247,8 +247,8 @@
;; regs. The high register alternatives are not taken into account when
;; choosing register preferences in order to reflect their expense.
(define_insn "*thumb2_movsi_insn"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,l,r,r,l ,*hk,m,*m")
(match_operand:SI 1 "general_operand" "rk,I,Py,K,j,mi,*mi,l,*hk"))]
[(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,l,r,r,lk*r,m")
(match_operand:SI 1 "general_operand" "rk,I,Py,K,j,mi,lk*r"))]
"TARGET_THUMB2 && !TARGET_IWMMXT && !TARGET_HARD_FLOAT
&& ( register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode))"
......@@ -262,22 +262,20 @@
case 3: return \"mvn%?\\t%0, #%B1\";
case 4: return \"movw%?\\t%0, %1\";
case 5:
case 6:
/* Cannot load it directly, split to load it via MOV / MOVT. */
if (!MEM_P (operands[1]) && arm_disable_literal_pool)
return \"#\";
return \"ldr%?\\t%0, %1\";
case 7:
case 8: return \"str%?\\t%1, %0\";
case 6: return \"str%?\\t%1, %0\";
default: gcc_unreachable ();
}
}
[(set_attr "type" "mov_reg,mov_imm,mov_imm,mvn_imm,mov_imm,load_4,load_4,store_4,store_4")
(set_attr "length" "2,4,2,4,4,4,4,4,4")
[(set_attr "type" "mov_reg,mov_imm,mov_imm,mvn_imm,mov_imm,load_4,store_4")
(set_attr "length" "2,4,2,4,4,4,4")
(set_attr "predicable" "yes")
(set_attr "predicable_short_it" "yes,no,yes,no,no,no,no,no,no")
(set_attr "pool_range" "*,*,*,*,*,1018,4094,*,*")
(set_attr "neg_pool_range" "*,*,*,*,*,0,0,*,*")]
(set_attr "predicable_short_it" "yes,no,yes,no,no,no,no")
(set_attr "pool_range" "*,*,*,*,*,4094,*")
(set_attr "neg_pool_range" "*,*,*,*,*,0,*")]
)
(define_insn "tls_load_dot_plus_four"
......
......@@ -258,8 +258,8 @@
;; is chosen with length 2 when the instruction is predicated for
;; arm_restrict_it.
(define_insn "*thumb2_movsi_vfp"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,l,r,r, l,*hk,m, *m,*t, r,*t,*t, *Uv")
(match_operand:SI 1 "general_operand" "rk,I,Py,K,j,mi,*mi,l,*hk, r,*t,*t,*UvTu,*t"))]
[(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,l,r,r,lk*r,m,*t, r,*t,*t, *Uv")
(match_operand:SI 1 "general_operand" "rk,I,Py,K,j,mi,lk*r, r,*t,*t,*UvTu,*t"))]
"TARGET_THUMB2 && TARGET_HARD_FLOAT
&& ( s_register_operand (operands[0], SImode)
|| s_register_operand (operands[1], SImode))"
......@@ -275,32 +275,30 @@
case 4:
return \"movw%?\\t%0, %1\";
case 5:
case 6:
/* Cannot load it directly, split to load it via MOV / MOVT. */
if (!MEM_P (operands[1]) && arm_disable_literal_pool)
return \"#\";
return \"ldr%?\\t%0, %1\";
case 7:
case 8:
case 6:
return \"str%?\\t%1, %0\";
case 9:
case 7:
return \"vmov%?\\t%0, %1\\t%@ int\";
case 10:
case 8:
return \"vmov%?\\t%0, %1\\t%@ int\";
case 11:
case 9:
return \"vmov%?.f32\\t%0, %1\\t%@ int\";
case 12: case 13:
case 10: case 11:
return output_move_vfp (operands);
default:
gcc_unreachable ();
}
"
[(set_attr "predicable" "yes")
(set_attr "predicable_short_it" "yes,no,yes,no,no,no,no,no,no,no,no,no,no,no")
(set_attr "type" "mov_reg,mov_reg,mov_reg,mvn_reg,mov_imm,load_4,load_4,store_4,store_4,f_mcr,f_mrc,fmov,f_loads,f_stores")
(set_attr "length" "2,4,2,4,4,4,4,4,4,4,4,4,4,4")
(set_attr "pool_range" "*,*,*,*,*,1018,4094,*,*,*,*,*,1018,*")
(set_attr "neg_pool_range" "*,*,*,*,*, 0, 0,*,*,*,*,*,1008,*")]
(set_attr "predicable_short_it" "yes,no,yes,no,no,no,no,no,no,no,no,no")
(set_attr "type" "mov_reg,mov_reg,mov_reg,mvn_reg,mov_imm,load_4,store_4,f_mcr,f_mrc,fmov,f_loads,f_stores")
(set_attr "length" "2,4,2,4,4,4,4,4,4,4,4,4")
(set_attr "pool_range" "*,*,*,*,*,4094,*,*,*,*,1018,*")
(set_attr "neg_pool_range" "*,*,*,*,*, 0,*,*,*,*,1008,*")]
)
......
......@@ -39,6 +39,33 @@ along with GCC; see the file COPYING3. If not see
#endif
#endif
/* WORKAROUND pr80556:
For x86_64 Darwin10 and later, the unwinder is in libunwind (redirected
from libSystem). This doesn't use the keymgr (see keymgr.c) and therefore
the calls that libgcc makes to obtain the KEYMGR_GCC3_DW2_OBJ_LIST are not
updated to include new images, and might not even be valid for a single
image.
Therefore, for 64b exes at least, we must use the libunwind implementation,
even when static-libgcc is specified. We put libSystem first so that
unwinder symbols are satisfied from there.
We default to 64b for single-arch builds, so apply this unconditionally. */
#undef REAL_LIBGCC_SPEC
#define REAL_LIBGCC_SPEC \
"%{static-libgcc|static: \
%:version-compare(>= 10.6 mmacosx-version-min= -lSystem) \
-lgcc_eh -lgcc; \
shared-libgcc|fexceptions|fgnu-runtime: \
%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \
%:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
-lgcc ; \
:%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
%:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
-lgcc }"
/* Size of the Obj-C jump buffer. */
#define OBJC_JBLEN ((TARGET_64BIT) ? ((9 * 2) + 3 + 16) : (18))
......@@ -120,9 +147,9 @@ along with GCC; see the file COPYING3. If not see
%{mpc64:crtprec64.o%s} \
%{mpc80:crtprec80.o%s}" TM_DESTRUCTOR
/* We default to x86_64 for single-arch builds, bi-arch overrides. */
#define DARWIN_ARCH_SPEC "x86_64"
/* We default to x86_64 for single-arch builds, bi-arch overrides. */
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
DARWIN_EXTRA_SPECS \
......
......@@ -49,7 +49,8 @@ extern bool msp430x;
/* -lgcc is included because crtend.o needs __mspabi_func_epilog_1. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!minrt:crtend.o%s} %{minrt:crtn-minrt.o%s}%{!minrt:crtn.o%s} -lgcc"
#define ENDFILE_SPEC "%{!minrt:crtend.o%s} " \
"%{minrt:%:if-exists(crtn-minrt.o%s)}%{!minrt:%:if-exists(crtn.o%s)} -lgcc"
#define ASM_SPEC "-mP " /* Enable polymorphic instructions. */ \
"%{mcpu=*:-mcpu=%*}%{!mcpu=*:%{mmcu=*:-mmcu=%*}} " /* Pass the CPU type on to the assembler. */ \
......
......@@ -25,7 +25,11 @@ along with GCC; see the file COPYING3. If not see
#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (ISA_2_7_MASKS_SERVER | MASK_POWERPC64 | MASK_64BIT | MASK_LITTLE_ENDIAN)
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mpower8"
#else
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT)
#undef ASM_DEFAULT_SPEC
#define ASM_DEFAULT_SPEC "-mpower4"
#endif
......@@ -23,5 +23,8 @@
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_EABI | MASK_ALTIVEC)
#undef ASM_DEFAULT_EXTRA
#define ASM_DEFAULT_EXTRA " %{!mvsx:%{!maltivec:%{!no-maltivec:-maltivec}}}"
#undef SUBSUBTARGET_OVERRIDE_OPTIONS
#define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1
......@@ -134,11 +134,9 @@ extern int dot_symbols;
} \
while (0)
#undef ASM_DEFAULT_SPEC
#undef ASM_SPEC
#undef LINK_OS_FREEBSD_SPEC
#define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
#define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
#define LINK_OS_FREEBSD_SPEC "%{m32:%(link_os_freebsd_spec32)}%{!m32:%(link_os_freebsd_spec64)}"
......
......@@ -59,19 +59,6 @@
} \
while (0)
#define GNU_USER_TARGET_D_OS_VERSIONS() \
do { \
builtin_version ("linux"); \
if (OPTION_GLIBC) \
builtin_version ("CRuntime_Glibc"); \
else if (OPTION_UCLIBC) \
builtin_version ("CRuntime_UClibc"); \
else if (OPTION_BIONIC) \
builtin_version ("CRuntime_Bionic"); \
else if (OPTION_MUSL) \
builtin_version ("CRuntime_Musl"); \
} while (0)
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
......
......@@ -181,24 +181,20 @@ extern int dot_symbols;
} \
while (0)
#undef ASM_DEFAULT_SPEC
#undef ASM_SPEC
#undef LINK_OS_LINUX_SPEC
#undef LINK_SECURE_PLT_SPEC
#ifndef RS6000_BI_ARCH
#define ASM_DEFAULT_SPEC "-mppc64"
#define ASM_SPEC "%(asm_spec64) %(asm_spec_common)"
#define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
#define LINK_SECURE_PLT_SPEC ""
#else
#if DEFAULT_ARCH64_P
#define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
#define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
#define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
#else
#define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
#define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
#define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
......@@ -376,7 +372,8 @@ extern int dot_symbols;
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
if (strcmp (rs6000_abi_name, "linux") == 0) \
if (strcmp (rs6000_abi_name, "linux") == 0 \
|| strcmp (rs6000_abi_name, "aixdesc") == 0) \
GNU_USER_TARGET_OS_CPP_BUILTINS(); \
if (TARGET_64BIT) \
{ \
......@@ -400,19 +397,6 @@ extern int dot_symbols;
} \
while (0)
#define GNU_USER_TARGET_D_OS_VERSIONS() \
do { \
builtin_version ("linux"); \
if (OPTION_GLIBC) \
builtin_version ("CRuntime_Glibc"); \
else if (OPTION_UCLIBC) \
builtin_version ("CRuntime_UClibc"); \
else if (OPTION_BIONIC) \
builtin_version ("CRuntime_Bionic"); \
else if (OPTION_MUSL) \
builtin_version ("CRuntime_Musl"); \
} while (0)
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux) %(include_extra)"
......
......@@ -28,5 +28,8 @@
#define TARGET_DEFAULT MASK_ALTIVEC
#endif
#undef ASM_DEFAULT_EXTRA
#define ASM_DEFAULT_EXTRA " %{!mvsx:%{!maltivec:%{!mno-altivec:-maltivec}}}"
#undef SUBSUBTARGET_OVERRIDE_OPTIONS
#define SUBSUBTARGET_OVERRIDE_OPTIONS rs6000_altivec_abi = 1
......@@ -8099,20 +8099,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
funexp = XEXP (DECL_RTL (function), 0);
funexp = gen_rtx_MEM (FUNCTION_MODE, funexp);
#if TARGET_MACHO
if (MACHOPIC_INDIRECT)
funexp = machopic_indirect_call_target (funexp);
#endif
/* gen_sibcall expects reload to convert scratch pseudo to LR so we must
generate sibcall RTL explicitly. */
insn = emit_call_insn (
gen_rtx_PARALLEL (VOIDmode,
gen_rtvec (3,
gen_rtx_CALL (VOIDmode,
funexp, const0_rtx),
gen_rtx_USE (VOIDmode, const0_rtx),
simple_return_rtx)));
insn = emit_call_insn (gen_sibcall (funexp, const0_rtx, const0_rtx));
SIBLING_CALL_P (insn) = 1;
emit_barrier ();
......
......@@ -157,6 +157,7 @@ ASM_OPT_ANY
#define CPP_DEFAULT_SPEC ""
#define ASM_DEFAULT_SPEC ""
#define ASM_DEFAULT_EXTRA ""
/* This macro defines names of additional specifications to put in the specs
that can be used in various specifications like CC1_SPEC. Its definition
......@@ -174,7 +175,7 @@ ASM_OPT_ANY
{ "cpp_default", CPP_DEFAULT_SPEC }, \
{ "asm_cpu", ASM_CPU_SPEC }, \
{ "asm_cpu_native", ASM_CPU_NATIVE_SPEC }, \
{ "asm_default", ASM_DEFAULT_SPEC }, \
{ "asm_default", ASM_DEFAULT_SPEC ASM_DEFAULT_EXTRA }, \
{ "cc1_cpu", CC1_CPU_SPEC }, \
SUBTARGET_EXTRA_SPECS
......
......@@ -254,9 +254,6 @@
%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } } \
%{mcpu=e6500: -D__PPC_CPU_E6500__}"