From 7738a18b7d9a4603c1b9f174629cbc5e99e24e29 Mon Sep 17 00:00:00 2001 From: danglin Date: Sat, 12 Sep 2015 13:51:40 +0000 Subject: [PATCH] * config/pa/pa.c (pa_output_move_double): Enhance to handle HIGH CONSTANT_P operands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227706 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 1380448..c49902d 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 7cf540c..e16e58d 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.7.4