diff options
author | Richard Henderson <rth@cygnus.com> | 1998-12-12 08:52:32 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1998-12-12 08:52:32 -0800 |
commit | f35cba2192c45759a2141ae8ec4f0f64ddd9bcb2 (patch) | |
tree | f9b7d30d2d42b0fe5a6eefd64cb8e1317b880ad6 /gcc | |
parent | 4d7614e9f1741e6d01c35ba1e40e22da4abe91cd (diff) | |
download | gcc-f35cba2192c45759a2141ae8ec4f0f64ddd9bcb2.zip gcc-f35cba2192c45759a2141ae8ec4f0f64ddd9bcb2.tar.gz gcc-f35cba2192c45759a2141ae8ec4f0f64ddd9bcb2.tar.bz2 |
alpha.c (alpha_expand_block_move): mode_for_size expects bits, not bytes.
* alpha.c (alpha_expand_block_move): mode_for_size expects
bits, not bytes. Infer extra alignment from addressof.
From-SVN: r24270
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3896ef..08d919c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Dec 12 16:49:24 1998 Richard Henderson <rth@cygnus.com> + + * alpha.c (alpha_expand_block_move): mode_for_size expects + bits, not bytes. Infer extra alignment from addressof. + 1998-12-11 Michael Meissner <meissner@cygnus.com> * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Put small data in the diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 56aadf6..452b6d8 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -1836,7 +1836,8 @@ alpha_expand_block_move (operands) { rtx bytes_rtx = operands[2]; rtx align_rtx = operands[3]; - HOST_WIDE_INT bytes = INTVAL (bytes_rtx); + HOST_WIDE_INT orig_bytes = INTVAL (bytes_rtx); + HOST_WIDE_INT bytes = orig_bytes; HOST_WIDE_INT src_align = INTVAL (align_rtx); HOST_WIDE_INT dst_align = src_align; rtx orig_src = operands[1]; @@ -1909,7 +1910,7 @@ alpha_expand_block_move (operands) enum machine_mode mode; tmp = XEXP (XEXP (orig_src, 0), 0); - mode = mode_for_size (bytes, MODE_INT, 1); + mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 1); if (mode != BLKmode && GET_MODE_SIZE (GET_MODE (tmp)) <= bytes) { @@ -2039,7 +2040,7 @@ alpha_expand_block_move (operands) enum machine_mode mode; tmp = XEXP (XEXP (orig_dst, 0), 0); - mode = mode_for_size (bytes, MODE_INT, 1); + mode = mode_for_size (orig_bytes * BITS_PER_UNIT, MODE_INT, 1); if (GET_MODE (tmp) == mode && nregs == 1) { emit_move_insn (tmp, data_regs[0]); @@ -2049,9 +2050,12 @@ alpha_expand_block_move (operands) /* ??? If nregs > 1, consider reconstructing the word in regs. */ /* ??? Optimize mode < dst_mode with strict_low_part. */ - /* No appropriate mode; fall back on memory. */ + + /* No appropriate mode; fall back on memory. We can speed things + up by recognizing extra alignment information. */ orig_dst = change_address (orig_dst, GET_MODE (orig_dst), copy_addr_to_reg (XEXP (orig_dst, 0))); + dst_align = GET_MODE_SIZE (GET_MODE (tmp)); } /* Write out the data in whatever chunks reading the source allowed. */ |