Cavium OCTEON mips instructions SNEI and SEQI extracts the operands from bit field [15:6]. However the VEX implementation of these instructions extract the immediate operands from [15:0] incorrectly. This caused branches in C programs to fail on valgrind when gcc emitted these instructions. Reproducible: Always
Created attachment 90032 [details] fix to correctly handle SNEI and SEQI in VEX
Created attachment 90033 [details] test case update for SNEI and SEQI Update the testcase to validate the matching case (source operand == immediate value). This case was not present and hence the bug was uncaught.
Peter, can/should this be committed?
I am running on octeon2 and can confirm that this patch does fix something useful. Without this patch ld.so fails to load stuff from /usr/lib because the snei instruction is emulated incorrectly.
(In reply to Maran Pakkirisamy from comment #1) > Created attachment 90032 [details] > fix to correctly handle SNEI and SEQI in VEX Fix applied in r3108. Thank you. (In reply to Maran Pakkirisamy from comment #2) > Created attachment 90033 [details] > test case update for SNEI and SEQI > > Update the testcase to validate the matching case (source operand == > immediate value). > This case was not present and hence the bug was uncaught. The test updated, r15043. Thanks.
(In reply to Julian Seward from comment #3) > Peter, can/should this be committed? Done. We can close the issue now.