Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2012 The Native Client Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can | |
| 3 # be found in the LICENSE file. | |
| 4 # Copyright 2012 MIPS Technologies / RT-RK. | |
|
Brad Chen
2012/04/13 00:50:52
MIPS Copyright? Please clarify or remove from all
| |
| 5 | |
| 6 # | |
| 7 # Tests a few instructions that are always illegal in NaCl. | |
| 8 # | |
| 9 | |
| 10 .globl _start | |
| 11 _start: | |
| 12 | |
| 13 eret #ERROR, unsafe | |
| 14 | |
| 15 li $v0, 1 #system call code for print_int | |
| 16 la $a0, 20 #integer for printing | |
| 17 syscall #ERROR, this is forbidden in untrusted code, | |
| 18 | |
| 19 break #ERROR, unsafe | |
| 20 | |
| 21 di #ERROR, unsafe | |
| 22 ei #ERROR, unsafe | |
| 23 wait #ERROR, unsafe | |
| 24 teq $t1, $t2 #ERROR, unsafe | |
| 25 nop | |
| 26 deret #ERROR, unsafe | |
| 27 | |
| 28 end_of_code: | |
| OLD | NEW |