Index: src/trusted/validator_mips/testdata/test_forbidden_instructions.S |
diff --git a/src/trusted/validator_mips/testdata/test_forbidden_instructions.S b/src/trusted/validator_mips/testdata/test_forbidden_instructions.S |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f20169a9de7eae8c76fb52344b62fa98b5acf5cd |
--- /dev/null |
+++ b/src/trusted/validator_mips/testdata/test_forbidden_instructions.S |
@@ -0,0 +1,28 @@ |
+# Copyright 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. |
+# Copyright 2012 MIPS Technologies / RT-RK. |
Brad Chen
2012/04/13 00:50:52
MIPS Copyright? Please clarify or remove from all
|
+ |
+# |
+# Tests a few instructions that are always illegal in NaCl. |
+# |
+ |
+.globl _start |
+_start: |
+ |
+ eret #ERROR, unsafe |
+ |
+ li $v0, 1 #system call code for print_int |
+ la $a0, 20 #integer for printing |
+ syscall #ERROR, this is forbidden in untrusted code, |
+ |
+ break #ERROR, unsafe |
+ |
+ di #ERROR, unsafe |
+ ei #ERROR, unsafe |
+ wait #ERROR, unsafe |
+ teq $t1, $t2 #ERROR, unsafe |
+ nop |
+ deret #ERROR, unsafe |
+ |
+end_of_code: |