This is the mail archive of the gcc@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: AltiVec support toasted in HEAD


> Assuming this trivial implementation is about what you had in mind and
> correct:
> 
>   if (!CONST0_RTX (mode))

this is wrong, what you want is:

	op != CONST0_RTX(mode)

however this might be better.  patch _fatal_insn() with the patch below.
'f' will have the const_vector rtx.  put a breakpoint on:

	f = SET_SRC(f);
	debug_rtx (f);		<-- here

print the 'f' pointer to get the rtl address.  then put a conditional 
breakpoint on line 961 of ggc-page.c to find out when the rtl was created:

(gdb) p f
$6 = 0xa9f8c0
(gdb) b ggc-page.c:961 if result == $6
Breakpoint 6 at blah blah blah.

run the program again, and it will stop in the allocator.  go up the
stack, and by golly, you should go back to gen_const_vector_0(), or
someone is creating a bad zero vector.

if it does goes back to gen_const_vector_0, then wait till you hit the
breakpoint we previously put in  _fatal_insn:

        f = SET_SRC(f);
        debug_rtx (f);          <-- here

there do:

(gdb) p f
$9 = 0xa9f8c0
(gdb) p const_tiny_rtx[0][V8HImode]
$10 = 0xa9f8c0

if they're both the same, it means my therory is wrong and you need to
step through insn-recog.c to find out why the insn is not matching (because
it's not because of a bad CONST_VECTOR).

if they're different values, then someone did an invalid tranformation of the
zero vector constant.  at this point we could either examine all calls to
gen_rtx_CONST_VECTOR to find out who's creating bad vectors.  if that doesn't
work, then someone is changing the rtl from under us and we'll have to put
watch points to find out who is changing the set operation operation.

....but let's burn that bridge when we get there.

try what i suggested and let me know.

aldy

p.s. are you *sure* you can't start stripping stuff from your source program
until you can come up with a small testcase?

Index: rtl-error.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/rtl-error.c,v
retrieving revision 1.3
diff -c -p -r1.3 rtl-error.c
*** rtl-error.c 2002/05/19 22:52:06     1.3
--- rtl-error.c 2002/07/06 17:13:09
*************** _fatal_insn (msgid, insn, file, line, fu
*** 125,130 ****
--- 125,136 ----
    errorcount--;
  
    debug_rtx (insn);
+   {
+     rtx f = PATTERN (insn);
+     debug_rtx(f);
+     f = SET_SRC (f);
+     debug_rtx(f);
+   }
    fancy_abort (file, line, function);
  }


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