ic10c-node 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +300 -0
- package/README.zh.md +300 -0
- package/package.json +50 -0
- package/src/ic10c-node.node +0 -0
- package/src/stdLib.ic +692 -0
- package/static/stdLib.ic.json +3 -0
- package/tsconfig.json +16 -0
- package/types/common.d.ts +145 -0
- package/types/incremental.d.ts +83 -0
- package/types/index.d.ts +53 -0
- package/types/lexer/index.d.ts +18 -0
- package/types/lexer/lexer.d.ts +83 -0
- package/types/lexer/token.d.ts +341 -0
- package/types/linker.d.ts +156 -0
- package/types/locale.d.ts +36 -0
- package/types/parser/ast.d.ts +848 -0
- package/types/parser/index.d.ts +19 -0
- package/types/parser/instructions/binary.d.ts +1209 -0
- package/types/parser/instructions/index.d.ts +22 -0
- package/types/parser/instructions/nullary.d.ts +85 -0
- package/types/parser/instructions/quaternary.d.ts +603 -0
- package/types/parser/instructions/quinary.d.ts +150 -0
- package/types/parser/instructions/senary.d.ts +104 -0
- package/types/parser/instructions/ternary.d.ts +1551 -0
- package/types/parser/instructions/unary.d.ts +518 -0
- package/types/parser/parser.d.ts +84 -0
- package/types/parser/program.d.ts +136 -0
- package/types/semantic/analyser.d.ts +98 -0
- package/types/semantic/index.d.ts +19 -0
- package/types/semantic/semantic.d.ts +81 -0
- package/types/semantic/type_table.d.ts +119 -0
- package/types/semantic/types.d.ts +100 -0
|
@@ -0,0 +1,1209 @@
|
|
|
1
|
+
// Copyright (c) 2026. All rights reserved.
|
|
2
|
+
// This source code is licensed under the CC BY-NC-SA
|
|
3
|
+
// (Creative Commons Attribution-NonCommercial-NoDerivatives) License, By Xiao Songtao.
|
|
4
|
+
// This software is protected by copyright law. Reproduction, distribution, or use for commercial
|
|
5
|
+
// purposes is prohibited without the author's permission. If you have any questions or require
|
|
6
|
+
// permission, please contact the author: edocsitahw@qq.com
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @file binary.d.ts
|
|
10
|
+
* @author edocsitahw
|
|
11
|
+
* @version 1.1
|
|
12
|
+
* @date 2026/07/22 15:43
|
|
13
|
+
* @desc
|
|
14
|
+
* @copyright CC BY-NC-SA 2026. All rights reserved.
|
|
15
|
+
* */
|
|
16
|
+
import {ErrorNode, RegisterOrIdentifierNode, OperandNode, DeviceReferenceNode, OperandType} from "../ast";
|
|
17
|
+
import {UnaryInstruction} from "./unary";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
// 二元指令(2 个操作数)
|
|
21
|
+
|
|
22
|
+
export interface BinaryInstruction extends UnaryInstruction {
|
|
23
|
+
type2: OperandType;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @summary 二元指令概述
|
|
29
|
+
*
|
|
30
|
+
* @desc 二元指令是包含两个操作数的指令。
|
|
31
|
+
* 根据操作数类型可分为以下几类:
|
|
32
|
+
* - **BinaryInstruction_RI_O**:寄存器/标识符 + 操作数
|
|
33
|
+
* - **BinaryInstruction_DR_O**:设备引用 + 操作数
|
|
34
|
+
* - **BinaryInstruction_RI_DR**:寄存器/标识符 + 设备引用
|
|
35
|
+
* - **BinaryInstruction_O_O**:操作数 + 操作数
|
|
36
|
+
*
|
|
37
|
+
* @elseif en
|
|
38
|
+
* @summary Binary Instructions Overview
|
|
39
|
+
*
|
|
40
|
+
* @desc Binary instructions contain two operands.
|
|
41
|
+
* They are categorized by operand types:
|
|
42
|
+
* - **BinaryInstruction_RI_O**: Register/identifier + operand
|
|
43
|
+
* - **BinaryInstruction_DR_O**: Device reference + operand
|
|
44
|
+
* - **BinaryInstruction_RI_DR**: Register/identifier + device reference
|
|
45
|
+
* - **BinaryInstruction_O_O**: Operand + operand
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @summary 含 RegisterOrIdentifier + Operand 操作数的二元指令基类
|
|
50
|
+
*
|
|
51
|
+
* @desc 第一个操作数为寄存器或标识符,第二个为通用操作数。
|
|
52
|
+
* @elseif en
|
|
53
|
+
* @summary Base interface for binary instructions with RegisterOrIdentifier + Operand operands
|
|
54
|
+
*
|
|
55
|
+
* @desc First operand is a register or identifier, second is a general operand.
|
|
56
|
+
*
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
interface BinaryInstruction_RI_O extends BinaryInstruction {
|
|
60
|
+
operand1: RegisterOrIdentifierNode;
|
|
61
|
+
operand2: OperandNode;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @summary ABS(绝对值)指令节点
|
|
67
|
+
*
|
|
68
|
+
* @desc 计算操作数的绝对值并存入目标寄存器。
|
|
69
|
+
* @elseif en
|
|
70
|
+
* @summary ABS (Absolute Value) instruction node
|
|
71
|
+
*
|
|
72
|
+
* @desc Computes the absolute value of the operand and stores it in the target register.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* // ABS r0 r1
|
|
77
|
+
* // 计算 r1 的绝对值并存入 r0
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
export interface AbsInstructionNode extends BinaryInstruction_RI_O {
|
|
83
|
+
type: "absInstruction";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @summary ACOS(反余弦)指令节点
|
|
89
|
+
*
|
|
90
|
+
* @desc 计算操作数的反余弦值(弧度制)。
|
|
91
|
+
* @elseif en
|
|
92
|
+
* @summary ACOS (Arc Cosine) instruction node
|
|
93
|
+
*
|
|
94
|
+
* @desc Computes the arc cosine of the operand (in radians).
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* // ACOS r0 r1
|
|
99
|
+
* // 计算 r1 的反余弦值并存入 r0
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export interface AcosInstructionNode extends BinaryInstruction_RI_O {
|
|
105
|
+
type: "acosInstruction";
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @summary ASIN(反正弦)指令节点
|
|
111
|
+
*
|
|
112
|
+
* @desc 计算操作数的反正弦值(弧度制)。
|
|
113
|
+
* @elseif en
|
|
114
|
+
* @summary ASIN (Arc Sine) instruction node
|
|
115
|
+
*
|
|
116
|
+
* @desc Computes the arc sine of the operand (in radians).
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* // ASIN r0 r1
|
|
121
|
+
* // 计算 r1 的反正弦值并存入 r0
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
export interface AsinInstructionNode extends BinaryInstruction_RI_O {
|
|
127
|
+
type: "asinInstruction";
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @summary ATAN(反正切)指令节点
|
|
133
|
+
*
|
|
134
|
+
* @desc 计算操作数的反正切值(弧度制)。
|
|
135
|
+
* @elseif en
|
|
136
|
+
* @summary ATAN (Arc Tangent) instruction node
|
|
137
|
+
*
|
|
138
|
+
* @desc Computes the arc tangent of the operand (in radians).
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* // ATAN r0 r1
|
|
143
|
+
* // 计算 r1 的反正切值并存入 r0
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @public
|
|
147
|
+
*/
|
|
148
|
+
export interface AtanInstructionNode extends BinaryInstruction_RI_O {
|
|
149
|
+
type: "atanInstruction";
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @summary CEIL(向上取整)指令节点
|
|
155
|
+
*
|
|
156
|
+
* @desc 计算大于或等于操作数的最小整数。
|
|
157
|
+
* @elseif en
|
|
158
|
+
* @summary CEIL (Ceiling) instruction node
|
|
159
|
+
*
|
|
160
|
+
* @desc Computes the smallest integer greater than or equal to the operand.
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* // CEIL r0 r1
|
|
165
|
+
* // 计算 r1 向上取整的结果并存入 r0
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
export interface CeilInstructionNode extends BinaryInstruction_RI_O {
|
|
171
|
+
type: "ceilInstruction";
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @summary COS(余弦)指令节点
|
|
177
|
+
*
|
|
178
|
+
* @desc 计算操作数的余弦值(弧度制)。
|
|
179
|
+
* @elseif en
|
|
180
|
+
* @summary COS (Cosine) instruction node
|
|
181
|
+
*
|
|
182
|
+
* @desc Computes the cosine of the operand (in radians).
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* // COS r0 r1
|
|
187
|
+
* // 计算 r1 的余弦值并存入 r0
|
|
188
|
+
* ```
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
export interface CosInstructionNode extends BinaryInstruction_RI_O {
|
|
193
|
+
type: "cosInstruction";
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @summary EXP(指数)指令节点
|
|
199
|
+
*
|
|
200
|
+
* @desc 计算 e 的操作数次幂。
|
|
201
|
+
* @elseif en
|
|
202
|
+
* @summary EXP (Exponential) instruction node
|
|
203
|
+
*
|
|
204
|
+
* @desc Computes e raised to the power of the operand.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* // EXP r0 r1
|
|
209
|
+
* // 计算 e^r1 并存入 r0
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* @public
|
|
213
|
+
*/
|
|
214
|
+
export interface ExpInstructionNode extends BinaryInstruction_RI_O {
|
|
215
|
+
type: "expInstruction";
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @summary FLOOR(向下取整)指令节点
|
|
221
|
+
*
|
|
222
|
+
* @desc 计算小于或等于操作数的最大整数。
|
|
223
|
+
* @elseif en
|
|
224
|
+
* @summary FLOOR instruction node
|
|
225
|
+
*
|
|
226
|
+
* @desc Computes the largest integer less than or equal to the operand.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* // FLOOR r0 r1
|
|
231
|
+
* // 计算 r1 向下取整的结果并存入 r0
|
|
232
|
+
* ```
|
|
233
|
+
*
|
|
234
|
+
* @public
|
|
235
|
+
*/
|
|
236
|
+
export interface FloorInstructionNode extends BinaryInstruction_RI_O {
|
|
237
|
+
type: "floorInstruction";
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @summary LOG(自然对数)指令节点
|
|
243
|
+
*
|
|
244
|
+
* @desc 计算操作数的自然对数(以 e 为底)。
|
|
245
|
+
* @elseif en
|
|
246
|
+
* @summary LOG (Natural Logarithm) instruction node
|
|
247
|
+
*
|
|
248
|
+
* @desc Computes the natural logarithm of the operand (base e).
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```typescript
|
|
252
|
+
* // LOG r0 r1
|
|
253
|
+
* // 计算 ln(r1) 并存入 r0
|
|
254
|
+
* ```
|
|
255
|
+
*
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
export interface LogInstructionNode extends BinaryInstruction_RI_O {
|
|
259
|
+
type: "logInstruction";
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @summary ROUND(四舍五入)指令节点
|
|
265
|
+
*
|
|
266
|
+
* @desc 将操作数四舍五入到最接近的整数。
|
|
267
|
+
* @elseif en
|
|
268
|
+
* @summary ROUND instruction node
|
|
269
|
+
*
|
|
270
|
+
* @desc Rounds the operand to the nearest integer.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```typescript
|
|
274
|
+
* // ROUND r0 r1
|
|
275
|
+
* // 计算 r1 四舍五入的结果并存入 r0
|
|
276
|
+
* ```
|
|
277
|
+
*
|
|
278
|
+
* @public
|
|
279
|
+
*/
|
|
280
|
+
export interface RoundInstructionNode extends BinaryInstruction_RI_O {
|
|
281
|
+
type: "roundInstruction";
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @summary SIN(正弦)指令节点
|
|
287
|
+
*
|
|
288
|
+
* @desc 计算操作数的正弦值(弧度制)。
|
|
289
|
+
* @elseif en
|
|
290
|
+
* @summary SIN (Sine) instruction node
|
|
291
|
+
*
|
|
292
|
+
* @desc Computes the sine of the operand (in radians).
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```typescript
|
|
296
|
+
* // SIN r0 r1
|
|
297
|
+
* // 计算 r1 的正弦值并存入 r0
|
|
298
|
+
* ```
|
|
299
|
+
*
|
|
300
|
+
* @public
|
|
301
|
+
*/
|
|
302
|
+
export interface SinInstructionNode extends BinaryInstruction_RI_O {
|
|
303
|
+
type: "sinInstruction";
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @summary SQRT(平方根)指令节点
|
|
309
|
+
*
|
|
310
|
+
* @desc 计算操作数的平方根。
|
|
311
|
+
* @elseif en
|
|
312
|
+
* @summary SQRT (Square Root) instruction node
|
|
313
|
+
*
|
|
314
|
+
* @desc Computes the square root of the operand.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```typescript
|
|
318
|
+
* // SQRT r0 r1
|
|
319
|
+
* // 计算 sqrt(r1) 并存入 r0
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* @public
|
|
323
|
+
*/
|
|
324
|
+
export interface SqrtInstructionNode extends BinaryInstruction_RI_O {
|
|
325
|
+
type: "sqrtInstruction";
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @summary TAN(正切)指令节点
|
|
331
|
+
*
|
|
332
|
+
* @desc 计算操作数的正切值(弧度制)。
|
|
333
|
+
* @elseif en
|
|
334
|
+
* @summary TAN (Tangent) instruction node
|
|
335
|
+
*
|
|
336
|
+
* @desc Computes the tangent of the operand (in radians).
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* ```typescript
|
|
340
|
+
* // TAN r0 r1
|
|
341
|
+
* // 计算 r1 的正切值并存入 r0
|
|
342
|
+
* ```
|
|
343
|
+
*
|
|
344
|
+
* @public
|
|
345
|
+
*/
|
|
346
|
+
export interface TanInstructionNode extends BinaryInstruction_RI_O {
|
|
347
|
+
type: "tanInstruction";
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @summary TRUNC(截断)指令节点
|
|
353
|
+
*
|
|
354
|
+
* @desc 截断操作数的小数部分,只保留整数部分。
|
|
355
|
+
* @elseif en
|
|
356
|
+
* @summary TRUNC (Truncate) instruction node
|
|
357
|
+
*
|
|
358
|
+
* @desc Truncates the decimal part of the operand, keeping only the integer part.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```typescript
|
|
362
|
+
* // TRUNC r0 r1
|
|
363
|
+
* // 计算 truncate(r1) 并存入 r0
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* @public
|
|
367
|
+
*/
|
|
368
|
+
export interface TruncInstructionNode extends BinaryInstruction_RI_O {
|
|
369
|
+
type: "truncInstruction";
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @summary NOT(按位取反)指令节点
|
|
375
|
+
*
|
|
376
|
+
* @desc 对操作数进行按位取反运算。
|
|
377
|
+
* @elseif en
|
|
378
|
+
* @summary NOT (Bitwise NOT) instruction node
|
|
379
|
+
*
|
|
380
|
+
* @desc Performs bitwise NOT operation on the operand.
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```typescript
|
|
384
|
+
* // NOT r0 r1
|
|
385
|
+
* // 计算 ~r1 并存入 r0
|
|
386
|
+
* ```
|
|
387
|
+
*
|
|
388
|
+
* @public
|
|
389
|
+
*/
|
|
390
|
+
export interface NotInstructionNode extends BinaryInstruction_RI_O {
|
|
391
|
+
type: "notInstruction";
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @summary MOVE(移动)指令节点
|
|
397
|
+
*
|
|
398
|
+
* @desc 将第二个操作数的值复制到第一个操作数(目标寄存器)。
|
|
399
|
+
* @elseif en
|
|
400
|
+
* @summary MOVE instruction node
|
|
401
|
+
*
|
|
402
|
+
* @desc Copies the value of the second operand to the first operand (target register).
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```typescript
|
|
406
|
+
* // MOVE r0 r1
|
|
407
|
+
* // 将 r1 的值复制到 r0
|
|
408
|
+
* ```
|
|
409
|
+
*
|
|
410
|
+
* @public
|
|
411
|
+
*/
|
|
412
|
+
export interface MoveInstructionNode extends BinaryInstruction_RI_O {
|
|
413
|
+
type: "moveInstruction";
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @summary SUB(减法)指令节点
|
|
419
|
+
*
|
|
420
|
+
* @desc 从第一个操作数中减去第二个操作数,结果存入目标寄存器。
|
|
421
|
+
* @elseif en
|
|
422
|
+
* @summary SUB (Subtraction) instruction node
|
|
423
|
+
*
|
|
424
|
+
* @desc Subtracts the second operand from the first operand, storing the result in the target register.
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* ```typescript
|
|
428
|
+
* // SUB r0 r1 r2
|
|
429
|
+
* // 计算 r1 - r2 并存入 r0
|
|
430
|
+
* ```
|
|
431
|
+
*
|
|
432
|
+
* @public
|
|
433
|
+
*/
|
|
434
|
+
export interface SubInstructionNode extends BinaryInstruction_RI_O {
|
|
435
|
+
type: "subInstruction";
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @summary 含 DeviceReference + Operand 操作数的二元指令基类
|
|
441
|
+
*
|
|
442
|
+
* @desc 第一个操作数为设备引用,第二个为通用操作数。
|
|
443
|
+
* @elseif en
|
|
444
|
+
* @summary Base interface for binary instructions with DeviceReference + Operand operands
|
|
445
|
+
*
|
|
446
|
+
* @desc First operand is a device reference, second is a general operand.
|
|
447
|
+
*
|
|
448
|
+
* @public
|
|
449
|
+
*/
|
|
450
|
+
interface BinaryInstruction_DR_O extends BinaryInstruction {
|
|
451
|
+
operand1: DeviceReferenceNode;
|
|
452
|
+
operand2: OperandNode;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @summary BDNS(Branches on Device Not Stalled)指令节点
|
|
458
|
+
*
|
|
459
|
+
* @desc 如果指定设备未处于停滞状态,则跳转到目标地址。
|
|
460
|
+
* @elseif en
|
|
461
|
+
* @summary BDNS (Branches on Device Not Stalled) instruction node
|
|
462
|
+
*
|
|
463
|
+
* @desc Jumps to the target address if the specified device is not stalled.
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```typescript
|
|
467
|
+
* // BDNS console1 loop
|
|
468
|
+
* // 如果 console1 未停滞,跳转到 loop
|
|
469
|
+
* ```
|
|
470
|
+
*
|
|
471
|
+
* @public
|
|
472
|
+
*/
|
|
473
|
+
export interface BdnsInstructionNode extends BinaryInstruction_DR_O {
|
|
474
|
+
type: "bdnsInstruction";
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @summary BDNSAL(Branches on Device Not Stalled And Link)指令节点
|
|
480
|
+
*
|
|
481
|
+
* @desc 如果指定设备未处于停滞状态,则跳转到目标地址并保存返回地址。
|
|
482
|
+
* @elseif en
|
|
483
|
+
* @summary BDNSAL (Branches on Device Not Stalled And Link) instruction node
|
|
484
|
+
*
|
|
485
|
+
* @desc Jumps to the target address if the specified device is not stalled, and saves the return address.
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* ```typescript
|
|
489
|
+
* // BDNSAL console1 loop
|
|
490
|
+
* // 如果 console1 未停滞,跳转到 loop 并保存返回地址
|
|
491
|
+
* ```
|
|
492
|
+
*
|
|
493
|
+
* @public
|
|
494
|
+
*/
|
|
495
|
+
export interface BdnsalInstructionNode extends BinaryInstruction_DR_O {
|
|
496
|
+
type: "bdnsalInstruction";
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* @summary BDSE(Branches on Device Stalled)指令节点
|
|
502
|
+
*
|
|
503
|
+
* @desc 如果指定设备处于停滞状态,则跳转到目标地址。
|
|
504
|
+
* @elseif en
|
|
505
|
+
* @summary BDSE (Branches on Device Stalled) instruction node
|
|
506
|
+
*
|
|
507
|
+
* @desc Jumps to the target address if the specified device is stalled.
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* ```typescript
|
|
511
|
+
* // BDSE console1 loop
|
|
512
|
+
* // 如果 console1 停滞,跳转到 loop
|
|
513
|
+
* ```
|
|
514
|
+
*
|
|
515
|
+
* @public
|
|
516
|
+
*/
|
|
517
|
+
export interface BdseInstructionNode extends BinaryInstruction_DR_O {
|
|
518
|
+
type: "bdseInstruction";
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @summary BDSEAL(Branches on Device Stalled And Link)指令节点
|
|
524
|
+
*
|
|
525
|
+
* @desc 如果指定设备处于停滞状态,则跳转到目标地址并保存返回地址。
|
|
526
|
+
* @elseif en
|
|
527
|
+
* @summary BDSEAL (Branches on Device Stalled And Link) instruction node
|
|
528
|
+
*
|
|
529
|
+
* @desc Jumps to the target address if the specified device is stalled, and saves the return address.
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* ```typescript
|
|
533
|
+
* // BDSEAL console1 loop
|
|
534
|
+
* // 如果 console1 停滞,跳转到 loop 并保存返回地址
|
|
535
|
+
* ```
|
|
536
|
+
*
|
|
537
|
+
* @public
|
|
538
|
+
*/
|
|
539
|
+
export interface BdsealInstructionNode extends BinaryInstruction_DR_O {
|
|
540
|
+
type: "bdsealInstruction";
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* @summary BRDNS(Branches Register on Device Not Stalled)指令节点
|
|
546
|
+
*
|
|
547
|
+
* @desc 如果指定设备未处于停滞状态,则跳转到寄存器中存储的地址。
|
|
548
|
+
* @elseif en
|
|
549
|
+
* @summary BRDNS (Branches Register on Device Not Stalled) instruction node
|
|
550
|
+
*
|
|
551
|
+
* @desc Jumps to the address stored in the register if the specified device is not stalled.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* ```typescript
|
|
555
|
+
* // BRDNS r0 console1
|
|
556
|
+
* // 如果 console1 未停滞,跳转到 r0 存储的地址
|
|
557
|
+
* ```
|
|
558
|
+
*
|
|
559
|
+
* @public
|
|
560
|
+
*/
|
|
561
|
+
export interface BrdnsInstructionNode extends BinaryInstruction_DR_O {
|
|
562
|
+
type: "brdnsInstruction";
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* @summary BRDSE(Branches Register on Device Stalled)指令节点
|
|
568
|
+
*
|
|
569
|
+
* @desc 如果指定设备处于停滞状态,则跳转到寄存器中存储的地址。
|
|
570
|
+
* @elseif en
|
|
571
|
+
* @summary BRDSE (Branches Register on Device Stalled) instruction node
|
|
572
|
+
*
|
|
573
|
+
* @desc Jumps to the address stored in the register if the specified device is stalled.
|
|
574
|
+
*
|
|
575
|
+
* @example
|
|
576
|
+
* ```typescript
|
|
577
|
+
* // BRDSE r0 console1
|
|
578
|
+
* // 如果 console1 停滞,跳转到 r0 存储的地址
|
|
579
|
+
* ```
|
|
580
|
+
*
|
|
581
|
+
* @public
|
|
582
|
+
*/
|
|
583
|
+
export interface BrdseInstructionNode extends BinaryInstruction_DR_O {
|
|
584
|
+
type: "brdseInstruction";
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @summary 含 RegisterOrIdentifier + DeviceReference 操作数的二元指令基类
|
|
590
|
+
*
|
|
591
|
+
* @desc 第一个操作数为寄存器或标识符,第二个为设备引用。
|
|
592
|
+
* @elseif en
|
|
593
|
+
* @summary Base interface for binary instructions with RegisterOrIdentifier + DeviceReference operands
|
|
594
|
+
*
|
|
595
|
+
* @desc First operand is a register or identifier, second is a device reference.
|
|
596
|
+
*
|
|
597
|
+
* @public
|
|
598
|
+
*/
|
|
599
|
+
interface BinaryInstruction_RI_DR extends BinaryInstruction {
|
|
600
|
+
operand1: RegisterOrIdentifierNode;
|
|
601
|
+
operand2: DeviceReferenceNode;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* @summary SDNS(Sets Device Not Stalled)指令节点
|
|
607
|
+
*
|
|
608
|
+
* @desc 将指定设备设置为非停滞状态。
|
|
609
|
+
* @elseif en
|
|
610
|
+
* @summary SDNS (Sets Device Not Stalled) instruction node
|
|
611
|
+
*
|
|
612
|
+
* @desc Sets the specified device to not stalled state.
|
|
613
|
+
*
|
|
614
|
+
* @example
|
|
615
|
+
* ```typescript
|
|
616
|
+
* // SDNS r0 console1
|
|
617
|
+
* // 将 console1 设置为非停滞状态
|
|
618
|
+
* ```
|
|
619
|
+
*
|
|
620
|
+
* @public
|
|
621
|
+
*/
|
|
622
|
+
export interface SdnsInstructionNode extends BinaryInstruction_RI_DR {
|
|
623
|
+
type: "sdnsInstruction";
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* @summary SDSE(Sets Device Stalled)指令节点
|
|
629
|
+
*
|
|
630
|
+
* @desc 将指定设备设置为停滞状态。
|
|
631
|
+
* @elseif en
|
|
632
|
+
* @summary SDSE (Sets Device Stalled) instruction node
|
|
633
|
+
*
|
|
634
|
+
* @desc Sets the specified device to stalled state.
|
|
635
|
+
*
|
|
636
|
+
* @example
|
|
637
|
+
* ```typescript
|
|
638
|
+
* // SDSE r0 console1
|
|
639
|
+
* // 将 console1 设置为停滞状态
|
|
640
|
+
* ```
|
|
641
|
+
*
|
|
642
|
+
* @public
|
|
643
|
+
*/
|
|
644
|
+
export interface SdseInstructionNode extends BinaryInstruction_RI_DR {
|
|
645
|
+
type: "sdseInstruction";
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* @summary 含 Operand + Operand 操作数的二元指令基类
|
|
651
|
+
*
|
|
652
|
+
* @desc 两个操作数都为通用操作数类型。
|
|
653
|
+
* @elseif en
|
|
654
|
+
* @summary Base interface for binary instructions with Operand + Operand operands
|
|
655
|
+
*
|
|
656
|
+
* @desc Both operands are general operand types.
|
|
657
|
+
*
|
|
658
|
+
* @public
|
|
659
|
+
*/
|
|
660
|
+
interface BinaryInstruction_O_O extends BinaryInstruction {
|
|
661
|
+
operand1: OperandNode;
|
|
662
|
+
operand2: OperandNode;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* @summary POKE(写入内存)指令节点
|
|
668
|
+
*
|
|
669
|
+
* @desc 将数据写入到指定的内存地址。
|
|
670
|
+
* @elseif en
|
|
671
|
+
* @summary POKE instruction node
|
|
672
|
+
*
|
|
673
|
+
* @desc Writes data to a specified memory address.
|
|
674
|
+
*
|
|
675
|
+
* @example
|
|
676
|
+
* ```typescript
|
|
677
|
+
* // POKE r0 r1
|
|
678
|
+
* // 将 r0 的值写入地址 r1
|
|
679
|
+
* ```
|
|
680
|
+
*
|
|
681
|
+
* @public
|
|
682
|
+
*/
|
|
683
|
+
export interface PokeInstructionNode extends BinaryInstruction_O_O {
|
|
684
|
+
type: "pokeInstruction";
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* @summary BEQZ(Branch if EQual Zero)指令节点
|
|
690
|
+
*
|
|
691
|
+
* @desc 如果操作数等于零,则跳转到目标地址。
|
|
692
|
+
* @elseif en
|
|
693
|
+
* @summary BEQZ (Branch if EQual Zero) instruction node
|
|
694
|
+
*
|
|
695
|
+
* @desc Jumps to the target address if the operand equals zero.
|
|
696
|
+
*
|
|
697
|
+
* @example
|
|
698
|
+
* ```typescript
|
|
699
|
+
* // BEQZ r0 loop
|
|
700
|
+
* // 如果 r0 == 0,跳转到 loop
|
|
701
|
+
* ```
|
|
702
|
+
*
|
|
703
|
+
* @public
|
|
704
|
+
*/
|
|
705
|
+
export interface BeqzInstructionNode extends BinaryInstruction_O_O {
|
|
706
|
+
type: "beqzInstruction";
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* @summary BEQZAL(Branch if EQual Zero And Link)指令节点
|
|
712
|
+
*
|
|
713
|
+
* @desc 如果操作数等于零,则跳转到目标地址并保存返回地址。
|
|
714
|
+
* @elseif en
|
|
715
|
+
* @summary BEQZAL (Branch if EQual Zero And Link) instruction node
|
|
716
|
+
*
|
|
717
|
+
* @desc Jumps to the target address if the operand equals zero, and saves the return address.
|
|
718
|
+
*
|
|
719
|
+
* @example
|
|
720
|
+
* ```typescript
|
|
721
|
+
* // BEQZAL r0 loop
|
|
722
|
+
* // 如果 r0 == 0,跳转到 loop 并保存返回地址
|
|
723
|
+
* ```
|
|
724
|
+
*
|
|
725
|
+
* @public
|
|
726
|
+
*/
|
|
727
|
+
export interface BeqzalInstructionNode extends BinaryInstruction_O_O {
|
|
728
|
+
type: "beqzalInstruction";
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* @summary BNEZ(Branch if Not Equal Zero)指令节点
|
|
734
|
+
*
|
|
735
|
+
* @desc 如果操作数不等于零,则跳转到目标地址。
|
|
736
|
+
* @elseif en
|
|
737
|
+
* @summary BNEZ (Branch if Not Equal Zero) instruction node
|
|
738
|
+
*
|
|
739
|
+
* @desc Jumps to the target address if the operand does not equal zero.
|
|
740
|
+
*
|
|
741
|
+
* @example
|
|
742
|
+
* ```typescript
|
|
743
|
+
* // BNEZ r0 loop
|
|
744
|
+
* // 如果 r0 != 0,跳转到 loop
|
|
745
|
+
* ```
|
|
746
|
+
*
|
|
747
|
+
* @public
|
|
748
|
+
*/
|
|
749
|
+
export interface BnezInstructionNode extends BinaryInstruction_O_O {
|
|
750
|
+
type: "bnezInstruction";
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @summary BNEZAL(Branch if Not Equal Zero And Link)指令节点
|
|
756
|
+
*
|
|
757
|
+
* @desc 如果操作数不等于零,则跳转到目标地址并保存返回地址。
|
|
758
|
+
* @elseif en
|
|
759
|
+
* @summary BNEZAL (Branch if Not Equal Zero And Link) instruction node
|
|
760
|
+
*
|
|
761
|
+
* @desc Jumps to the target address if the operand does not equal zero, and saves the return address.
|
|
762
|
+
*
|
|
763
|
+
* @example
|
|
764
|
+
* ```typescript
|
|
765
|
+
* // BNEZAL r0 loop
|
|
766
|
+
* // 如果 r0 != 0,跳转到 loop 并保存返回地址
|
|
767
|
+
* ```
|
|
768
|
+
*
|
|
769
|
+
* @public
|
|
770
|
+
*/
|
|
771
|
+
export interface BnezalInstructionNode extends BinaryInstruction_O_O {
|
|
772
|
+
type: "bnezalInstruction";
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @summary BGEZ(Branch if Greater than or Equal Zero)指令节点
|
|
778
|
+
*
|
|
779
|
+
* @desc 如果操作数大于等于零,则跳转到目标地址。
|
|
780
|
+
* @elseif en
|
|
781
|
+
* @summary BGEZ (Branch if Greater than or Equal Zero) instruction node
|
|
782
|
+
*
|
|
783
|
+
* @desc Jumps to the target address if the operand is greater than or equal to zero.
|
|
784
|
+
*
|
|
785
|
+
* @example
|
|
786
|
+
* ```typescript
|
|
787
|
+
* // BGEZ r0 loop
|
|
788
|
+
* // 如果 r0 >= 0,跳转到 loop
|
|
789
|
+
* ```
|
|
790
|
+
*
|
|
791
|
+
* @public
|
|
792
|
+
*/
|
|
793
|
+
export interface BgezInstructionNode extends BinaryInstruction_O_O {
|
|
794
|
+
type: "bgezInstruction";
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* @summary BGEZAL(Branch if Greater than or Equal Zero And Link)指令节点
|
|
800
|
+
*
|
|
801
|
+
* @desc 如果操作数大于等于零,则跳转到目标地址并保存返回地址。
|
|
802
|
+
* @elseif en
|
|
803
|
+
* @summary BGEZAL (Branch if Greater than or Equal Zero And Link) instruction node
|
|
804
|
+
*
|
|
805
|
+
* @desc Jumps to the target address if the operand is greater than or equal to zero, and saves the return address.
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
* ```typescript
|
|
809
|
+
* // BGEZAL r0 loop
|
|
810
|
+
* // 如果 r0 >= 0,跳转到 loop 并保存返回地址
|
|
811
|
+
* ```
|
|
812
|
+
*
|
|
813
|
+
* @public
|
|
814
|
+
*/
|
|
815
|
+
export interface BgezalInstructionNode extends BinaryInstruction_O_O {
|
|
816
|
+
type: "bgezalInstruction";
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* @summary BGTZ(Branch if Greater Than Zero)指令节点
|
|
822
|
+
*
|
|
823
|
+
* @desc 如果操作数大于零,则跳转到目标地址。
|
|
824
|
+
* @elseif en
|
|
825
|
+
* @summary BGTZ (Branch if Greater Than Zero) instruction node
|
|
826
|
+
*
|
|
827
|
+
* @desc Jumps to the target address if the operand is greater than zero.
|
|
828
|
+
*
|
|
829
|
+
* @example
|
|
830
|
+
* ```typescript
|
|
831
|
+
* // BGTZ r0 loop
|
|
832
|
+
* // 如果 r0 > 0,跳转到 loop
|
|
833
|
+
* ```
|
|
834
|
+
*
|
|
835
|
+
* @public
|
|
836
|
+
*/
|
|
837
|
+
export interface BgtzInstructionNode extends BinaryInstruction_O_O {
|
|
838
|
+
type: "bgtzInstruction";
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* @summary BGTZAL(Branch if Greater Than Zero And Link)指令节点
|
|
844
|
+
*
|
|
845
|
+
* @desc 如果操作数大于零,则跳转到目标地址并保存返回地址。
|
|
846
|
+
* @elseif en
|
|
847
|
+
* @summary BGTZAL (Branch if Greater Than Zero And Link) instruction node
|
|
848
|
+
*
|
|
849
|
+
* @desc Jumps to the target address if the operand is greater than zero, and saves the return address.
|
|
850
|
+
*
|
|
851
|
+
* @example
|
|
852
|
+
* ```typescript
|
|
853
|
+
* // BGTZAL r0 loop
|
|
854
|
+
* // 如果 r0 > 0,跳转到 loop 并保存返回地址
|
|
855
|
+
* ```
|
|
856
|
+
*
|
|
857
|
+
* @public
|
|
858
|
+
*/
|
|
859
|
+
export interface BgtzalInstructionNode extends BinaryInstruction_O_O {
|
|
860
|
+
type: "bgtzalInstruction";
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* @summary BLEZ(Branch if Less than or Equal Zero)指令节点
|
|
866
|
+
*
|
|
867
|
+
* @desc 如果操作数小于等于零,则跳转到目标地址。
|
|
868
|
+
* @elseif en
|
|
869
|
+
* @summary BLEZ (Branch if Less than or Equal Zero) instruction node
|
|
870
|
+
*
|
|
871
|
+
* @desc Jumps to the target address if the operand is less than or equal to zero.
|
|
872
|
+
*
|
|
873
|
+
* @example
|
|
874
|
+
* ```typescript
|
|
875
|
+
* // BLEZ r0 loop
|
|
876
|
+
* // 如果 r0 <= 0,跳转到 loop
|
|
877
|
+
* ```
|
|
878
|
+
*
|
|
879
|
+
* @public
|
|
880
|
+
*/
|
|
881
|
+
export interface BlezInstructionNode extends BinaryInstruction_O_O {
|
|
882
|
+
type: "blezInstruction";
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* @summary BLEZAL(Branch if Less than or Equal Zero And Link)指令节点
|
|
888
|
+
*
|
|
889
|
+
* @desc 如果操作数小于等于零,则跳转到目标地址并保存返回地址。
|
|
890
|
+
* @elseif en
|
|
891
|
+
* @summary BLEZAL (Branch if Less than or Equal Zero And Link) instruction node
|
|
892
|
+
*
|
|
893
|
+
* @desc Jumps to the target address if the operand is less than or equal to zero, and saves the return address.
|
|
894
|
+
*
|
|
895
|
+
* @example
|
|
896
|
+
* ```typescript
|
|
897
|
+
* // BLEZAL r0 loop
|
|
898
|
+
* // 如果 r0 <= 0,跳转到 loop 并保存返回地址
|
|
899
|
+
* ```
|
|
900
|
+
*
|
|
901
|
+
* @public
|
|
902
|
+
*/
|
|
903
|
+
export interface BlezalInstructionNode extends BinaryInstruction_O_O {
|
|
904
|
+
type: "blezalInstruction";
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* @summary BLTZ(Branch if Less Than Zero)指令节点
|
|
910
|
+
*
|
|
911
|
+
* @desc 如果操作数小于零,则跳转到目标地址。
|
|
912
|
+
* @elseif en
|
|
913
|
+
* @summary BLTZ (Branch if Less Than Zero) instruction node
|
|
914
|
+
*
|
|
915
|
+
* @desc Jumps to the target address if the operand is less than zero.
|
|
916
|
+
*
|
|
917
|
+
* @example
|
|
918
|
+
* ```typescript
|
|
919
|
+
* // BLTZ r0 loop
|
|
920
|
+
* // 如果 r0 < 0,跳转到 loop
|
|
921
|
+
* ```
|
|
922
|
+
*
|
|
923
|
+
* @public
|
|
924
|
+
*/
|
|
925
|
+
export interface BltzInstructionNode extends BinaryInstruction_O_O {
|
|
926
|
+
type: "bltzInstruction";
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* @summary BLTZAL(Branch if Less Than Zero And Link)指令节点
|
|
932
|
+
*
|
|
933
|
+
* @desc 如果操作数小于零,则跳转到目标地址并保存返回地址。
|
|
934
|
+
* @elseif en
|
|
935
|
+
* @summary BLTZAL (Branch if Less Than Zero And Link) instruction node
|
|
936
|
+
*
|
|
937
|
+
* @desc Jumps to the target address if the operand is less than zero, and saves the return address.
|
|
938
|
+
*
|
|
939
|
+
* @example
|
|
940
|
+
* ```typescript
|
|
941
|
+
* // BLTZAL r0 loop
|
|
942
|
+
* // 如果 r0 < 0,跳转到 loop 并保存返回地址
|
|
943
|
+
* ```
|
|
944
|
+
*
|
|
945
|
+
* @public
|
|
946
|
+
*/
|
|
947
|
+
export interface BltzalInstructionNode extends BinaryInstruction_O_O {
|
|
948
|
+
type: "bltzalInstruction";
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* @summary BNAN(Branch if Not-A-Number)指令节点
|
|
954
|
+
*
|
|
955
|
+
* @desc 如果操作数是 NaN,则跳转到目标地址。
|
|
956
|
+
* @elseif en
|
|
957
|
+
* @summary BNAN (Branch if Not-A-Number) instruction node
|
|
958
|
+
*
|
|
959
|
+
* @desc Jumps to the target address if the operand is NaN.
|
|
960
|
+
*
|
|
961
|
+
* @example
|
|
962
|
+
* ```typescript
|
|
963
|
+
* // BNAN r0 loop
|
|
964
|
+
* // 如果 r0 是 NaN,跳转到 loop
|
|
965
|
+
* ```
|
|
966
|
+
*
|
|
967
|
+
* @public
|
|
968
|
+
*/
|
|
969
|
+
export interface BnanInstructionNode extends BinaryInstruction_O_O {
|
|
970
|
+
type: "bnanInstruction";
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* @summary BNANZ(Branch if Not-A-Number Non-Zero)指令节点
|
|
976
|
+
*
|
|
977
|
+
* @desc 如果操作数是 NaN 且非零,则跳转到目标地址。
|
|
978
|
+
* @elseif en
|
|
979
|
+
* @summary BNANZ (Branch if Not-A-Number Non-Zero) instruction node
|
|
980
|
+
*
|
|
981
|
+
* @desc Jumps to the target address if the operand is NaN and non-zero.
|
|
982
|
+
*
|
|
983
|
+
* @example
|
|
984
|
+
* ```typescript
|
|
985
|
+
* // BNANZ r0 loop
|
|
986
|
+
* // 如果 r0 是 NaN 且非零,跳转到 loop
|
|
987
|
+
* ```
|
|
988
|
+
*
|
|
989
|
+
* @public
|
|
990
|
+
*/
|
|
991
|
+
export interface BnanzInstructionNode extends BinaryInstruction_O_O {
|
|
992
|
+
type: "bnanzInstruction";
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* @summary BREQZ(Branches Register if EQual Zero)指令节点
|
|
998
|
+
*
|
|
999
|
+
* @desc 如果操作数等于零,则跳转到寄存器中存储的地址。
|
|
1000
|
+
* @elseif en
|
|
1001
|
+
* @summary BREQZ (Branches Register if EQual Zero) instruction node
|
|
1002
|
+
*
|
|
1003
|
+
* @desc Jumps to the address stored in the register if the operand equals zero.
|
|
1004
|
+
*
|
|
1005
|
+
* @example
|
|
1006
|
+
* ```typescript
|
|
1007
|
+
* // BREQZ r0 r1
|
|
1008
|
+
* // 如果 r0 == 0,跳转到 r1 存储的地址
|
|
1009
|
+
* ```
|
|
1010
|
+
*
|
|
1011
|
+
* @public
|
|
1012
|
+
*/
|
|
1013
|
+
export interface BreqzInstructionNode extends BinaryInstruction_O_O {
|
|
1014
|
+
type: "breqzInstruction";
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* @summary BRNZ(Branches Register if Not Zero)指令节点
|
|
1020
|
+
*
|
|
1021
|
+
* @desc 如果操作数不等于零,则跳转到寄存器中存储的地址。
|
|
1022
|
+
* @elseif en
|
|
1023
|
+
* @summary BRNZ (Branches Register if Not Zero) instruction node
|
|
1024
|
+
*
|
|
1025
|
+
* @desc Jumps to the address stored in the register if the operand does not equal zero.
|
|
1026
|
+
*
|
|
1027
|
+
* @example
|
|
1028
|
+
* ```typescript
|
|
1029
|
+
* // BRNZ r0 r1
|
|
1030
|
+
* // 如果 r0 != 0,跳转到 r1 存储的地址
|
|
1031
|
+
* ```
|
|
1032
|
+
*
|
|
1033
|
+
* @public
|
|
1034
|
+
*/
|
|
1035
|
+
export interface BrnzInstructionNode extends BinaryInstruction_O_O {
|
|
1036
|
+
type: "brnzInstruction";
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* @summary BRGEZ(Branches Register if Greater than or Equal Zero)指令节点
|
|
1042
|
+
*
|
|
1043
|
+
* @desc 如果操作数大于等于零,则跳转到寄存器中存储的地址。
|
|
1044
|
+
* @elseif en
|
|
1045
|
+
* @summary BRGEZ (Branches Register if Greater than or Equal Zero) instruction node
|
|
1046
|
+
*
|
|
1047
|
+
* @desc Jumps to the address stored in the register if the operand is greater than or equal to zero.
|
|
1048
|
+
*
|
|
1049
|
+
* @example
|
|
1050
|
+
* ```typescript
|
|
1051
|
+
* // BRGEZ r0 r1
|
|
1052
|
+
* // 如果 r0 >= 0,跳转到 r1 存储的地址
|
|
1053
|
+
* ```
|
|
1054
|
+
*
|
|
1055
|
+
* @public
|
|
1056
|
+
*/
|
|
1057
|
+
export interface BrgezInstructionNode extends BinaryInstruction_O_O {
|
|
1058
|
+
type: "brgezInstruction";
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @summary BRGTZ(Branches Register if Greater Than Zero)指令节点
|
|
1064
|
+
*
|
|
1065
|
+
* @desc 如果操作数大于零,则跳转到寄存器中存储的地址。
|
|
1066
|
+
* @elseif en
|
|
1067
|
+
* @summary BRGTZ (Branches Register if Greater Than Zero) instruction node
|
|
1068
|
+
*
|
|
1069
|
+
* @desc Jumps to the address stored in the register if the operand is greater than zero.
|
|
1070
|
+
*
|
|
1071
|
+
* @example
|
|
1072
|
+
* ```typescript
|
|
1073
|
+
* // BRGTZ r0 r1
|
|
1074
|
+
* // 如果 r0 > 0,跳转到 r1 存储的地址
|
|
1075
|
+
* ```
|
|
1076
|
+
*
|
|
1077
|
+
* @public
|
|
1078
|
+
*/
|
|
1079
|
+
export interface BrgtzInstructionNode extends BinaryInstruction_O_O {
|
|
1080
|
+
type: "brgtzInstruction";
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* @summary BRLEZ(Branches Register if Less than or Equal Zero)指令节点
|
|
1086
|
+
*
|
|
1087
|
+
* @desc 如果操作数小于等于零,则跳转到寄存器中存储的地址。
|
|
1088
|
+
* @elseif en
|
|
1089
|
+
* @summary BRLEZ (Branches Register if Less than or Equal Zero) instruction node
|
|
1090
|
+
*
|
|
1091
|
+
* @desc Jumps to the address stored in the register if the operand is less than or equal to zero.
|
|
1092
|
+
*
|
|
1093
|
+
* @example
|
|
1094
|
+
* ```typescript
|
|
1095
|
+
* // BRLEZ r0 r1
|
|
1096
|
+
* // 如果 r0 <= 0,跳转到 r1 存储的地址
|
|
1097
|
+
* ```
|
|
1098
|
+
*
|
|
1099
|
+
* @public
|
|
1100
|
+
*/
|
|
1101
|
+
export interface BrlezInstructionNode extends BinaryInstruction_O_O {
|
|
1102
|
+
type: "brlezInstruction";
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* @summary BRLTZ(Branches Register if Less Than Zero)指令节点
|
|
1108
|
+
*
|
|
1109
|
+
* @desc 如果操作数小于零,则跳转到寄存器中存储的地址。
|
|
1110
|
+
* @elseif en
|
|
1111
|
+
* @summary BRLTZ (Branches Register if Less Than Zero) instruction node
|
|
1112
|
+
*
|
|
1113
|
+
* @desc Jumps to the address stored in the register if the operand is less than zero.
|
|
1114
|
+
*
|
|
1115
|
+
* @example
|
|
1116
|
+
* ```typescript
|
|
1117
|
+
* // BRLTZ r0 r1
|
|
1118
|
+
* // 如果 r0 < 0,跳转到 r1 存储的地址
|
|
1119
|
+
* ```
|
|
1120
|
+
*
|
|
1121
|
+
* @public
|
|
1122
|
+
*/
|
|
1123
|
+
export interface BrltzInstructionNode extends BinaryInstruction_O_O {
|
|
1124
|
+
type: "brltzInstruction";
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* @summary BRNAN(Branches Register if Not-A-Number)指令节点
|
|
1130
|
+
*
|
|
1131
|
+
* @desc 如果操作数是 NaN,则跳转到寄存器中存储的地址。
|
|
1132
|
+
* @elseif en
|
|
1133
|
+
* @summary BRNAN (Branches Register if Not-A-Number) instruction node
|
|
1134
|
+
*
|
|
1135
|
+
* @desc Jumps to the address stored in the register if the operand is NaN.
|
|
1136
|
+
*
|
|
1137
|
+
* @example
|
|
1138
|
+
* ```typescript
|
|
1139
|
+
* // BRNAN r0 r1
|
|
1140
|
+
* // 如果 r0 是 NaN,跳转到 r1 存储的地址
|
|
1141
|
+
* ```
|
|
1142
|
+
*
|
|
1143
|
+
* @public
|
|
1144
|
+
*/
|
|
1145
|
+
export interface BrnanInstructionNode extends BinaryInstruction_O_O {
|
|
1146
|
+
type: "brnanInstruction";
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* @summary 二元指令联合类型
|
|
1152
|
+
*
|
|
1153
|
+
* @desc 包含所有二元指令类型的联合,包括可能的错误节点。
|
|
1154
|
+
* @elseif en
|
|
1155
|
+
* @summary Binary instruction union type
|
|
1156
|
+
*
|
|
1157
|
+
* @desc Union of all binary instruction types, including possible error nodes.
|
|
1158
|
+
*
|
|
1159
|
+
* @public
|
|
1160
|
+
*/
|
|
1161
|
+
export type BinaryInstructionNode =
|
|
1162
|
+
| AbsInstructionNode
|
|
1163
|
+
| AcosInstructionNode
|
|
1164
|
+
| AsinInstructionNode
|
|
1165
|
+
| AtanInstructionNode
|
|
1166
|
+
| CeilInstructionNode
|
|
1167
|
+
| CosInstructionNode
|
|
1168
|
+
| ExpInstructionNode
|
|
1169
|
+
| FloorInstructionNode
|
|
1170
|
+
| LogInstructionNode
|
|
1171
|
+
| RoundInstructionNode
|
|
1172
|
+
| SinInstructionNode
|
|
1173
|
+
| SqrtInstructionNode
|
|
1174
|
+
| TanInstructionNode
|
|
1175
|
+
| TruncInstructionNode
|
|
1176
|
+
| NotInstructionNode
|
|
1177
|
+
| MoveInstructionNode
|
|
1178
|
+
| SubInstructionNode
|
|
1179
|
+
| BdnsInstructionNode
|
|
1180
|
+
| BdnsalInstructionNode
|
|
1181
|
+
| BdseInstructionNode
|
|
1182
|
+
| BdsealInstructionNode
|
|
1183
|
+
| BrdnsInstructionNode
|
|
1184
|
+
| BrdseInstructionNode
|
|
1185
|
+
| SdnsInstructionNode
|
|
1186
|
+
| SdseInstructionNode
|
|
1187
|
+
| PokeInstructionNode
|
|
1188
|
+
| BeqzInstructionNode
|
|
1189
|
+
| BeqzalInstructionNode
|
|
1190
|
+
| BnezInstructionNode
|
|
1191
|
+
| BnezalInstructionNode
|
|
1192
|
+
| BgezInstructionNode
|
|
1193
|
+
| BgezalInstructionNode
|
|
1194
|
+
| BgtzInstructionNode
|
|
1195
|
+
| BgtzalInstructionNode
|
|
1196
|
+
| BlezInstructionNode
|
|
1197
|
+
| BlezalInstructionNode
|
|
1198
|
+
| BltzInstructionNode
|
|
1199
|
+
| BltzalInstructionNode
|
|
1200
|
+
| BnanInstructionNode
|
|
1201
|
+
| BnanzInstructionNode
|
|
1202
|
+
| BreqzInstructionNode
|
|
1203
|
+
| BrnzInstructionNode
|
|
1204
|
+
| BrgezInstructionNode
|
|
1205
|
+
| BrgtzInstructionNode
|
|
1206
|
+
| BrlezInstructionNode
|
|
1207
|
+
| BrltzInstructionNode
|
|
1208
|
+
| BrnanInstructionNode
|
|
1209
|
+
| ErrorNode;
|