Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: src/trusted/validator_mips/testdata/test_forbidden_instructions.S

Issue 9979025: [MIPS] Adding validator for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Update per initial code review. Nexes removed. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698