summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000
diff options
context:
space:
mode:
authorkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-19 00:31:10 +0000
committerkraai <kraai@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-19 00:31:10 +0000
commit3be2f219ac7d91186508ecd1a8791842eefa1764 (patch)
treef366b57eefbdbdfedd85abe04f495ca30220e2a2 /gcc/config/rs6000
parenta1edcc36b5443b8aa3bb455cd6be36679c127a93 (diff)
downloadgcc-3be2f219ac7d91186508ecd1a8791842eefa1764.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r--gcc/config/rs6000/rs6000.c7
-rw-r--r--gcc/config/rs6000/sysv4.h12
2 files changed, 10 insertions, 9 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index dc25005679a..770df4f3d53 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 4ccc71da6b5..d266c283cca 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)); \