This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH COMMITTED: More lower-subreg.c patches


> 2007-02-03  Ian Lance Taylor  <iant@google.com>
> 
> 	* lower-subreg.c (simple_move_operand): New static function,
> 	broken out of simple_move.  Reject LABEL_REF, SYMBOL_REF, and HIGH
> 	operands.
> 	(simple_move): Call simple_move_operand.
> 	(find_decomposable_subregs): Add special handling of MEMs.
> 	(can_decompose_p): Rename from cannot_decompose_p.  Reverse
> 	meaning of return value.  If we see a hard register, test whether
> 	it can store a word_mode value.  Change all callers.

If your intention was to avoid symbolic constants, you missed some
cases:

(insn 27 24 28 2 /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/stl_tree.h:407 (set (reg/f:PSI 33)
        (const:PSI (plus:PSI (symbol_ref:PSI ("_ZN9__gnu_cxx20throw_allocator_base6_S_mapE") [flags 0x2] <var_decl 0x2aaaac385790 _S_map>)
                (const_int 1 [0x1])))) 172 {movpsi_op} (nil)
    (nil))

In file included from /greed/dj/m32c/gcc/gcc/libstdc++-v3/include/precompiled/extc++.h:65:
/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp: In function '(static initializers for /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp)':
/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp:130: error: unrecognizable insn:
(insn 67 24 68 2 /greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/bits/stl_tree.h:407 (set (reg:HI 48)
        (subreg:HI (const:PSI (plus:PSI (symbol_ref:PSI ("_ZN9__gnu_cxx20throw_allocator_base6_S_mapE") [flags 0x2] <var_decl 0x2aaaac32e790 _S_map>)
                    (const_int 1 [0x1]))) 0)) -1 (nil)
    (nil))
/greed/dj/m32c/gcc/m32c-elf/m32c-elf/m32cm/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp:130: internal compiler error: in extract_insn, at recog.c:2108

The PLUS case is probably not needed, but this patch gets me past the above:

Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 121639)
+++ lower-subreg.c	(working copy)
@@ -80,6 +80,8 @@ simple_move_operand (rtx x)
 
   if (GET_CODE (x) == LABEL_REF
       || GET_CODE (x) == SYMBOL_REF
+      || GET_CODE (x) == PLUS
+      || GET_CODE (x) == CONST
       || GET_CODE (x) == HIGH)
     return false;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]