From 2b564b9c4528d947ffbe4cd0d9dea44c1f6b2328 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 12 Sep 2015 13:51:40 +0000 Subject: [PATCH] pa.c (pa_output_move_double): Enhance to handle HIGH CONSTANT_P operands. * config/pa/pa.c (pa_output_move_double): Enhance to handle HIGH CONSTANT_P operands. From-SVN: r227706 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.c | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 13804485d42..c49902d0e59 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-09-12 John David Anglin + + * config/pa/pa.c (pa_output_move_double): Enhance to handle HIGH + CONSTANT_P operands. + 2015-09-11 David S. Miller * config/sparc/constraints.md: Make "U" constraint a real register diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 7cf540c7785..e16e58d14ef 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -2464,6 +2464,7 @@ pa_output_move_double (rtx *operands) enum { REGOP, OFFSOP, MEMOP, CNSTOP, RNDOP } optype0, optype1; rtx latehalf[2]; rtx addreg0 = 0, addreg1 = 0; + int highonly = 0; /* First classify both operands. */ @@ -2674,7 +2675,14 @@ pa_output_move_double (rtx *operands) else if (optype1 == OFFSOP) latehalf[1] = adjust_address_nv (operands[1], SImode, 4); else if (optype1 == CNSTOP) - split_double (operands[1], &operands[1], &latehalf[1]); + { + if (GET_CODE (operands[1]) == HIGH) + { + operands[1] = XEXP (operands[1], 0); + highonly = 1; + } + split_double (operands[1], &operands[1], &latehalf[1]); + } else latehalf[1] = operands[1]; @@ -2727,8 +2735,11 @@ pa_output_move_double (rtx *operands) if (addreg1) output_asm_insn ("ldo 4(%0),%0", &addreg1); - /* Do that word. */ - output_asm_insn (pa_singlemove_string (latehalf), latehalf); + /* Do high-numbered word. */ + if (highonly) + output_asm_insn ("ldil L'%1,%0", latehalf); + else + output_asm_insn (pa_singlemove_string (latehalf), latehalf); /* Undo the adds we just did. */ if (addreg0) -- 2.30.2