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
This commit is contained in:
Matt Kraai 2003-05-19 00:31:10 +00:00 committed by Matt Kraai
parent 48ef54fb15
commit 307b599c91
10 changed files with 56 additions and 22 deletions

View File

@ -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>

View File

@ -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;
}

View File

@ -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

View File

@ -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 \

View File

@ -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);
}

View File

@ -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); \

View File

@ -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)))

View File

@ -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)); \

View File

@ -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.

View File

@ -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).