-
Notifications
You must be signed in to change notification settings - Fork 18
/
mips.tmLanguage
127 lines (127 loc) · 3.62 KB
/
mips.tmLanguage
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>s</string>
<string>asm</string>
</array>
<key>name</key>
<string>MIPS</string>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>Assembler directives for data storage</string>
<key>match</key>
<string>\.\b(align|ascii|asciiz|byte|double|extern|float|globl|space|word)\b</string>
<key>name</key>
<string>storage.modifier.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Segements: .data .text</string>
<key>match</key>
<string>\.\b(data|text|kdata|ktext|)\b</string>
<key>name</key>
<string>entity.name.section.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Registers by id $1, $2, ...</string>
<key>match</key>
<string>\$(((3[01])|([12]?[0-9])|[0-9])|zero|at|v[01]|a[0-3]|s[0-7]|t[0-9]|k[01]|gp|sp|fp|ra)</string>
<key>name</key>
<string>variable.parameter.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Floating point registers</string>
<key>match</key>
<string>\$f([0-9]|[1-2][0-9]|3[0-1])</string>
<key>name</key>
<string>variable.parameter.mips</string>
</dict>
<dict>
<key>comment</key>
<string>The MIPS floating-point instruction set</string>
<key>match</key>
<string>\b((add|sub|div|l|mov|mult|neg|s|c\.eq|c\.le|c\.lt)\.[ds]|cvt\.s\.[dw]|cvt\.d\.[sw]|cvt\.w\.[ds]|bc1[tf])\b</string>
<key>name</key>
<string>support.function.source.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Just the hardcoded instructions provided by the MIPS assembly language</string>
<key>match</key>
<string>\b(add|addu|addi|addiu|sub|subu|and|andi|or|not|ori|nor|xor|xori|slt|sltu|slti|sltiu|sll|sllv|rol|srl|sra|srlv|ror|j|jr|jal|beq|bne|lw|sw|lui|move|mfhi|mflo|mthi|mtlo)\b</string>
<key>name</key>
<string>support.function.source.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Pseudo instructions</string>
<key>match</key>
<string>\b(abs|b|beqz|bge|bgt|bgtu|ble|bleu|blt|bltu|bnez|div|divu|la|li|move|mul|neg|not|rem|remu|seq|sge|sgt|sle|sne)\b</string>
<key>name</key>
<string>support.function.other.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Other</string>
<key>match</key>
<string>\b(syscall)\b</string>
<key>name</key>
<string>entity.name.function.mips</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>comment</key>
<string>Strings</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.quoted.double.mips</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>.</string>
<key>name</key>
<string>string.ssraw</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>Numbers like +12, -3, 55, 0x3F</string>
<key>match</key>
<string>\b((0(x|X)[0-9A-Fa-f]*)|((\-)?[0-9]*))\b</string>
<key>name</key>
<string>constant.numeric.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Labels at line start: begin_repeat: add ...</string>
<key>match</key>
<string>\b[\w]+\b:</string>
<key>name</key>
<string>entity.name.tag.mips</string>
</dict>
<dict>
<key>comment</key>
<string>Single line comments</string>
<key>match</key>
<string>#.*$</string>
<key>name</key>
<string>comment.line.number-sign.mips</string>
</dict>
</array>
<key>scopeName</key>
<string>source.mips</string>
<key>uuid</key>
<string>f43b595a-700b-4f4f-a525-9c78c44d0254</string>
</dict>
</plist>