]> gitweb.factorcode.org Git - factor.git/blob - extra/cpu/arm/assembler/assembler-tests.factor
use radix literals
[factor.git] / extra / cpu / arm / assembler / assembler-tests.factor
1 IN: cpu.arm.assembler.tests
2 USING: cpu.arm.assembler math tools.test namespaces make
3 sequences kernel quotations ;
4 FROM: cpu.arm.assembler => B ;
5
6 : test-opcode ( expect quot -- ) [ { } make first ] curry unit-test ;
7
8 [ 0xea000000 ] [ 0 B ] test-opcode
9 [ 0xeb000000 ] [ 0 BL ] test-opcode
10 ! [ 0xe12fff30 ] [ R0 BLX ] test-opcode
11
12 [ 0xe24cc004 ] [ IP IP 4 SUB ] test-opcode
13 [ 0xe24cb004 ] [ FP IP 4 SUB ] test-opcode
14 [ 0xe087e3ac ] [ LR R7 IP 7 <LSR> ADD ] test-opcode
15 [ 0xe08c0109 ] [ R0 IP R9 2 <LSL> ADD ] test-opcode
16 [ 0x02850004 ] [ R0 R5 4 EQ ADD ] test-opcode
17 [ 0x00000000 ] [ R0 R0 R0 EQ AND ] test-opcode
18
19 [ 0xe1a0c00c ] [ IP IP MOV ] test-opcode
20 [ 0xe1a0c00d ] [ IP SP MOV ] test-opcode
21 [ 0xe3a03003 ] [ R3 3 MOV ] test-opcode
22 [ 0xe1a00003 ] [ R0 R3 MOV ] test-opcode
23 [ 0xe1e01c80 ] [ R1 R0 25 <LSL> MVN ] test-opcode
24 [ 0xe1e00ca1 ] [ R0 R1 25 <LSR> MVN ] test-opcode
25 [ 0x11a021ac ] [ R2 IP 3 <LSR> NE MOV ] test-opcode
26
27 [ 0xe3530007 ] [ R3 7 CMP ] test-opcode
28
29 [ 0xe008049a ] [ R8 SL R4 MUL ] test-opcode
30
31 [ 0xe5151004 ] [ R1 R5 4 <-> LDR ] test-opcode
32 [ 0xe41c2004 ] [ R2 IP 4 <-!> LDR ] test-opcode
33 [ 0xe50e2004 ] [ R2 LR 4 <-> STR ] test-opcode
34
35 [ 0xe7910002 ] [ R0 R1 R2 <+> LDR ] test-opcode
36 [ 0xe7910102 ] [ R0 R1 R2 2 <LSL> <+> LDR ] test-opcode
37
38 [ 0xe1d310bc ] [ R1 R3 12 <+> LDRH ] test-opcode
39 [ 0xe1d310fc ] [ R1 R3 12 <+> LDRSH ] test-opcode
40 [ 0xe1d310dc ] [ R1 R3 12 <+> LDRSB ] test-opcode
41 [ 0xe1c310bc ] [ R1 R3 12 <+> STRH ] test-opcode
42 [ 0xe19310b4 ] [ R1 R3 R4 <+> LDRH ] test-opcode
43 [ 0xe1f310fc ] [ R1 R3 12 <!+> LDRSH ] test-opcode
44 [ 0xe1b310d4 ] [ R1 R3 R4 <!+> LDRSB ] test-opcode
45 [ 0xe0c317bb ] [ R1 R3 123 <+!> STRH ] test-opcode
46 [ 0xe08310b4 ] [ R1 R3 R4 <+!> STRH ] test-opcode