-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmips.JSON-tmLanguage
69 lines (69 loc) · 2.42 KB
/
mips.JSON-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
{ "name": "MIPS",
"scopeName": "source.mips",
"fileTypes": ["s", "asm"],
"patterns": [
{
"name": "storage.modifier.mips",
"match": "\\.\\b(align|ascii|asciiz|byte|double|extern|float|globl|space|word)\\b",
"comment": "Assembler directives for data storage"
},
{
"name": "entity.name.section.mips",
"match": "\\.\\b(data|text|kdata|ktext|)\\b",
"comment": "Segements: .data .text"
},
{
"name": "variable.parameter.mips",
"match": "\\$(((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)",
"comment": "Registers by id $1, $2, ..."
},
{
"match": "\\$f([0-9]|[1-2][0-9]|3[0-1])",
"name": "variable.parameter.mips",
"comment": "Floating point registers"
},
{
"match": "\\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",
"name": "support.function.source.mips",
"comment": "The MIPS floating-point instruction set"
},
{
"name": "support.function.source.mips",
"match": "\\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",
"comment": "Just the hardcoded instructions provided by the MIPS assembly language"
},
{
"name": "support.function.other.mips",
"match": "\\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",
"comment": "Pseudo instructions"
},
{
"name": "entity.name.function.mips",
"match": "\\b(syscall)\\b",
"comment": "Other"
},
{
"name": "string.quoted.double.mips",
"begin": "\"",
"patterns": [{"match": ".", "name": "string.ssraw"}],
"end": "\"",
"comment": "Strings"
},
{
"name": "constant.numeric.mips",
"match": "\\b((0(x|X)[0-9A-Fa-f]*)|((\\-)?[0-9]*))\\b",
"comment": "Numbers like +12, -3, 55, 0x3F"
},
{
"name": "entity.name.tag.mips",
"match": "\\b[\\w]+\\b:",
"comment": "Labels at line start: begin_repeat: add ..."
},
{
"name": "comment.line.number-sign.mips",
"match": "#.*$",
"comment": "Single line comments"
}
],
"uuid": "f43b595a-700b-4f4f-a525-9c78c44d0254"
}