https://bugs.kde.org/show_bug.cgi?id=417187
Bug ID: 417187 Summary: [MIPS] Conditional branch problem since 'grail' changes Product: valgrind Version: 3.15 SVN Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: stefan.maksimo...@rt-rk.com Target Milestone: --- Created attachment 125689 --> https://bugs.kde.org/attachment.cgi?id=125689&action=edit enable_grail_mips.diff The problem we're having is present since the recent changes from the 'grail' branch have been applied to master. It can be reproduced on a simple program (consists just of the main function that has a return 42; statement). More specifically, it happens even before main is encountered (in the _dl_aux_init function). The attached debug output depicts inconsistent IR which causes the failure: t5 = CmpEQ32(t4,0x0:I32) ... PUT(136) = t5 The number 136 corresponds with the PC register. Valgrind tries to write the result of the compare operation into the PC register. The following is a different observation which may or may not have to do with the problem above: It has to do with conditional branches. Namely, upon hitting such a branch three instructions are analysed for each of those. The problem seems to be having a branch instruction as the last one of those three. Since branch instructions on MIPS have delay slots, the delay slot instruction needs to be analysed before the jump kind can be set to the branch instruction preceding it. As it stands that doesn't happen and the jump instruction gets assigned a jump kind of Ijk_Boring instead of Ijk_Call. See the fall through case after superblock 4 in the attached debug output. -- You are receiving this mail because: You are watching all bug changes.