| OLD | NEW |
| 1 @ Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 @ Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 2 @ Use of this source code is governed by a BSD-style license that can be | 2 @ Use of this source code is governed by a BSD-style license that can be |
| 3 @ found in the LICENSE file. | 3 @ found in the LICENSE file. |
| 4 | 4 |
| 5 @ | 5 @ |
| 6 @ Tests both legal and illegal variations on stores -- both stores that | 6 @ Tests both legal and illegal variations on stores -- both stores that |
| 7 @ require masking, and stores that are guaranteed sandboxed (i.e. through SP) | 7 @ require masking, and stores that are guaranteed sandboxed (i.e. through SP) |
| 8 @ | 8 @ |
| 9 | 9 |
| 10 @ we restrict store to the lower 1GB of the address space | 10 @ we restrict store to the lower 1GB of the address space |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 bic r0, r0, #0xC0000000 @ Mask a register, and | 52 bic r0, r0, #0xC0000000 @ Mask a register, and |
| 53 str r1, [r0], r2 @ use it in register post-index store: should pass. | 53 str r1, [r0], r2 @ use it in register post-index store: should pass. |
| 54 nop @ Don't mask, and | 54 nop @ Don't mask, and |
| 55 str r1, [r0], r2 @ use it in register post-index store: ERROR. | 55 str r1, [r0], r2 @ use it in register post-index store: ERROR. |
| 56 | 56 |
| 57 bundle6: | 57 bundle6: |
| 58 str r1, [sp], #1024 @ post-indexing sp by a constant is OK | 58 str r1, [sp], #1024 @ post-indexing sp by a constant is OK |
| 59 str r1, [sp], r2 @ post-indexing sp by a register is an ERROR | 59 str r1, [sp], r2 @ post-indexing sp by a register is an ERROR |
| 60 bic r0, r0, #0xC0000000 @ Mask a register, and | 60 bic r0, r0, #0xC0000000 @ Mask a register, and |
| 61 str r1, [r0, r2] @ use it in register pre-index store: ERROR | 61 str r1, [r0, r2] @ use it in register pre-index store: ERROR |
| 62 | |
| 63 conditional_sandbox: | |
| 64 tst r0, #0xC0000000 @ Set Z if the top two bits are clear, and | |
| 65 streq r1, [r0] @ store: should work. | |
| 66 | |
| 67 tst r0, #0xC0000000 @ Set Z if the top two bits are clear, and | |
| 68 str r1, [r0] @ store unconditionally: ERROR. | |
| 69 | |
| 70 tst r0, #0xC0000000 @ Set Z if the top two bits are clear, and | |
| 71 strgt r1, [r0] @ store using wrong predicate: ERROR. | |
| 72 | |
| 73 tsteq r0, #0xC0000000 @ Conditionally set Z if the top two bits are clear, | |
| 74 strgt r1, [r0] @ and store using wrong predicate: ERROR. | |
| OLD | NEW |