aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2005-01-15 20:04:57 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2005-01-15 20:04:57 +0000
commit83c32f2e4802d9f53f9a98427c6e568898056e45 (patch)
tree9fb312d9df2c91cafebc7fe64cbd54bb431f34b7
parent2d5ca9a017f4ca590249b3bc987fc7c1803b00ee (diff)
downloadgcc-83c32f2e4802d9f53f9a98427c6e568898056e45.zip
gcc-83c32f2e4802d9f53f9a98427c6e568898056e45.tar.gz
gcc-83c32f2e4802d9f53f9a98427c6e568898056e45.tar.bz2
re PR target/19336 (HPPA64 does not support TImode)
PR target/19336 * pa.c (pa_scalar_mode_supported_p): New function. (TARGET_SCALAR_MODE_SUPPORTED_P): Define. * pa.h (MIN_UNITS_PER_WORD): Add comment. From-SVN: r93703
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c48
-rw-r--r--gcc/config/pa/pa.h9
3 files changed, 62 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 81cfd92..ab3a41e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2005-01-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ PR target/19336
+ * pa.c (pa_scalar_mode_supported_p): New function.
+ (TARGET_SCALAR_MODE_SUPPORTED_P): Define.
+ * pa.h (MIN_UNITS_PER_WORD): Add comment.
+
* pa-protos.h (prefetch_operand): Delete.
(prefetch_cc_operand, prefetch_nocc_operand): New declations.
* pa.c (prefetch_operand): Delete.
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 7d0dff5..c470165 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -123,6 +123,7 @@ static void pa_asm_out_destructor (rtx, int);
static void pa_init_builtins (void);
static rtx hppa_builtin_saveregs (void);
static tree hppa_gimplify_va_arg_expr (tree, tree, tree *, tree *);
+static bool pa_scalar_mode_supported_p (enum machine_mode);
static void copy_fp_args (rtx) ATTRIBUTE_UNUSED;
static int length_fp_args (rtx) ATTRIBUTE_UNUSED;
static struct deferred_plabel *get_plabel (const char *)
@@ -292,6 +293,9 @@ static size_t n_deferred_plabels = 0;
#undef TARGET_GIMPLIFY_VA_ARG_EXPR
#define TARGET_GIMPLIFY_VA_ARG_EXPR hppa_gimplify_va_arg_expr
+#undef TARGET_SCALAR_MODE_SUPPORTED_P
+#define TARGET_SCALAR_MODE_SUPPORTED_P pa_scalar_mode_supported_p
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Parse the -mfixed-range= option string. */
@@ -6219,6 +6223,50 @@ hppa_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
}
}
+/* True if MODE is valid for the target. By "valid", we mean able to
+ be manipulated in non-trivial ways. In particular, this means all
+ the arithmetic is supported.
+
+ Currently, TImode is not valid as the HP 64-bit runtime documentation
+ doesn't document the alignment and calling conventions for this type.
+ Thus, we return false when PRECISION is 2 * BITS_PER_WORD and
+ 2 * BITS_PER_WORD isn't equal LONG_LONG_TYPE_SIZE. */
+
+static bool
+pa_scalar_mode_supported_p (enum machine_mode mode)
+{
+ int precision = GET_MODE_PRECISION (mode);
+
+ switch (GET_MODE_CLASS (mode))
+ {
+ case MODE_PARTIAL_INT:
+ case MODE_INT:
+ if (precision == CHAR_TYPE_SIZE)
+ return true;
+ if (precision == SHORT_TYPE_SIZE)
+ return true;
+ if (precision == INT_TYPE_SIZE)
+ return true;
+ if (precision == LONG_TYPE_SIZE)
+ return true;
+ if (precision == LONG_LONG_TYPE_SIZE)
+ return true;
+ return false;
+
+ case MODE_FLOAT:
+ if (precision == FLOAT_TYPE_SIZE)
+ return true;
+ if (precision == DOUBLE_TYPE_SIZE)
+ return true;
+ if (precision == LONG_DOUBLE_TYPE_SIZE)
+ return true;
+ return false;
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
/* This routine handles all the normal conditional branch sequences we
might need to generate. It handles compare immediate vs compare
register, nullification of delay slots, varying length branches,
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 61a3325..48e459a 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -484,6 +484,15 @@ typedef struct machine_function GTY(())
/* Width of a word, in units (bytes). */
#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)
+
+/* Minimum number of units in a word. If this is undefined, the default
+ is UNITS_PER_WORD. Otherwise, it is the constant value that is the
+ smallest value that UNITS_PER_WORD can have at run-time.
+
+ FIXME: This needs to be 4 when TARGET_64BIT is true to suppress the
+ building of various TImode routines in libgcc. The HP runtime
+ specification doesn't provide the alignment requirements and calling
+ conventions for TImode variables. */
#define MIN_UNITS_PER_WORD 4
/* Allocation boundary (in *bits*) for storing arguments in argument list. */