The LDR (literal, int reg) testcase take a code label and compare the instructions around the label with known instructions in the code stream. The comment says: // This is a bit tricky. We load the value from just before and // just after the actual instruction. Because TESTINSN2_hide2 // generates two fixed insns either side of the test insn, these // should be constant and hence "safe" to check. However two fixed insns on either side of the checking instruction isn't enough given that offsets of +/-8 are used, instructions are only 4 wide and the values loaded are 64bit. Newer gcc versions would generate different code around the label and cause the tests to fail, The proposed solution is to add enough nops around the actual instruction to really give known expected constant values to check against. Reproducible: Always
Created attachment 97892 [details] Place nops around ldr literal test instruction and adjust expected output
(In reply to Mark Wielaard from comment #1) > Place nops around ldr literal test instruction and adjust expected output Looks good to me!
valgrind svn r15829