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

Side by Side Diff: src/trusted/validator_arm/testdata-thumb/test_sp_updates.S

Issue 7799013: Intial Thumb2 Sandbox (naclrev 6680) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: asdsa Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 @ be found in the LICENSE file.
4 @ Copyright (c) 2011 Google Inc.
5
6 @
7 @ Tests both legal and illegal variations on SP updates.
8 @
9
10 #define MASK 0xC0000000
11
12 .syntax unified
13 .code 16
14 .thumb_func
15 .global _start
16 _start:
17 bundle0:
18 ldr r0, [sp], #4 @ SP post-update is fine.
19 ldr r0, [sp, #4]! @ SP pre-update is fine.
20
21 ldm sp!, { r0, r1, r2 } @ Update from ldm is fine.
22 stm sp!, { r0, r1, r2 } @ Update from stm is fine.
23 nop
24 nop
25 bundle1:
26 bic r0, r0, #MASK
27 mov sp, r0 @ Move-to-SP is not fine preceeded by a mask
28
29 add r0, r0, #1 @ something unexpected (ERROR).
30 mov sp, r0 @ Move-to-SP not okay when preceeded by else
31 nop
32 nop
33 bundle2:
34 add sp, sp, #12 @ Adding a constant is not fine
35 ldr r0, [sp] @ immediately followed by deref
36 @ error
37
38 add sp, sp, #12
39 str r0, [sp], #0 @ Or a write.
40 @ @ error
41
42 add sp, sp, #12 @ Not okay when followed by
43 bic r0, r0, #12
44
45 bundle3:
46 add sp, r0
47
48 nop
49 nop
50 nop
51 nop
52 nop
53 bic r0, r0, #MASK @ Likewise, move-to-SP cannot be...
54
55 bundle4:
56 mov sp, r0 @ ...broken across bundle (ERROR).
57
58 bundle6:
59 str r0, [sp], #42 @ Update SP using immediate post-inc: should pass.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698