summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config/sparc/sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/config/sparc/sparc.c')
-rw-r--r--contrib/gcc/config/sparc/sparc.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c
index 692e46e..738264a 100644
--- a/contrib/gcc/config/sparc/sparc.c
+++ b/contrib/gcc/config/sparc/sparc.c
@@ -703,7 +703,7 @@ sparc_override_options (void)
error ("-mcmodel= is not supported on 32 bit systems");
}
- fpu = TARGET_FPU; /* save current -mfpu status */
+ fpu = target_flags & MASK_FPU; /* save current -mfpu status */
/* Set the default CPU. */
for (def = &cpu_default[0]; def->name; ++def)
@@ -7968,8 +7968,10 @@ sparc_vis_init_builtins (void)
Expand builtin functions for sparc intrinsics. */
static rtx
-sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
- enum machine_mode tmode, int ignore ATTRIBUTE_UNUSED)
+sparc_expand_builtin (tree exp, rtx target,
+ rtx subtarget ATTRIBUTE_UNUSED,
+ enum machine_mode tmode ATTRIBUTE_UNUSED,
+ int ignore ATTRIBUTE_UNUSED)
{
tree arglist;
tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
@@ -7978,14 +7980,13 @@ sparc_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
enum machine_mode mode[4];
int arg_count = 0;
- mode[arg_count] = tmode;
-
- if (target == 0
- || GET_MODE (target) != tmode
- || ! (*insn_data[icode].operand[0].predicate) (target, tmode))
- op[arg_count] = gen_reg_rtx (tmode);
+ mode[0] = insn_data[icode].operand[0].mode;
+ if (!target
+ || GET_MODE (target) != mode[0]
+ || ! (*insn_data[icode].operand[0].predicate) (target, mode[0]))
+ op[0] = gen_reg_rtx (mode[0]);
else
- op[arg_count] = target;
+ op[0] = target;
for (arglist = TREE_OPERAND (exp, 1); arglist;
arglist = TREE_CHAIN (arglist))
@@ -8101,11 +8102,11 @@ sparc_fold_builtin (tree fndecl, tree arglist, bool ignore)
{
tree arg0, arg1, arg2;
tree rtype = TREE_TYPE (TREE_TYPE (fndecl));
-
- if (ignore && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
+ if (ignore
+ && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
&& DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrdi_vis)
- return build_int_cst (rtype, 0);
+ return fold_convert (rtype, integer_zero_node);
switch (DECL_FUNCTION_CODE (fndecl))
{
@@ -8219,6 +8220,7 @@ sparc_fold_builtin (tree fndecl, tree arglist, bool ignore)
default:
break;
}
+
return NULL_TREE;
}
OpenPOWER on IntegriCloud