From 33a44e1580ac6e4eeda74ddde429c74beea442d3 Mon Sep 17 00:00:00 2001 From: Aaron Sawdey Date: Sat, 24 Sep 2016 18:14:21 +0000 Subject: [PATCH] rs6000.c (expand_block_compare, [...]): Change TARGET_LITTLE_ENDIAN to !BYTES_BIG_ENDIAN. 2016-09-24 Aaron Sawdey * config/rs6000/rs6000.c (expand_block_compare, do_load_for_compare): Change TARGET_LITTLE_ENDIAN to !BYTES_BIG_ENDIAN. From-SVN: r240466 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2600e1409d4..ab5e5adfdd3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-09-24 Aaron Sawdey + + * config/rs6000/rs6000.c (expand_block_compare, do_load_for_compare): + Change TARGET_LITTLE_ENDIAN to !BYTES_BIG_ENDIAN. + 2016-09-42 David Edelsohn * configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7c8a82f2578..5d189fc991a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -18482,7 +18482,7 @@ do_load_for_compare (rtx reg, rtx mem, machine_mode mode) case HImode: { rtx src = mem; - if (TARGET_LITTLE_ENDIAN) + if (!BYTES_BIG_ENDIAN) { src = gen_reg_rtx (HImode); emit_insn (gen_bswaphi2 (src, mem)); @@ -18493,7 +18493,7 @@ do_load_for_compare (rtx reg, rtx mem, machine_mode mode) case SImode: { rtx src = mem; - if (TARGET_LITTLE_ENDIAN) + if (!BYTES_BIG_ENDIAN) { src = gen_reg_rtx (SImode); emit_insn (gen_bswapsi2 (src, mem)); @@ -18502,7 +18502,7 @@ do_load_for_compare (rtx reg, rtx mem, machine_mode mode) } break; case DImode: - if (TARGET_LITTLE_ENDIAN) + if (!BYTES_BIG_ENDIAN) emit_insn (gen_bswapdi2 (reg, mem)); else emit_insn (gen_movdi (reg, mem)); @@ -18521,7 +18521,7 @@ do_load_for_compare (rtx reg, rtx mem, machine_mode mode) case HImode: { rtx src = mem; - if (TARGET_LITTLE_ENDIAN) + if (!BYTES_BIG_ENDIAN) { src = gen_reg_rtx (HImode); emit_insn (gen_bswaphi2 (src, mem)); @@ -18530,7 +18530,7 @@ do_load_for_compare (rtx reg, rtx mem, machine_mode mode) break; } case SImode: - if (TARGET_LITTLE_ENDIAN) + if (!BYTES_BIG_ENDIAN) emit_insn (gen_bswapsi2 (reg, mem)); else emit_insn (gen_movsi (reg, mem)); @@ -18667,7 +18667,7 @@ expand_block_compare (rtx operands[]) /* If we have an LE target without ldbrx and word_mode is DImode, then we must avoid using word_mode. */ - int word_mode_ok = !(TARGET_LITTLE_ENDIAN && !TARGET_LDBRX + int word_mode_ok = !(!BYTES_BIG_ENDIAN && !TARGET_LDBRX && word_mode == DImode); /* Strategy phase. How many ops will this take and should we expand it? */ -- 2.30.2