-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.js
75 lines (75 loc) · 1.03 KB
/
const.js
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
WebCPU.maxDebugStringLength = 0xffff;
WebCPU.pType = {
VPtr :0x01,
SINT8 :0x02, //8bitの符号付き, いわゆる signed char.
UINT8 :0x03,
SINT16 :0x04, //16bitの符号付き, いわゆる short.
UINT16 :0x05,
SINT32 :0x06,
UINT32 :0x07,
SINT4 :0x08,
UINT4 :0x09,
SINT2 :0x0a,
UINT2 :0x0b,
SINT1 :0x0c, //代入できるのは0か-1のみ.
UINT1 :0x0d,
SINT12 :0x0e,
UINT12 :0x0f,
SINT20 :0x10,
UINT20 :0x11,
SINT24 :0x12,
UINT24 :0x13,
SINT28 :0x14,
UINT28 :0x15,
};
WebCPU.opcode = {
NOP: 0x00,
LB: 0x01,
LIMM: 0x02,
PLIMM: 0x03,
CND: 0x04,
//
LMEM: 0x08,
SMEM: 0x09,
//
PADD: 0x0E,
PDIF: 0x0F,
//
CP: 0x10,
OR: 0x10,
XOR: 0x11,
AND: 0x12,
//
ADD: 0x14,
SUB: 0x15,
MUL: 0x16,
//
SHL: 0x18,
SAR: 0x19,
//
DIV: 0x1A,
MOD: 0x1B,
//
PCP: 0x1E,
//
CMPE: 0x20,
CMPNE: 0x21,
CMPL: 0x22,
CMPGE: 0x23,
CMPLE: 0x24,
CMPG: 0x25,
TSTZ: 0x26,
TSTNZ: 0x27,
PCMPE: 0x28,
PCMPNE: 0x29,
PCMPL: 0x2A,
PCMPGE: 0x2B,
PCMPLE: 0x2C,
PCMPG: 0x2D,
//
MALLOC: 0x32,
//
DATA: 0x34,
//
REMARK: 0xFE,
};