diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-06-27 20:23:08 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-06-27 20:23:08 -0400 |
commit | 8bca29225cba386c6ed05c39b251ace8cc24429f (patch) | |
tree | b893c21f797d6bcf908ac55f6e70cc8ca5fc3ad1 | |
parent | 3aceff0d36536f9136f1b3a957e6f7da1d19b41a (diff) | |
download | gcc-8bca29225cba386c6ed05c39b251ace8cc24429f.zip gcc-8bca29225cba386c6ed05c39b251ace8cc24429f.tar.gz gcc-8bca29225cba386c6ed05c39b251ace8cc24429f.tar.bz2 |
(split_di): New; from i386.c.
From-SVN: r12340
-rw-r--r-- | gcc/config/ns32k/ns32k.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c index 045800b..0e07662 100644 --- a/gcc/config/ns32k/ns32k.c +++ b/gcc/config/ns32k/ns32k.c @@ -1,5 +1,5 @@ /* Subroutines for assembler code output on the NS32000. - Copyright (C) 1988, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1988, 1994, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. @@ -227,6 +227,39 @@ reg_or_mem_operand (op, mode) || GET_CODE (op) == MEM)); } +/* Split one or more DImode RTL references into pairs of SImode + references. The RTL can be REG, offsettable MEM, integer constant, or + CONST_DOUBLE. "operands" is a pointer to an array of DImode RTL to + split and "num" is its length. lo_half and hi_half are output arrays + that parallel "operands". */ + +void +split_di (operands, num, lo_half, hi_half) + rtx operands[]; + int num; + rtx lo_half[], hi_half[]; +{ + while (num--) + { + if (GET_CODE (operands[num]) == REG) + { + lo_half[num] = gen_rtx (REG, SImode, REGNO (operands[num])); + hi_half[num] = gen_rtx (REG, SImode, REGNO (operands[num]) + 1); + } + else if (CONSTANT_P (operands[num])) + { + split_double (operands[num], &lo_half[num], &hi_half[num]); + } + else if (offsettable_memref_p (operands[num])) + { + lo_half[num] = operands[num]; + hi_half[num] = adj_offsettable_operand (operands[num], 4); + } + else + abort(); + } +} + /* Return the best assembler insn template for moving operands[1] into operands[0] as a fullword. */ |