author | icculus |
Sat, 09 Feb 2008 18:39:58 -0500 | |
branch | trunk |
changeset 4 | e0b2c5b7210c |
parent 2 | c37210f5e87b |
child 6 | 89bff6a08fca |
permissions | -rw-r--r-- |
1 | 1 |
#include <stdio.h> |
2 |
#include <stdlib.h> |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
3 |
#include <stdint.h> |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
4 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
5 |
#define END_OF_STREAM (-2) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
6 |
//#define FAIL(x) (-1) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
7 |
static int FAIL(const char *reason) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
8 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
9 |
printf("%s FAIL.\n", reason); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
10 |
return -1; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
11 |
} // FAIL |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
12 |
|
1 | 13 |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
14 |
typedef unsigned int uint; // this is a printf() helper. don't use for code. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
15 |
typedef uint8_t uint8; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
16 |
typedef uint32_t uint32; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
17 |
|
4 | 18 |
#if ((defined __GNUC__) && (defined __POWERPC__)) |
19 |
static inline uint32 SWAP32(uint32 x) |
|
20 |
{ |
|
21 |
__asm__ __volatile__("lwbrx %0,0,%1" : "=r" (x) : "r" (&x)); |
|
22 |
return x; |
|
23 |
} // SWAP32 |
|
24 |
#elif defined(__POWERPC__) |
|
25 |
static inline uint32 SWAP32(uint32 x) |
|
26 |
{ |
|
27 |
return ( (((x) >> 24) & 0x000000FF) | (((x) >> 8) & 0x0000FF00) | |
|
28 |
(((x) << 8) & 0x00FF0000) | (((x) << 24) & 0xFF000000) ); |
|
29 |
} // SWAP32 |
|
30 |
#else |
|
31 |
# define SWAP32(x) (x) |
|
32 |
#endif |
|
33 |
||
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
34 |
typedef int (*parse_instruction_function)(const uint32 *argtokens); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
35 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
36 |
static int parse_NOP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
37 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
38 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
39 |
} // parse_NOP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
40 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
41 |
static int parse_MOV(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
42 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
43 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
44 |
} // parse_MOV |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
45 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
46 |
static int parse_ADD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
47 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
48 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
49 |
} // parse_ADD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
50 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
51 |
static int parse_SUB(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
52 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
53 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
54 |
} // parse_SUB |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
55 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
56 |
static int parse_MAD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
57 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
58 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
59 |
} // parse_MAD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
60 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
61 |
static int parse_MUL(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
62 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
63 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
64 |
} // parse_MUL |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
65 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
66 |
static int parse_RCP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
67 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
68 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
69 |
} // parse_RCP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
70 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
71 |
static int parse_RSQ(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
72 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
73 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
74 |
} // parse_RSQ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
75 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
76 |
static int parse_DP3(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
77 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
78 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
79 |
} // parse_DP3 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
80 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
81 |
static int parse_DP4(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
82 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
83 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
84 |
} // parse_DP4 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
85 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
86 |
static int parse_MIN(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
87 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
88 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
89 |
} // parse_MIN |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
90 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
91 |
static int parse_MAX(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
92 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
93 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
94 |
} // parse_MAX |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
95 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
96 |
static int parse_SLT(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
97 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
98 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
99 |
} // parse_SLT |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
100 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
101 |
static int parse_SGE(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
102 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
103 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
104 |
} // parse_SGE |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
105 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
106 |
static int parse_EXP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
107 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
108 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
109 |
} // parse_EXP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
110 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
111 |
static int parse_LOG(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
112 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
113 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
114 |
} // parse_LOG |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
115 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
116 |
static int parse_LIT(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
117 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
118 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
119 |
} // parse_LIT |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
120 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
121 |
static int parse_DST(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
122 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
123 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
124 |
} // parse_DST |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
125 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
126 |
static int parse_LRP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
127 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
128 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
129 |
} // parse_LRP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
130 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
131 |
static int parse_FRC(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
132 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
133 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
134 |
} // parse_FRC |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
135 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
136 |
static int parse_M4X4(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
137 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
138 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
139 |
} // parse_M4X4 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
140 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
141 |
static int parse_M4X3(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
142 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
143 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
144 |
} // parse_M4X3 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
145 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
146 |
static int parse_M3X4(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
147 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
148 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
149 |
} // parse_M3X4 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
150 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
151 |
static int parse_M3X3(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
152 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
153 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
154 |
} // parse_M3X3 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
155 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
156 |
static int parse_M3X2(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
157 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
158 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
159 |
} // parse_M3X2 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
160 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
161 |
static int parse_CALL(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
162 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
163 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
164 |
} // parse_CALL |
1 | 165 |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
166 |
static int parse_CALLNZ(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
167 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
168 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
169 |
} // parse_CALLNZ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
170 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
171 |
static int parse_LOOP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
172 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
173 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
174 |
} // parse_LOOP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
175 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
176 |
static int parse_RET(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
177 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
178 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
179 |
} // parse_RET |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
180 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
181 |
static int parse_ENDLOOP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
182 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
183 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
184 |
} // parse_ENDLOOP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
185 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
186 |
static int parse_LABEL(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
187 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
188 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
189 |
} // parse_LABEL |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
190 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
191 |
static int parse_DCL(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
192 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
193 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
194 |
} // parse_DCL |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
195 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
196 |
static int parse_POW(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
197 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
198 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
199 |
} // parse_POW |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
200 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
201 |
static int parse_CRS(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
202 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
203 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
204 |
} // parse_CRS |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
205 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
206 |
static int parse_SGN(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
207 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
208 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
209 |
} // parse_SGN |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
210 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
211 |
static int parse_ABS(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
212 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
213 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
214 |
} // parse_ABS |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
215 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
216 |
static int parse_NRM(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
217 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
218 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
219 |
} // parse_NRM |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
220 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
221 |
static int parse_SINCOS(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
222 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
223 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
224 |
} // parse_SINCOS |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
225 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
226 |
static int parse_REP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
227 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
228 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
229 |
} // parse_REP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
230 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
231 |
static int parse_ENDREP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
232 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
233 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
234 |
} // parse_ENDREP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
235 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
236 |
static int parse_IF(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
237 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
238 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
239 |
} // parse_IF |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
240 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
241 |
static int parse_IFC(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
242 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
243 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
244 |
} // parse_IFC |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
245 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
246 |
static int parse_ELSE(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
247 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
248 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
249 |
} // parse_ELSE |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
250 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
251 |
static int parse_ENDIF(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
252 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
253 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
254 |
} // parse_ENDIF |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
255 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
256 |
static int parse_BREAK(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
257 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
258 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
259 |
} // parse_BREAK |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
260 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
261 |
static int parse_BREAKC(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
262 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
263 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
264 |
} // parse_BREAKC |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
265 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
266 |
static int parse_MOVA(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
267 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
268 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
269 |
} // parse_MOVA |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
270 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
271 |
static int parse_DEFB(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
272 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
273 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
274 |
} // parse_DEFB |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
275 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
276 |
static int parse_DEFI(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
277 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
278 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
279 |
} // parse_DEFI |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
280 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
281 |
static int parse_TEXCOORD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
282 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
283 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
284 |
} // parse_TEXCOORD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
285 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
286 |
static int parse_TEXKILL(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
287 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
288 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
289 |
} // parse_TEXKILL |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
290 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
291 |
static int parse_TEX(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
292 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
293 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
294 |
} // parse_TEX |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
295 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
296 |
static int parse_TEXBEM(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
297 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
298 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
299 |
} // parse_TEXBEM |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
300 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
301 |
static int parse_TEXBEML(const uint32 *argtokens) |
1 | 302 |
{ |
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
303 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
304 |
} // parse_TEXBEML |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
305 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
306 |
static int parse_TEXREG2AR(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
307 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
308 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
309 |
} // parse_TEXREG2AR |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
310 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
311 |
static int parse_TEXREG2GB(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
312 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
313 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
314 |
} // parse_TEXREG2GB |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
315 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
316 |
static int parse_TEXM3X2PAD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
317 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
318 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
319 |
} // parse_TEXM3X2PAD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
320 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
321 |
static int parse_TEXM3X2TEX(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
322 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
323 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
324 |
} // parse_TEXM3X2TEX |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
325 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
326 |
static int parse_TEXM3X3PAD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
327 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
328 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
329 |
} // parse_TEXM3X3PAD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
330 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
331 |
static int parse_TEXM3X3TEX(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
332 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
333 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
334 |
} // parse_TEXM3X3TEX |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
335 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
336 |
static int parse_RESERVED0(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
337 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
338 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
339 |
} // parse_RESERVED0 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
340 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
341 |
static int parse_TEXM3X3SPEC(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
342 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
343 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
344 |
} // parse_TEXM3X3SPEC |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
345 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
346 |
static int parse_TEXM3X3VSPEC(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
347 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
348 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
349 |
} // parse_TEXM3X3VSPEC |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
350 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
351 |
static int parse_EXPP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
352 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
353 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
354 |
} // parse_EXPP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
355 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
356 |
static int parse_LOGP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
357 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
358 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
359 |
} // parse_LOGP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
360 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
361 |
static int parse_CND(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
362 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
363 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
364 |
} // parse_CND |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
365 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
366 |
static int parse_DEF(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
367 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
368 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
369 |
} // parse_DEF |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
370 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
371 |
static int parse_TEXREG2RGB(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
372 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
373 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
374 |
} // parse_TEXREG2RGB |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
375 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
376 |
static int parse_TEXDP3TEX(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
377 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
378 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
379 |
} // parse_TEXDP3TEX |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
380 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
381 |
static int parse_TEXM3X2DEPTH(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
382 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
383 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
384 |
} // parse_TEXM3X2DEPTH |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
385 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
386 |
static int parse_TEXDP3(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
387 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
388 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
389 |
} // parse_TEXDP3 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
390 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
391 |
static int parse_TEXM3X3(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
392 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
393 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
394 |
} // parse_TEXM3X3 |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
395 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
396 |
static int parse_TEXDEPTH(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
397 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
398 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
399 |
} // parse_TEXDEPTH |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
400 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
401 |
static int parse_CMP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
402 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
403 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
404 |
} // parse_CMP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
405 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
406 |
static int parse_BEM(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
407 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
408 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
409 |
} // parse_BEM |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
410 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
411 |
static int parse_DP2ADD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
412 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
413 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
414 |
} // parse_DP2ADD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
415 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
416 |
static int parse_DSX(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
417 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
418 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
419 |
} // parse_DSX |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
420 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
421 |
static int parse_DSY(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
422 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
423 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
424 |
} // parse_DSY |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
425 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
426 |
static int parse_TEXLDD(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
427 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
428 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
429 |
} // parse_TEXLDD |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
430 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
431 |
static int parse_SETP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
432 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
433 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
434 |
} // parse_SETP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
435 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
436 |
static int parse_TEXLDL(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
437 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
438 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
439 |
} // parse_TEXLDL |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
440 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
441 |
static int parse_BREAKP(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
442 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
443 |
return FAIL("unimplemented."); // !!! FIXME |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
444 |
} // parse_BREAKP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
445 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
446 |
static int parse_RESERVED(const uint32 *argtokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
447 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
448 |
return FAIL("Tried to use RESERVED opcode."); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
449 |
} // parse_BREAKP |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
450 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
451 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
452 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
453 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
454 |
typedef struct |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
455 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
456 |
const char *opcode_string; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
457 |
int arg_tokens; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
458 |
//uint32 shader_requirements; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
459 |
parse_instruction_function parser; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
460 |
} Instruction; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
461 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
462 |
// These have to be in the right order! This array is indexed by the value |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
463 |
// of the instruction token. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
464 |
static Instruction instructions[] = { |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
465 |
#define INSTRUCTION(op, args) { #op, args, parse_##op } |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
466 |
INSTRUCTION(NOP, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
467 |
INSTRUCTION(MOV, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
468 |
INSTRUCTION(ADD, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
469 |
INSTRUCTION(SUB, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
470 |
INSTRUCTION(MAD, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
471 |
INSTRUCTION(MUL, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
472 |
INSTRUCTION(RCP, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
473 |
INSTRUCTION(RSQ, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
474 |
INSTRUCTION(DP3, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
475 |
INSTRUCTION(DP4, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
476 |
INSTRUCTION(MIN, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
477 |
INSTRUCTION(MAX, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
478 |
INSTRUCTION(SLT, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
479 |
INSTRUCTION(SGE, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
480 |
INSTRUCTION(EXP, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
481 |
INSTRUCTION(LOG, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
482 |
INSTRUCTION(LIT, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
483 |
INSTRUCTION(DST, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
484 |
INSTRUCTION(LRP, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
485 |
INSTRUCTION(FRC, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
486 |
INSTRUCTION(M4X4, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
487 |
INSTRUCTION(M4X3, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
488 |
INSTRUCTION(M3X4, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
489 |
INSTRUCTION(M3X3, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
490 |
INSTRUCTION(M3X2, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
491 |
INSTRUCTION(CALL, 1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
492 |
INSTRUCTION(CALLNZ, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
493 |
INSTRUCTION(LOOP, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
494 |
INSTRUCTION(RET, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
495 |
INSTRUCTION(ENDLOOP, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
496 |
INSTRUCTION(LABEL, 1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
497 |
INSTRUCTION(DCL, -1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
498 |
INSTRUCTION(POW, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
499 |
INSTRUCTION(CRS, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
500 |
INSTRUCTION(SGN, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
501 |
INSTRUCTION(ABS, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
502 |
INSTRUCTION(NRM, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
503 |
INSTRUCTION(SINCOS, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
504 |
INSTRUCTION(REP, 1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
505 |
INSTRUCTION(ENDREP, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
506 |
INSTRUCTION(IF, 1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
507 |
INSTRUCTION(IFC, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
508 |
INSTRUCTION(ELSE, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
509 |
INSTRUCTION(ENDIF, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
510 |
INSTRUCTION(BREAK, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
511 |
INSTRUCTION(BREAKC, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
512 |
INSTRUCTION(MOVA, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
513 |
INSTRUCTION(DEFB, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
514 |
INSTRUCTION(DEFI, 5), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
515 |
INSTRUCTION(TEXCOORD, -1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
516 |
INSTRUCTION(TEXKILL, 1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
517 |
INSTRUCTION(TEX, -1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
518 |
INSTRUCTION(TEXBEM, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
519 |
INSTRUCTION(TEXBEML, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
520 |
INSTRUCTION(TEXREG2AR, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
521 |
INSTRUCTION(TEXREG2GB, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
522 |
INSTRUCTION(TEXM3X2PAD, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
523 |
INSTRUCTION(TEXM3X2TEX, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
524 |
INSTRUCTION(TEXM3X3PAD, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
525 |
INSTRUCTION(TEXM3X3TEX, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
526 |
INSTRUCTION(RESERVED, 0), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
527 |
INSTRUCTION(TEXM3X3SPEC, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
528 |
INSTRUCTION(TEXM3X3VSPEC, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
529 |
INSTRUCTION(EXPP, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
530 |
INSTRUCTION(LOGP, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
531 |
INSTRUCTION(CND, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
532 |
INSTRUCTION(DEF, 5), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
533 |
INSTRUCTION(TEXREG2RGB, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
534 |
INSTRUCTION(TEXDP3TEX, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
535 |
INSTRUCTION(TEXM3X2DEPTH, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
536 |
INSTRUCTION(TEXDP3, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
537 |
INSTRUCTION(TEXM3X3, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
538 |
INSTRUCTION(TEXDEPTH, 1), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
539 |
INSTRUCTION(CMP, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
540 |
INSTRUCTION(BEM, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
541 |
INSTRUCTION(DP2ADD, 4), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
542 |
INSTRUCTION(DSX, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
543 |
INSTRUCTION(DSY, 2), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
544 |
INSTRUCTION(TEXLDD, 5), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
545 |
INSTRUCTION(SETP, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
546 |
INSTRUCTION(TEXLDL, 3), |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
547 |
INSTRUCTION(BREAKP, 1), // src |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
548 |
#undef INSTRUCTION |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
549 |
}; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
550 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
551 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
552 |
static int parse_instruction_token(const uint32 *tokens, const uint32 tokencount) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
553 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
554 |
const uint32 token = SWAP32(*tokens); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
555 |
const uint32 opcode = (token & 0xFFFF); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
556 |
const uint32 controls = ((token >> 16) & 0xFF); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
557 |
const uint32 insttoks = ((token >> 24) & 0x0F); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
558 |
const int coissue = (token & 0x40000000) ? 1 : 0; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
559 |
const int predicated = (token & 0x10000000) ? 1 : 0; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
560 |
const Instruction *instruction = &instructions[opcode]; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
561 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
562 |
if ( opcode >= (sizeof (instructions) / sizeof (instructions[0])) ) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
563 |
return 0; // not an instruction token, or just not handled here. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
564 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
565 |
if ((token & 0x80000000) != 0) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
566 |
return FAIL("instruction token high bit must be zero."); // so says msdn. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
567 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
568 |
printf("%s\n", instruction->opcode_string); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
569 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
570 |
if (instruction->arg_tokens >= 0) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
571 |
{ |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
572 |
if (instruction->arg_tokens != insttoks) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
573 |
return FAIL("unexpected number of tokens for instruction."); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
574 |
else if (tokencount <= instruction->arg_tokens) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
575 |
return FAIL("not enough tokens left in shader for instruction."); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
576 |
} // if |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
577 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
578 |
return insttoks + 1; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
579 |
// return instruction->parser(tokens + 1); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
580 |
} // parse_instruction_token |
1 | 581 |
|
582 |
||
583 |
static int parse_version_token(const uint32 *tokens, const uint32 tokencount) |
|
584 |
{ |
|
585 |
if (tokencount == 0) |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
586 |
return FAIL("Expected version token, got none at all."); |
1 | 587 |
|
588 |
const uint32 token = SWAP32(*tokens); |
|
589 |
const uint32 shadertype = ((token >> 16) & 0xFFFF); |
|
590 |
const uint32 major = ((token >> 8) & 0xFF); |
|
591 |
const uint32 minor = (token & 0xFF); |
|
592 |
||
593 |
if (shadertype == 0xFFFF) |
|
594 |
printf("Pixel shader\n"); |
|
595 |
else if (shadertype == 0xFFFE) |
|
596 |
printf("Vertex shader\n"); |
|
597 |
else |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
598 |
return FAIL("geometry shader? Unsupported at the moment."); |
1 | 599 |
|
600 |
printf("Version %u.%u\n", (uint) major, (uint) minor); |
|
601 |
||
602 |
return 1; // ate one token. |
|
603 |
} // parse_version_token |
|
604 |
||
605 |
||
606 |
static int parse_comment_token(const uint32 *tokens, const uint32 tokencount) |
|
607 |
{ |
|
608 |
const uint32 token = SWAP32(*tokens); |
|
609 |
if ((token & 0xFFFF) != 0xFFFE) |
|
610 |
return 0; // not a comment token. |
|
611 |
else if ((token & 0x80000000) != 0) |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
612 |
return FAIL("comment token high bit must be zero."); // so says msdn. |
1 | 613 |
|
614 |
const uint32 commenttoks = ((token >> 16) & 0xFFFF); |
|
615 |
const uint32 commentlen = commenttoks * sizeof (uint32); |
|
616 |
printf("Comment (%u tokens, %u bytes): ", |
|
617 |
(uint) commenttoks, (uint) commentlen); |
|
618 |
||
619 |
uint32 i = 0; |
|
620 |
const char *comment = (const char *) (tokens+1); |
|
621 |
while (i < commentlen) |
|
622 |
fputc(comment[i++], stdout); |
|
623 |
||
624 |
printf("\n"); |
|
625 |
||
626 |
return commenttoks + 1; // comment data plus the initial token. |
|
627 |
} // parse_comment_token |
|
628 |
||
629 |
||
630 |
static int parse_end_token(const uint32 *tokens, const uint32 tokencount) |
|
631 |
{ |
|
632 |
if (SWAP32(*tokens) != 0x0000FFFF) // end token is always 0x0000FFFF. |
|
633 |
return 0; // not us, eat no tokens. |
|
634 |
||
635 |
printf("END\n"); |
|
636 |
||
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
637 |
if (tokencount != 1) // we _must_ be last. If not: FAIL. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
638 |
FAIL("end token before end of stream"); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
639 |
|
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
640 |
return END_OF_STREAM; |
1 | 641 |
} // parse_end_token |
642 |
||
643 |
||
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
644 |
static int parse_phase_token(const uint32 *tokens, const uint32 tokencount) |
1 | 645 |
{ |
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
646 |
if (SWAP32(*tokens) != 0x0000FFFD) // phase token is always 0x0000FFFD. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
647 |
return 0; // not us, eat no tokens. |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
648 |
return FAIL("not sure what this thing is yet."); |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
649 |
} // parse_phase_token |
1 | 650 |
|
651 |
||
652 |
static int parse_token(const uint32 *tokens, const uint32 tokencount) |
|
653 |
{ |
|
654 |
int rc = 0; |
|
655 |
||
656 |
if (tokencount == 0) |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
657 |
return FAIL("unexpected end of shader."); |
1 | 658 |
|
659 |
if ((rc = parse_comment_token(tokens, tokencount)) != 0) |
|
660 |
return rc; |
|
661 |
||
662 |
if ((rc = parse_end_token(tokens, tokencount)) != 0) |
|
663 |
return rc; |
|
664 |
||
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
665 |
if ((rc = parse_phase_token(tokens, tokencount)) != 0) |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
666 |
return rc; |
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
667 |
|
1 | 668 |
if ((rc = parse_instruction_token(tokens, tokencount)) != 0) |
669 |
return rc; |
|
670 |
||
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
671 |
return FAIL("unknown token"); |
1 | 672 |
} // parse_token |
673 |
||
674 |
||
675 |
int D3D2GLSL_parse(const uint8 *tokenbuf, const uint32 bufsize) |
|
676 |
{ |
|
677 |
const uint32 *tokens = (const uint32 *) tokenbuf; |
|
678 |
uint32 tokencount = bufsize / sizeof (uint32); |
|
679 |
int rc = parse_version_token(tokens, tokencount); |
|
680 |
||
681 |
// parse out the rest of the tokens after the version token... |
|
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
682 |
while (rc > 0) |
1 | 683 |
{ |
684 |
tokens += rc; |
|
685 |
tokencount -= rc; |
|
686 |
rc = parse_token(tokens, tokencount); |
|
687 |
} // while |
|
688 |
||
2
c37210f5e87b
[svn] Bunch More Work. Parse out instruction tokens, fail in a bunch of new stubs.
icculus
parents:
1
diff
changeset
|
689 |
return (rc == END_OF_STREAM); |
1 | 690 |
} // D3D2GLSL_parse |
691 |
||
692 |
||
693 |
int main(int argc, char **argv) |
|
694 |
{ |
|
695 |
if (argv[1] != NULL) |
|
696 |
{ |
|
697 |
FILE *io = fopen(argv[1], "rb"); |
|
698 |
if (io != NULL) |
|
699 |
{ |
|
700 |
uint8 *buf = (uint8 *) malloc(1000000); |
|
701 |
int rc = fread(buf, 1, 1000000, io); |
|
702 |
fclose(io); |
|
703 |
D3D2GLSL_parse(buf, rc); |
|
704 |
free(buf); |
|
705 |
} // if |
|
706 |
} // if |
|
707 |
||
708 |
return 0; |
|
709 |
} // main |
|
710 |
||
711 |
// end of parse.c ... |
|
712 |