diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-11-06 14:47:43 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-11-06 09:47:43 -0500 |
commit | 03f5402658f745ab297ed24216311dcefe4ca633 (patch) | |
tree | f972cb555703b7e43d818f9f647b442e9974ef40 /gcc/varasm.c | |
parent | bfd82dbfc72ead366d2aec6401d1e1057342d710 (diff) | |
download | gcc-03f5402658f745ab297ed24216311dcefe4ca633.zip gcc-03f5402658f745ab297ed24216311dcefe4ca633.tar.gz gcc-03f5402658f745ab297ed24216311dcefe4ca633.tar.bz2 |
rtl.h (mem_for_const_double): New declaration.
* rtl.h (mem_for_const_double): New declaration.
* varasm.c (mem_for_const_double): New function.
* config/convex/convex.md (movdf): Use it.
* config/m68k/hp320.h (LEGITIMATE_PIC_OPERAND_P): Likewise.
* config/m68k/linux.h, config/m68k/m68k.h: Likewise.
* config/m68k/m68kv4.h: Likewise.
From-SVN: r46808
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index ebdac3b..064a6ca 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3756,6 +3756,24 @@ record_constant_rtx (mode, x) return ptr; } +/* Given a constant rtx X, return a MEM for the location in memory at which + this constant has been placed. Return 0 if it not has been placed yet. */ + +rtx +mem_for_const_double (x) + rtx x; +{ + enum machine_mode mode = GET_MODE (x); + struct constant_descriptor *desc; + + for (desc = const_rtx_hash_table[const_hash_rtx (mode, x)]; desc; + desc = desc->next) + if (compare_constant_rtx (mode, x, desc)) + return desc->rtl; + + return 0; +} + /* Given a constant rtx X, make (or find) a memory constant for its value and return a MEM rtx to refer to it in memory. */ |