On Fri, Sep 6, 2013 at 12:20 PM, Joern Rennecke wrote:
> We found that
>
> std::basic_string<char, std::char_traits<char>, std::allocator<char>
> ::copy(char*, unsigned long, unsigned long) const
>
> got miscompiled for ARC because reorg thought that all call-clobbered
> registers were dead after a conditional call.

Hmm, interesting to have a target with both predication and delay slots...

> I can't reproduce the test case with current trunk + ARC port, but I reckon
> this is just due to the fickleness of the register allocator.  Chances are,
> every other version, some other obscure function is miscompiled without
> this patch.
>
> bootstrapped on i686-pc-linux-gnu.

That's not a very good test, i686 doesn't use this code ;-)

> OK to apply?

Yes, the patch is OK.

However, I wouldn't be surprised if using COND_EXECs together with
delay slots has more hidden problems. Browsing through resource.c, the
"if (jump_insn)" block at lines 1095:1119 jumps out as another place
you should probably look into.

Ciao!
Steven

Reply via email to