diff options
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c index 7a07b7279c0..deaf22c24cf 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -531,6 +531,7 @@ copy_most_rtx (orig, may_share) } /* Create a new copy of an rtx. Only copy just one level. */ + rtx shallow_copy_rtx (orig) rtx orig; @@ -551,6 +552,23 @@ shallow_copy_rtx (orig) return copy; } + +/* Return the alignment of MODE. This will be bounded by 1 and + BIGGEST_ALIGNMENT. */ + +unsigned int +get_mode_alignment (mode) + enum machine_mode mode; +{ + unsigned int alignment = GET_MODE_UNIT_SIZE (mode); + + /* Extract the LSB of the size. */ + alignment = alignment & -alignment; + alignment *= BITS_PER_UNIT; + + alignment = MIN (BIGGEST_ALIGNMENT, MAX (1, alignment)); + return alignment; +} /* This is 1 until after the rtl generation pass. */ int rtx_equal_function_value_matters; |