summaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-12 13:51:40 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-12 13:51:40 +0000
commit7738a18b7d9a4603c1b9f174629cbc5e99e24e29 (patch)
tree106bf29836a236a3dce12654d7cafb79e61a0f62 /gcc/config/pa
parentc60f0c1eb28e045fb5ad0cd05cfb6b7531af1062 (diff)
downloadgcc-7738a18b7d9a4603c1b9f174629cbc5e99e24e29.tar.gz
* 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
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa.c17
1 files changed, 14 insertions, 3 deletions
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)