We have a bug where an icbi can cause an instruction to execute twice.
Add a test case for this.
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
or %r7,%r6,%r7
subf %r3,%r0,%r7
blr
+
+/* Test for double execution of addi */
+.balign 64
+ .global test_icbi
+test_icbi:
+1: li %r3,0
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ icbi 0,%r0
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ addi %r3,%r3,1
+ blr
extern long test_mtpvr(void);
extern long test_bdnzl(void);
extern long test_loadhitstore(void);
+extern long test_icbi(void);
// i < 100
void print_test_number(int i)
} else
puts(PASS);
+ print_test_number(7);
+ if (test_icbi() != 1) {
+ fail = 1;
+ puts(FAIL);
+ } else
+ puts(PASS);
+
return fail;
}
Test 04:PASS\r
Test 05:PASS\r
Test 06:PASS\r
+Test 07:PASS\r