aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2009-04-28 21:58:17 +0200
committerUros Bizjak <uros@gcc.gnu.org>2009-04-28 21:58:17 +0200
commit8224166ec8e3c5fba6fe73901edcfbc6d71ac63f (patch)
treefb29d8a17f6558ef00568d019fb2e882bcf73e4f /gcc/config
parentc5f0fe6738d62eb150cadb861917ead4c642d9a0 (diff)
downloadgcc-8224166ec8e3c5fba6fe73901edcfbc6d71ac63f.zip
gcc-8224166ec8e3c5fba6fe73901edcfbc6d71ac63f.tar.gz
gcc-8224166ec8e3c5fba6fe73901edcfbc6d71ac63f.tar.bz2
alpha.md (usegp): Cast the result of alpha_find_lo_sum_using_gp to enum attr_usegp.
* config/alpha/alpha.md (usegp): Cast the result of alpha_find_lo_sum_using_gp to enum attr_usegp. * config/alpha/alpha.c (override_options): Remove end-of-structure marker element from cpu_table. Use array size of cpu_table to handle -mcpu and -mtune options. (tls_symbolic_operand_type): Change 0 to TLS_MODEL_NONE. From-SVN: r146912
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.c14
-rw-r--r--gcc/config/alpha/alpha.md2
2 files changed, 8 insertions, 8 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 931d0ea..8a7c313 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -275,10 +275,10 @@ override_options (void)
{ "ev6", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX },
{ "21264", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX },
{ "ev67", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX },
- { "21264a", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX },
- { 0, 0, 0 }
+ { "21264a", PROCESSOR_EV6, MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX }
};
+ int const ct_size = ARRAY_SIZE (cpu_table);
int i;
/* Unicos/Mk doesn't have shared libraries. */
@@ -370,7 +370,7 @@ override_options (void)
if (alpha_cpu_string)
{
- for (i = 0; cpu_table [i].name; i++)
+ for (i = 0; i < ct_size; i++)
if (! strcmp (alpha_cpu_string, cpu_table [i].name))
{
alpha_tune = alpha_cpu = cpu_table [i].processor;
@@ -378,19 +378,19 @@ override_options (void)
target_flags |= cpu_table [i].flags;
break;
}
- if (! cpu_table [i].name)
+ if (i == ct_size)
error ("bad value %qs for -mcpu switch", alpha_cpu_string);
}
if (alpha_tune_string)
{
- for (i = 0; cpu_table [i].name; i++)
+ for (i = 0; i < ct_size; i++)
if (! strcmp (alpha_tune_string, cpu_table [i].name))
{
alpha_tune = cpu_table [i].processor;
break;
}
- if (! cpu_table [i].name)
+ if (i == ct_size)
error ("bad value %qs for -mcpu switch", alpha_tune_string);
}
@@ -709,7 +709,7 @@ tls_symbolic_operand_type (rtx symbol)
enum tls_model model;
if (GET_CODE (symbol) != SYMBOL_REF)
- return 0;
+ return TLS_MODEL_NONE;
model = SYMBOL_REF_TLS_MODEL (symbol);
/* Local-exec with a 64-bit size is the same code as initial-exec. */
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 486551a9..543ed53 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -169,7 +169,7 @@
(cond [(eq_attr "type" "ldsym,jsr")
(const_string "yes")
(eq_attr "type" "ild,fld,ist,fst")
- (symbol_ref "alpha_find_lo_sum_using_gp(insn)")
+ (symbol_ref "((enum attr_usegp) alpha_find_lo_sum_using_gp (insn))")
]
(const_string "no")))