Index: src/trusted/validator_mips/testdata/test_unpredicted.S |
diff --git a/src/trusted/validator_mips/testdata/test_unpredicted.S b/src/trusted/validator_mips/testdata/test_unpredicted.S |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0610f4122bf53c5d8bd3db8efd7b7f2777bb2fc7 |
--- /dev/null |
+++ b/src/trusted/validator_mips/testdata/test_unpredicted.S |
@@ -0,0 +1,27 @@ |
+/* |
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+# |
+# Tests unpredicted situations in NaCl for Mips. |
+# |
+ |
+.set JUMP_MASK, $t6 |
+ |
+.globl _start |
+.set noreorder |
+_start: |
+ |
+ b _start - 0x10000 # OK - trampoline start. |
+ b _start - 0x10000 # Error - branch is in the delay slot. |
+ nop |
+ nop |
+ |
+ and $v0, $v0, JUMP_MASK |
+ jr $v0 # OK |
+ jr $v0 # Error - jump is in the delay slot. |
+ nop |
+ |
+end_of_code: |
Please use jfb - chromium.org
2012/10/09 16:44:32
Add test for jr in b's slot, and b in jr's slot.
petarj
2012/10/10 12:12:14
Done.
|