aboutsummaryrefslogtreecommitdiff
path: root/gcc/machmode.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r--gcc/machmode.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 3b71b9d..aa931f5 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -520,7 +520,16 @@ extern const unsigned char mode_complex[NUM_MACHINE_MODES];
extern machine_mode mode_for_size (unsigned int, enum mode_class, int);
-/* Similar, but find the smallest mode for a given width. */
+/* Return the machine mode to use for a MODE_FLOAT of SIZE bits, if one
+ exists. */
+
+inline opt_scalar_float_mode
+float_mode_for_size (unsigned int size)
+{
+ return dyn_cast <scalar_float_mode> (mode_for_size (size, MODE_FLOAT, 0));
+}
+
+/* Similar to mode_for_size, but find the smallest mode for a given width. */
extern machine_mode smallest_mode_for_size (unsigned int,
enum mode_class);