annotate util/test_patterns.txt @ 374:72a3b646d543

Added if statement sample
author Windel Bouwman
date Fri, 21 Mar 2014 15:27:18 +0100
parents 98ff43cfdd36
children 19eacf4f7270
rev   line source
346
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
1
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
2 mov r4, #100
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
3 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
4 mov sp, #0x6000
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
5 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
6 mov r3, sp
362
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
7 mov pc, lr
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
8 mov pc, r2
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
9 mov sp, r4
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
10 mov r5, r6
346
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
11 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
12 yield
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
13 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
14 push {r11,r5,r4,lr}
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
15 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
16 pop {r4,r5,r6}
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
17 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
18 sub r4,r5,#23
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
19 blt x
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
20 x:
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
21 mul r4,r5,r2
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
22 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
23 str r9, [r2, #33]
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
24 ===
3bb7dcfe5529 expanded arm target
Windel Bouwman
parents:
diff changeset
25 ldr r5, [r3, #87]
349
13a6e73b448f Added test load from label
Windel Bouwman
parents: 346
diff changeset
26 ===
13a6e73b448f Added test load from label
Windel Bouwman
parents: 346
diff changeset
27 ldr r5, lab1
13a6e73b448f Added test load from label
Windel Bouwman
parents: 346
diff changeset
28 ldr r11, lab1
13a6e73b448f Added test load from label
Windel Bouwman
parents: 346
diff changeset
29 ldr r10, lab1
13a6e73b448f Added test load from label
Windel Bouwman
parents: 346
diff changeset
30 lab1:
13a6e73b448f Added test load from label
Windel Bouwman
parents: 346
diff changeset
31 .word 0x12345566
352
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents: 349
diff changeset
32 ===
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents: 349
diff changeset
33 cmp r4, r11
899ae3aea803 First kernel run for vexpressA9
Windel Bouwman
parents: 349
diff changeset
34 cmp r5, #0x50000
354
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
35 ===
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
36 adr r5, cval
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
37 adr r9, cval
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
38 adr r8, cval
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
39 cval:
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
40 adr r11, cval
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
41 adr r12, cval
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
42 adr r1, cval
5477e499b039 Added some sort of string functionality
Windel Bouwman
parents: 352
diff changeset
43 pop {r2}
356
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
44 ===
365
98ff43cfdd36 Nasty bug in adr instruction
Windel Bouwman
parents: 364
diff changeset
45 adr r3, pc, #1024
98ff43cfdd36 Nasty bug in adr instruction
Windel Bouwman
parents: 364
diff changeset
46 ===
356
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
47 lsl r11, r5, r3
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
48 lsl r4, r8, r6
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
49 ===
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
50 lsr r9, r0, r2
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
51 lsr r4, r8, r6
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
52 ===
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
53 and r9, r0, r2
52492b304adf Added newline to print
Windel Bouwman
parents: 354
diff changeset
54 and r4, r8, r6
362
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
55 ===
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
56 mcr p15, 0, r1, c2, c0, 0
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
57 mcr p14, 0, r1, c8, c7, 0
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
58 ===
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
59 mrc p15, 0, r1, c2, c0, 0
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
60 mrc p14, 0, r1, c8, c7, 0
364
c49459768aaa Work on globals
Windel Bouwman
parents: 362
diff changeset
61 ===
365
98ff43cfdd36 Nasty bug in adr instruction
Windel Bouwman
parents: 364
diff changeset
62 ; mov sp, =a
98ff43cfdd36 Nasty bug in adr instruction
Windel Bouwman
parents: 364
diff changeset
63 ; a:
98ff43cfdd36 Nasty bug in adr instruction
Windel Bouwman
parents: 364
diff changeset
64 ; .word 0
362
c05ab629976a Added CPUID for arm
Windel Bouwman
parents: 356
diff changeset
65