-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.a
77 lines (65 loc) · 1.23 KB
/
main.a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
!to "arith.bin", plain
;FIXED8 = 1
;FIXED16 = 1
;FIXED24 = 1
* = $1000
I32_ADD
jmp add32Bit
I32_SUB
jmp sub32Bit
I32_NEG
jmp neg32Bit
I32_MUL
jmp mul32Bit
U16_MUL
jmp mul16Bit
I32_SQU
jmp square32Bit
I32_HLV
jmp halve32Bit
I32_DBL
jmp double32Bit
I32_CMP
jmp cmp32Bit
I32_EQU
jmp isEqual32Bit
I32_ZER
jmp isZero32Bit
I32_MOV
jmp move32Bit
; Fixed point multiplication 8 bit integer part, 24 bit fractional part
!ifdef FIXED8 {
FP8_MUL
jmp mulFixedPoint8
FP8_SQU
jmp squareFixedPoint8
} else {
!skip 6 ; make sure address of following routines does not change
}
; Fixed point multiplication 16 bit integer part, 16 bit fractional part
!ifdef FIXED16 {
FP16_MUL
jmp mulFixedPoint16
FP16_SQU
jmp squareFixedPoint16
} else {
!skip 6 ; make sure address of following routines does not change
}
; Fixed point multiplication 24 bit integer part, 8 bit fractional part
!ifdef FIXED24 {
FP24_MUL
jmp mulFixedPoint24
FP24_SQU
jmp squareFixedPoint24
} else {
!skip 6 ; make sure address of following routines does not change
}
I32_CLR
jmp clear32Bit
U8_DIVMOD
jmp divMod8Bit
U16_DIVMOD
jmp divMod16Bit
U32_DIVMOD
jmp divMod32BitUnsigned
!source "arith.a"