Commit b85aed95 by Michael Meissner Committed by Michael Meissner

Fix signed/unsigned warning; Make some mask types HOST_WIDE_INT; Add more…

Fix signed/unsigned warning; Make some mask types HOST_WIDE_INT; Add more debugging with -mdebug=reg

From-SVN: r192310
parent fe4e4e3b
2012-10-10 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (altivec_expand_dst_builtin): Fix signed
vs. unsigned warnings by using enum type for function code.
(paired_expand_builtin): Likewise.
(spe_expand_builtin): Likewise.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Change
builtin mask, target flags masks type to HOST_WIDE_INT in
preparation for growing the number of ISA switches from 31 to 63.
* config/rs6000/rs6000.opt (rs6000_builtin_mask): Make mask type
HOST_WIDE_INT.
* config/rs6000/rs6000.c (struct builtin_description): Make
builtin mask field HOST_WIDE_INT. Make target flags field
HOST_WIDE_INT in preparation for growing the # of ISA switches.
(struct rs6000_builtin_info_type): Likewise.
(struct rs6000_ptt): Likewise.
(rs6000_builtin_mask_calculate): Likewise.
(rs6000_invalid_builtin): Likewise.
(rs6000_builtin_decl): Likewise.
(rs6000_common_init_builtins): Likewise.
(rs6000_darwin_file_start): Likewise.
(rs6000_final_prescan_insn): Likewise.
(rs6000_inner_target_options): Likewise.
(build_target_option_node): Likewise.
(rs6000_function_specific_print): Likewise.
(DEBUG_FMT_W): New format for printing HOST_WIDE_INT in hex.
* config/rs6000/rs6000-protos.h (rs6000_builtin_mask_calculate):
Make target flags, builtin masks arguments/return values
HOST_WIDE_INT in preparation for growing the number of ISA from 31
to 63.
(rs6000_target_modify_macros): Likewise.
(rs6000_target_modify_macros_ptr): Likewise.
* config/rs6000/rs6000.c (DEBUG_FMT_ID): Move "-32s" to a separate
define and change DEBUG_FMT_<x> to use it.
(DEBUG_FMT_D): Likewise.
(DEBUG_FMT_S): Likewise.
(DEBUG_FMT_X): Delete, no longer used.
(DEBUG_FMT_W): Likewise.
(DEBUG_FMT_WX): New debug format for printing options in a
friendly fashion.
(rs6000_debug_reg_global): If -mdebug=reg, print all of the
options in target_flags and target_flags_explicit. Print the
default options for -mcpu=<xxx>, -mtune=<xxx>, and the default
options. Adjust printing out the builtin options.
(rs6000_option_override_internal): Change printing the builtin
options to use rs6000_print_builtin_options.
(rs6000_function_specific_print): Change to use
rs6000_print_isa_options to print ISA flags.
(rs6000_print_options_internal): New function for expanded
-mdebug=reg option printing to print both the ISA options, and the
builtins that are enabled.
(rs6000_print_isa_options): New function to print the ISA
options.
(rs6000_print_builtin_options): New function to print the builtin
functions enabled.
2012-10-10 Jakub Jelinek <jakub@redhat.com>
PR target/51109
......
......@@ -285,12 +285,15 @@ rs6000_define_or_undefine_macro (bool define_p, const char *name)
have both the target flags and the builtin flags as arguments. */
void
rs6000_target_modify_macros (bool define_p, int flags, unsigned bu_mask)
rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags,
HOST_WIDE_INT bu_mask)
{
if (TARGET_DEBUG_BUILTIN || TARGET_DEBUG_TARGET)
fprintf (stderr, "rs6000_target_modify_macros (%s, 0x%x, 0x%x)\n",
fprintf (stderr,
"rs6000_target_modify_macros (%s, " HOST_WIDE_INT_PRINT_HEX
", " HOST_WIDE_INT_PRINT_HEX ")\n",
(define_p) ? "define" : "undef",
(unsigned) flags, bu_mask);
flags, bu_mask);
/* target_flags based options. */
rs6000_define_or_undefine_macro (define_p, "_ARCH_PPC");
......
......@@ -176,7 +176,7 @@ extern void rs6000_call_indirect_aix (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 unsigned rs6000_builtin_mask_calculate (void);
extern HOST_WIDE_INT rs6000_builtin_mask_calculate (void);
/* Declare functions in rs6000-c.c */
......@@ -185,8 +185,9 @@ extern void rs6000_cpu_cpp_builtins (struct cpp_reader *);
#ifdef TREE_CODE
extern bool rs6000_pragma_target_parse (tree, tree);
#endif
extern void rs6000_target_modify_macros (bool, int, unsigned);
extern void (*rs6000_target_modify_macros_ptr) (bool, int, unsigned);
extern void rs6000_target_modify_macros (bool, HOST_WIDE_INT, HOST_WIDE_INT);
extern void (*rs6000_target_modify_macros_ptr) (bool, HOST_WIDE_INT,
HOST_WIDE_INT);
#if TARGET_MACHO
char *output_call (rtx, rtx *, int, int);
......
......@@ -80,7 +80,7 @@ unsigned int rs6000_recip_control
;; Mask of what builtin functions are allowed
TargetVariable
unsigned int rs6000_builtin_mask
HOST_WIDE_INT rs6000_builtin_mask
;; Debug flags
TargetVariable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment