Hi,
After the discussion we had on the previous thread 'splitting add
instructions', I added support for TARGET_FLAGS_RENUM to my port along
with *_flags rules similar to how it is done in rx backend (gcc 4.6.1).
Then I decided to create a very simple C program:
unsigned long foo(unsigned int a, unsigned int b)
{
if(a < b)
return a << b;
else
return a >> b;
}
When I compile it (with my backend) it I either gets into an infinite
loop or segfaults in kill_value_one_regno (unsigned int regno, struct
value_data *vd), regcprop.c, called from cprop_hardreg pass.
The infinite cycle, or segfault, is in the cycle (regcprop.c:138):
for (i = vd->e[regno].oldest_regno;
vd->e[i].next_regno != regno;
i = vd->e[i].next_regno)
continue;
That i goes into the loop 0, 7, -1, 0... where regno passed into the
function is 14, my FIRST_PSEUDO_REGISTER, and CC_REGNUM is 13.
When it segfaults the loop goes 0, 7, 15127832392 (some obscene number).
Then I decided to turn on checking. So I configured gcc with
--enable-checking=all and with this I get:
internal compiler error: in df_live_verify_transfer_functions, at
df-problems.c:1816
I followed to see what happened to rx. So I compiled the rx backend and
used the same example, also with checking enabled and I get the same
assertion. So I assume this is GCC issue and reported it. Bug 49801
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49801).
In the meantime I am trying to pinpoint the exact problem. If someone
has any idea and know of a workaround, can you please let me know?
Cheers,
--
PMatos