diff options
author | Matt Kraai <kraai@alumni.cmu.edu> | 2003-05-19 00:31:10 +0000 |
---|---|---|
committer | Matt Kraai <kraai@gcc.gnu.org> | 2003-05-19 00:31:10 +0000 |
commit | 307b599c91ee93049fd69228b9d59b6ea2e030ef (patch) | |
tree | f366b57eefbdbdfedd85abe04f495ca30220e2a2 | |
parent | 48ef54fb15e8bdddcd9eca447577cceeac3a5b3a (diff) | |
download | gcc-307b599c91ee93049fd69228b9d59b6ea2e030ef.zip gcc-307b599c91ee93049fd69228b9d59b6ea2e030ef.tar.gz gcc-307b599c91ee93049fd69228b9d59b6ea2e030ef.tar.bz2 |
flags.h (g_switch_value): Change to an unsigned HOST_WIDE_INT.
* flags.h (g_switch_value): Change to an unsigned
HOST_WIDE_INT.
* toplev.c (g_switch_value): Likewise.
* config/alpha/alpha.c (small_symbolic_operand): Remove
g_switch_value cast.
(alpha_in_small_data_p): Cast size to an unsigned
HOST_WIDE_INT.
* config/frv/frv.c (frv_in_small_data_p): Cast size to an
unsigned HOST_WIDE_INT.
* config/frv/frv.h (g_switch_value, g_switch_set): Remove.
(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Declare g_switch_set.
* config/m32r/m32r.c (m32r_in_small_data_p): Cast size to an
unsigned HOST_WIDE_INT.
(m32r_asm_file_start): Use HOST_WIDE_INT_PRINT_UNSIGNED.
* config/m32r/m32r.h (g_switch_value, g_switch_set): Remove.
(ASM_OUTPUT_ALIGNED_COMMON): Declare g_switch_value.
* config/rs6000/rs6000.c (rs6000_file_start): Use
HOST_WIDE_INT_PRINT_UNSIGNED.
(small_data_operand): Cast summand to unsigned HOST_WIDE_INT.
(rs6000_elf_in_small_data_p): Cast size to unsigned
HOST_WIDE_INT.
* config/rs6000/sysv4.h (g_switch_value, g_switch_set):
Remove.
(SUBTARGET_OVERRIDE_OPTIONS): Declare g_switch_value and
g_switch_set.
(ASM_OUTPUT_ALIGNED_LOCAL): Declare g_switch_value and remove
g_switch_value cast.
From-SVN: r66945
-rw-r--r-- | gcc/ChangeLog | 34 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 4 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 2 | ||||
-rw-r--r-- | gcc/config/frv/frv.h | 5 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.c | 5 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.h | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/sysv4.h | 12 | ||||
-rw-r--r-- | gcc/flags.h | 2 | ||||
-rw-r--r-- | gcc/toplev.c | 2 |
10 files changed, 56 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96f2290..41f8887 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,37 @@ +2003-05-18 Matt Kraai <kraai@alumni.cmu.edu> + + * flags.h (g_switch_value): Change to an unsigned + HOST_WIDE_INT. + * toplev.c (g_switch_value): Likewise. + + * config/alpha/alpha.c (small_symbolic_operand): Remove + g_switch_value cast. + (alpha_in_small_data_p): Cast size to an unsigned + HOST_WIDE_INT. + + * config/frv/frv.c (frv_in_small_data_p): Cast size to an + unsigned HOST_WIDE_INT. + * config/frv/frv.h (g_switch_value, g_switch_set): Remove. + (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Declare g_switch_set. + + * config/m32r/m32r.c (m32r_in_small_data_p): Cast size to an + unsigned HOST_WIDE_INT. + (m32r_asm_file_start): Use HOST_WIDE_INT_PRINT_UNSIGNED. + * config/m32r/m32r.h (g_switch_value, g_switch_set): Remove. + (ASM_OUTPUT_ALIGNED_COMMON): Declare g_switch_value. + + * config/rs6000/rs6000.c (rs6000_file_start): Use + HOST_WIDE_INT_PRINT_UNSIGNED. + (small_data_operand): Cast summand to unsigned HOST_WIDE_INT. + (rs6000_elf_in_small_data_p): Cast size to unsigned + HOST_WIDE_INT. + * config/rs6000/sysv4.h (g_switch_value, g_switch_set): + Remove. + (SUBTARGET_OVERRIDE_OPTIONS): Declare g_switch_value and + g_switch_set. + (ASM_OUTPUT_ALIGNED_LOCAL): Declare g_switch_value and remove + g_switch_value cast. + 2003-05-18 Roger Sayle <roger@eyesopen.com> Zack Weinberg <zack@codesourcery.com> diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 2764285..76f399e 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1166,7 +1166,7 @@ small_symbolic_operand (op, mode) /* ??? There's no encode_section_info equivalent for the rtl constant pool, so SYMBOL_FLAG_SMALL never gets set. */ if (CONSTANT_POOL_ADDRESS_P (op)) - return GET_MODE_SIZE (get_pool_mode (op)) <= (unsigned) g_switch_value; + return GET_MODE_SIZE (get_pool_mode (op)) <= g_switch_value; return (SYMBOL_REF_LOCAL_P (op) && SYMBOL_REF_SMALL_P (op) @@ -1891,7 +1891,7 @@ alpha_in_small_data_p (exp) /* If this is an incomplete type with size 0, then we can't put it in sdata because it might be too big when completed. */ - if (size > 0 && size <= g_switch_value) + if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value) return true; } diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 822c19a..c2a8ef9 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -9714,7 +9714,7 @@ frv_in_small_data_p (decl) return false; size = int_size_in_bytes (TREE_TYPE (decl)); - if (size > 0 && size <= g_switch_value) + if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value) return true; /* If we already know which section the decl should be in, see if diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index c93ad26..f7d46c0 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -554,9 +554,6 @@ extern int target_flags; #define SDATA_DEFAULT_SIZE 8 #endif -extern int g_switch_value; /* value of the -G xx switch */ -extern int g_switch_set; /* whether -G xx was passed. */ - /* Storage Layout */ @@ -2783,6 +2780,8 @@ extern int size_directive_output; #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \ do { \ + extern unsigned HOST_WIDE_INT g_switch_value; \ + \ if ((SIZE) > 0 && (SIZE) <= g_switch_value) \ sbss_section (); \ else \ diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index c8f0c72..a4d3c12 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -433,7 +433,7 @@ m32r_in_small_data_p (decl) { int size = int_size_in_bytes (TREE_TYPE (decl)); - if (size > 0 && size <= g_switch_value) + if (size > 0 && (unsigned HOST_WIDE_INT) size <= g_switch_value) return true; } } @@ -2208,7 +2208,8 @@ m32r_asm_file_start (file) FILE * file; { if (flag_verbose_asm) - fprintf (file, "%s M32R/D special options: -G %d\n", + fprintf (file, + "%s M32R/D special options: -G " HOST_WIDE_INT_PRINT_UNSIGNED "\n", ASM_COMMENT_START, g_switch_value); } diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index ec46ff5..ab7d5fc 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -350,9 +350,6 @@ extern enum m32r_model m32r_model; #define SDATA_DEFAULT_SIZE 8 #endif -extern int g_switch_value; /* value of the -G xx switch */ -extern int g_switch_set; /* whether -G xx was passed. */ - enum m32r_sdata { M32R_SDATA_NONE, M32R_SDATA_SDATA, M32R_SDATA_USE }; extern enum m32r_sdata m32r_sdata; @@ -1690,6 +1687,8 @@ extern char m32r_punct_chars[256]; #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ do \ { \ + extern unsigned HOST_WIDE_INT g_switch_value; \ + \ if (! TARGET_SDATA_NONE \ && (SIZE) > 0 && (SIZE) <= g_switch_value) \ fprintf ((FILE), "%s", SCOMMON_ASM_OP); \ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index dc25005..770df4f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -950,7 +950,8 @@ rs6000_file_start (file, default_cpu) if (rs6000_sdata && g_switch_value) { - fprintf (file, "%s -G %d", start, g_switch_value); + fprintf (file, "%s -G " HOST_WIDE_INT_PRINT_UNSIGNED, start, + g_switch_value); start = ""; } #endif @@ -2254,7 +2255,7 @@ small_data_operand (op, mode) /* We have to be careful here, because it is the referenced address that must be 32k from _SDA_BASE_, not just the symbol. */ summand = INTVAL (XEXP (sum, 1)); - if (summand < 0 || summand > g_switch_value) + if (summand < 0 || (unsigned HOST_WIDE_INT) summand > g_switch_value) return 0; sym_ref = XEXP (sum, 0); @@ -13452,7 +13453,7 @@ rs6000_elf_in_small_data_p (decl) HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl)); if (size > 0 - && size <= g_switch_value + && (unsigned HOST_WIDE_INT) size <= g_switch_value /* If it's not public, and we're not going to reference it there, there's no need to put it in the small data section. */ && (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl))) diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 4ccc71d..d266c28 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -89,11 +89,6 @@ extern const char *rs6000_tls_size_string; /* For -mtls-size= */ { "tls-size=", &rs6000_tls_size_string, \ N_("Specify bit size of immediate TLS offsets"), 0 } -/* Max # of bytes for variables to automatically be put into the .sdata - or .sdata2 sections. */ -extern int g_switch_value; /* Value of the -G xx switch. */ -extern int g_switch_set; /* Whether -G xx was passed. */ - #define SDATA_DEFAULT_SIZE 8 /* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be just @@ -171,6 +166,9 @@ extern int g_switch_set; /* Whether -G xx was passed. */ #define SUBTARGET_OVERRIDE_OPTIONS \ do { \ + extern unsigned HOST_WIDE_INT g_switch_value; \ + extern int g_switch_set; \ + \ if (!g_switch_set) \ g_switch_value = SDATA_DEFAULT_SIZE; \ \ @@ -665,8 +663,10 @@ extern int rs6000_pic_labelno; #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ do { \ + extern unsigned HOST_WIDE_INT g_switch_value; \ + \ if (rs6000_sdata != SDATA_NONE && (SIZE) > 0 \ - && (SIZE) <= (unsigned HOST_WIDE_INT)g_switch_value) \ + && (SIZE) <= g_switch_value) \ { \ sbss_section (); \ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \ diff --git a/gcc/flags.h b/gcc/flags.h index c58b5e6..4050517 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -586,7 +586,7 @@ extern int frame_pointer_needed; extern int flag_trapv; /* Value of the -G xx switch, and whether it was passed or not. */ -extern int g_switch_value; +extern unsigned HOST_WIDE_INT g_switch_value; extern int g_switch_set; /* Values of the -falign-* flags: how much to align labels in code. diff --git a/gcc/toplev.c b/gcc/toplev.c index 32e08a4..7cfb29e 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -329,7 +329,7 @@ enum graph_dump_types graph_dump_format; char *asm_file_name; /* Value of the -G xx switch, and whether it was passed or not. */ -int g_switch_value; +unsigned HOST_WIDE_INT g_switch_value; int g_switch_set; /* Type(s) of debugging information we are producing (if any). |