OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. |
| 5 */ |
| 6 |
| 7 # |
| 8 # Tests unpredicted situations in NaCl for Mips. |
| 9 # |
| 10 |
| 11 .set JUMP_MASK, $t6 |
| 12 |
| 13 .globl _start |
| 14 .set noreorder |
| 15 _start: |
| 16 |
| 17 b _start - 0x10000 # OK - trampoline start. |
| 18 b _start - 0x10000 # Error - branch is in the delay slot. |
| 19 nop |
| 20 nop |
| 21 |
| 22 and $v0, $v0, JUMP_MASK |
| 23 jr $v0 # OK |
| 24 jr $v0 # Error - jump is in the delay slot. |
| 25 nop |
| 26 |
| 27 and $v0, $v0, JUMP_MASK |
| 28 jr $v0 # OK |
| 29 b _start - 0x10000 # Error - branch is in the delay slot. |
| 30 nop |
| 31 |
| 32 b _start - 0x10000 # OK - trampoline start. |
| 33 jr $v0 # Error - jump is in the delay slot. |
| 34 nop |
| 35 nop |
| 36 |
| 37 end_of_code: |
OLD | NEW |