-
Notifications
You must be signed in to change notification settings - Fork 6.2k
/
Copy pathprocessor_spec.rxg
158 lines (139 loc) · 4.5 KB
/
processor_spec.rxg
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<include href="language_common.rxg" />
<!-- processor_spec files have extension .pspec -->
<start>
<element name="processor_spec">
<!-- IMPORTANT NOTE:
If a register is renamed in the register_data section, any
subsequent reference to that register must use the NEW name.
Likewise, references before the rename must refer to the OLD
name.
Also, references in compiler specs to the registers must use
the new name, because the compiler specs for a given language
are loaded after the language is completely loaded.
-->
<interleave>
<optional>
<ref name="properties_type"/>
</optional>
<optional>
<element name="programcounter">
<attribute name="register"/>
</element>
</optional>
<optional>
<element name="data_space">
<attribute name="space"/>
<optional>
<attribute name="ptr_wordsize"/>
</optional>
</element>
</optional>
<optional>
<element name="segmented_address">
<attribute name="space"/>
<optional>
<attribute name="type"/>
</optional>
</element>
</optional>
<zeroOrMore>
<ref name="segmentop_type"/>
</zeroOrMore>
<!-- see language_common.rxg -->
<optional>
<element name="context_data">
<ref name="context_data_type"/>
</element>
</optional>
<optional>
<element name="volatile">
<attribute name="inputop"/>
<attribute name="outputop"/>
<oneOrMore>
<ref name="memory_tags_type"/>
</oneOrMore>
</element>
</optional>
<optional>
<element name="incidentalcopy">
<oneOrMore>
<ref name="varnode_tags_type"/>
</oneOrMore>
</element>
</optional>
<zeroOrMore>
<element name="jumpassist"><ref name="jumpassist_type"/>
</element>
</zeroOrMore>
<optional>
<element name="register_data">
<oneOrMore>
<element name="register">
<attribute name="name"/>
<optional>
<attribute name="rename"/>
</optional>
<optional>
<attribute name="group"/>
</optional>
<optional>
<attribute name="hidden">
<ref name="boolean_type"/>
</attribute>
</optional>
<optional>
<attribute name="unused">
<ref name="boolean_type"/>
</attribute>
</optional>
<optional>
<attribute name="vector_lane_sizes"/>
</optional>
</element>
</oneOrMore>
</element>
</optional>
<optional>
<element name="default_symbols">
<oneOrMore>
<element name="symbol">
<attribute name="name"/>
<attribute name="address"/>
<optional>
<attribute name="entry">
<ref name="boolean_type"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<ref name="symbol_type"/>
</attribute>
</optional>
</element>
</oneOrMore>
</element>
</optional>
<optional>
<element name="default_memory_blocks">
<oneOrMore>
<element name="memory_block">
<attribute name="name"/>
<attribute name="start_address"/>
<optional> <attribute name="bit_mapped_address"/> </optional>
<optional> <attribute name="mode"/> </optional>
<optional> <attribute name="length"/> </optional>
<optional>
<attribute name="initialized">
<ref name="boolean_type"/>
</attribute>
</optional>
</element>
</oneOrMore>
</element>
</optional>
</interleave>
</element>
</start>
</grammar>