aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelvin Nilsen <kelvin@gcc.gnu.org>2016-07-15 16:11:11 +0000
committerKelvin Nilsen <kelvin@gcc.gnu.org>2016-07-15 16:11:11 +0000
commit9807dd9cf475728f2c2e694726f7d80237aacc42 (patch)
tree149471598cd3f89b88fc1099d5729157f1de5499
parent5fa6bd0260679766322d2fa5c64ab4cb0ecc678f (diff)
more improvements
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ibm/rfc-2464-bounce2@238380 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/config/rs6000/rs6000-c.c10
-rw-r--r--gcc/config/rs6000/rs6000-protos.h1
-rw-r--r--gcc/config/rs6000/rs6000.c6
3 files changed, 12 insertions, 5 deletions
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index 930627683c4..552b44d9db2 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -5632,6 +5632,7 @@ assignment for unaligned loads and stores");
}
fprintf (stderr, "does the overloaded decl equal NULL_TREE? %d\n",
(rs6000_builtin_decls[desc->overloaded_code] == NULL_TREE));
+
/* so i'm seeing that desc->op1 is 45. types[0] is empty, and
* desc->op1 is type-compatible.
* But the other values are zero, which equals BTI_NOT_OPAQUE,
@@ -5660,16 +5661,15 @@ assignment for unaligned loads and stores");
#endif
if (rs6000_builtin_decls[desc->overloaded_code] == NULL_TREE)
{
- size_t uns_fncode = (size_t)fcode;
- const char *name = rs6000_builtin_info[uns_fncode].name;
- error ("Builtin function %s is not supported in this compiler configuration");
+ const char *name = rs6000_overloaded_builtin_name (fcode);
+ error ("Builtin function %s not supported in this compiler configuration",
+ name);
return error_mark_node;
}
bad:
{
- size_t uns_fncode = (size_t)fcode;
- const char *name = rs6000_builtin_info[uns_fncode].name;
+ const char *name = rs6000_overloaded_builtin_name (fcode);
error ("invalid parameter combination for AltiVec intrinsic %s", name);
return error_mark_node;
}
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h
index 6b4d17801d0..0b4467cf9d2 100644
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -214,6 +214,7 @@ extern void rs6000_sibcall_aix (rtx, rtx, rtx, rtx);
extern void rs6000_aix_asm_output_dwarf_table_ref (char *);
extern void get_ppc476_thunk_name (char name[32]);
extern bool rs6000_overloaded_builtin_p (enum rs6000_builtins);
+extern const char *rs6000_overloaded_builtin_name (enum rs6000_builtins);
extern HOST_WIDE_INT rs6000_builtin_mask_calculate (void);
extern void rs6000_asm_output_dwarf_pcrel (FILE *file, int size,
const char *label);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index aff550878fd..308b3f3e97d 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -13180,6 +13180,12 @@ rs6000_overloaded_builtin_p (enum rs6000_builtins fncode)
return (rs6000_builtin_info[(int)fncode].attr & RS6000_BTC_OVERLOADED) != 0;
}
+const char *
+rs6000_overloaded_builtin_name (enum rs6000_builtins fncode)
+{
+ return rs6000_builtin_info[(int)fncode].name;
+}
+
/* Expand an expression EXP that calls a builtin without arguments. */
static rtx
rs6000_expand_zeroop_builtin (enum insn_code icode, rtx target)