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 |
| 5 # |
| 6 # Tests a few instructions that are always illegal in NaCl. |
| 7 # |
| 8 |
| 9 .globl _start |
| 10 _start: |
| 11 |
| 12 eret # Error, (forbidden) unsafe instruction. |
| 13 |
| 14 li $v0, 1 # System call code for print_int. |
| 15 la $a0, 20 # Integer for printing. |
| 16 syscall # Error, this is forbidden in untrusted code. |
| 17 |
| 18 break # Error, unsafe instruction. |
| 19 |
| 20 di # Error, unsafe instruction. |
| 21 ei # Error, unsafe instruction. |
| 22 wait # Error, unsafe instruction. |
| 23 teq $t1, $t2 # Error, unsafe instruction. |
| 24 nop |
| 25 deret # Error, unsafe instruction. |
| 26 |
| 27 end_of_code: |
OLD | NEW |