From 72ec6882af0cdd2dbb64e0019806cabdd9302b58 Mon Sep 17 00:00:00 2001 From: hjl Date: Thu, 18 Aug 2011 14:52:06 +0000 Subject: Allow HOST_WIDE_INT for option variable. 2011-08-18 H.J. Lu Igor Zamyatin * hwint.h (HOST_WIDE_INT_1): New. * opt-functions.awk (switch_bit_fields): Initialize the host_wide_int field. (host_wide_int_var_name): New. (var_type_struct): Check and return HOST_WIDE_INT. * opt-read.awk: Handle HOST_WIDE_INT for "Variable". * optc-save-gen.awk: Support HOST_WIDE_INT on var_target_other. * opth-gen.awk: Use HOST_WIDE_INT_1 on HOST_WIDE_INT. Properly check masks for HOST_WIDE_INT. * opts-common.c (set_option): Support HOST_WIDE_INT flag_var. (option_enabled): Likewise. (get_option_state): Likewise. * opts.h (cl_option): Add cl_host_wide_int. Change var_value to HOST_WIDE_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177864 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/optc-save-gen.awk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/optc-save-gen.awk') diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk index 4efc11598bf..654d8692602 100644 --- a/gcc/optc-save-gen.awk +++ b/gcc/optc-save-gen.awk @@ -363,10 +363,16 @@ print "{"; print " fputs (\"\\n\", file);"; for (i = 0; i < n_target_other; i++) { print " if (ptr->x_" var_target_other[i] ")"; - print " fprintf (file, \"%*s%s (%#lx)\\n\","; + if (host_wide_int[var_target_other[i]] == "yes") + print " fprintf (file, \"%*s%s (%#\" HOST_WIDE_INT_PRINT \"x)\\n\","; + else + print " fprintf (file, \"%*s%s (%#x)\\n\","; print " indent, \"\","; print " \"" var_target_other[i] "\","; - print " (unsigned long)ptr->x_" var_target_other[i] ");"; + if (host_wide_int[var_target_other[i]] == "yes") + print " ptr->x_" var_target_other[i] ");"; + else + print " (unsigned long)ptr->x_" var_target_other[i] ");"; print ""; } -- cgit v1.2.1