vm-instr.h 11.3 KB
Newer Older
eg's avatar
eg committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
/* This file was generated automatically. DO NOT EDIT */

#ifndef _VM_H
#define _VM_H
#  define NOP                  0
#  define IM_FALSE             1
#  define IM_TRUE              2
#  define IM_NIL               3
#  define IM_MINUS1            4
#  define IM_ZERO              5
#  define IM_ONE               6
#  define IM_VOID              7
#  define SMALL_INT            8
#  define CONSTANT             9
#  define GLOBAL_REF           10
#  define UGLOBAL_REF          11
#  define LOCAL_REF0           12
#  define LOCAL_REF1           13
#  define LOCAL_REF2           14
#  define LOCAL_REF3           15
#  define LOCAL_REF4           16
#  define LOCAL_REF            17
#  define DEEP_LOCAL_REF       18
#  define GLOBAL_SET           19
#  define UGLOBAL_SET          20
#  define LOCAL_SET0           21
#  define LOCAL_SET1           22
#  define LOCAL_SET2           23
#  define LOCAL_SET3           24
#  define LOCAL_SET4           25
#  define LOCAL_SET            26
#  define DEEP_LOCAL_SET       27
#  define GOTO                 28
#  define JUMP_FALSE           29
#  define JUMP_TRUE            30
#  define DEFINE_SYMBOL        31
#  define POP                  32
#  define PUSH                 33
#  define DBG_VM               34
#  define CREATE_CLOSURE       35
#  define RETURN               36
#  define PREPARE_CALL         37
#  define INVOKE               38
#  define TAIL_INVOKE          39
#  define ENTER_LET_STAR       40
#  define ENTER_LET            41
#  define ENTER_TAIL_LET_STAR  42
#  define ENTER_TAIL_LET       43
#  define LEAVE_LET            44
#  define PUSH_HANDLER         45
#  define POP_HANDLER          46
#  define END_OF_CODE          47
#  define IN_ADD2              48
#  define IN_SUB2              49
#  define IN_MUL2              50
#  define IN_DIV2              51
#  define IN_NUMEQ             52
#  define IN_NUMLT             53
#  define IN_NUMGT             54
#  define IN_NUMLE             55
#  define IN_NUMGE             56
#  define IN_INCR              57
#  define IN_DECR              58
#  define IN_CONS              59
#  define IN_NULLP             60
#  define IN_CAR               61
#  define IN_CDR               62
#  define IN_LIST              63
#  define IN_NOT               64
#  define IN_VREF              65
#  define IN_VSET              66
#  define IN_SREF              67
#  define IN_SSET              68
#  define IN_EQ                69
#  define IN_EQV               70
#  define IN_EQUAL             71
#  define IN_APPLY             72
#  define MAKE_EXPANDER        73
#  define SET_CUR_MOD          74
#  define UNUSED_1             75
#  define UNUSED_2             76
#  define FALSE_PUSH           77
#  define TRUE_PUSH            78
#  define NIL_PUSH             79
#  define MINUS1_PUSH          80
#  define ZERO_PUSH            81
#  define ONE_PUSH             82
#  define VOID_PUSH            83
#  define INT_PUSH             84
#  define CONSTANT_PUSH        85
#  define GREF_INVOKE          86
#  define UGREF_INVOKE         87
#  define IN_NUMDIFF           88
#  define IN_NOT_EQ            89
#  define IN_NOT_EQV           90
#  define IN_NOT_EQUAL         91
#  define JUMP_NUMDIFF         92
#  define JUMP_NUMEQ           93
#  define JUMP_NUMLT           94
#  define JUMP_NUMLE           95
#  define JUMP_NUMGT           96
#  define JUMP_NUMGE           97
#  define JUMP_NOT_EQ          98
#  define JUMP_NOT_EQV         99
#  define JUMP_NOT_EQUAL       100
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
#  define LOCAL_REF0_PUSH      101
#  define LOCAL_REF1_PUSH      102
#  define LOCAL_REF2_PUSH      103
#  define LOCAL_REF3_PUSH      104
#  define LOCAL_REF4_PUSH      105
#  define GLOBAL_REF_PUSH      106
#  define UGLOBAL_REF_PUSH     107
#  define GREF_TAIL_INVOKE     108
#  define UGREF_TAIL_INVOKE    109
#  define PUSH_PREPARE_CALL    110
#  define IN_SINT_ADD2         111
#  define IN_SINT_SUB2         112
#  define IN_SINT_MUL2         113
#  define IN_SINT_DIV2         114
#  define UNUSED_3             115
#  define UNUSED_4             116
#  define UNUSED_5             117
#  define UNUSED_6             118
#  define UNUSED_7             119
#  define UNUSED_8             120
#  define UNUSED_9             121
#  define UNUSED_10            122
#  define UNUSED_11            123
#  define UNUSED_12            124
eg's avatar
eg committed
130

131
#  define NB_VM_INSTR (UNUSED_12           +1)
eg's avatar
eg committed
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
#endif



#ifdef DEFINE_JUMP_TABLE
static void *jump_table[] = {
  &&lab_NOP                 ,
  &&lab_IM_FALSE            ,
  &&lab_IM_TRUE             ,
  &&lab_IM_NIL              ,
  &&lab_IM_MINUS1           ,
  &&lab_IM_ZERO             ,
  &&lab_IM_ONE              ,
  &&lab_IM_VOID             ,
  &&lab_SMALL_INT           ,
  &&lab_CONSTANT            ,
  &&lab_GLOBAL_REF          ,
  &&lab_UGLOBAL_REF         ,
  &&lab_LOCAL_REF0          ,
  &&lab_LOCAL_REF1          ,
  &&lab_LOCAL_REF2          ,
  &&lab_LOCAL_REF3          ,
  &&lab_LOCAL_REF4          ,
  &&lab_LOCAL_REF           ,
  &&lab_DEEP_LOCAL_REF      ,
  &&lab_GLOBAL_SET          ,
  &&lab_UGLOBAL_SET         ,
  &&lab_LOCAL_SET0          ,
  &&lab_LOCAL_SET1          ,
  &&lab_LOCAL_SET2          ,
  &&lab_LOCAL_SET3          ,
  &&lab_LOCAL_SET4          ,
  &&lab_LOCAL_SET           ,
  &&lab_DEEP_LOCAL_SET      ,
  &&lab_GOTO                ,
  &&lab_JUMP_FALSE          ,
  &&lab_JUMP_TRUE           ,
  &&lab_DEFINE_SYMBOL       ,
  &&lab_POP                 ,
  &&lab_PUSH                ,
  &&lab_DBG_VM              ,
  &&lab_CREATE_CLOSURE      ,
  &&lab_RETURN              ,
  &&lab_PREPARE_CALL        ,
  &&lab_INVOKE              ,
  &&lab_TAIL_INVOKE         ,
  &&lab_ENTER_LET_STAR      ,
  &&lab_ENTER_LET           ,
  &&lab_ENTER_TAIL_LET_STAR ,
  &&lab_ENTER_TAIL_LET      ,
  &&lab_LEAVE_LET           ,
  &&lab_PUSH_HANDLER        ,
  &&lab_POP_HANDLER         ,
  &&lab_END_OF_CODE         ,
  &&lab_IN_ADD2             ,
  &&lab_IN_SUB2             ,
  &&lab_IN_MUL2             ,
  &&lab_IN_DIV2             ,
  &&lab_IN_NUMEQ            ,
  &&lab_IN_NUMLT            ,
  &&lab_IN_NUMGT            ,
  &&lab_IN_NUMLE            ,
  &&lab_IN_NUMGE            ,
  &&lab_IN_INCR             ,
  &&lab_IN_DECR             ,
  &&lab_IN_CONS             ,
  &&lab_IN_NULLP            ,
  &&lab_IN_CAR              ,
  &&lab_IN_CDR              ,
  &&lab_IN_LIST             ,
  &&lab_IN_NOT              ,
  &&lab_IN_VREF             ,
  &&lab_IN_VSET             ,
  &&lab_IN_SREF             ,
  &&lab_IN_SSET             ,
  &&lab_IN_EQ               ,
  &&lab_IN_EQV              ,
  &&lab_IN_EQUAL            ,
  &&lab_IN_APPLY            ,
  &&lab_MAKE_EXPANDER       ,
  &&lab_SET_CUR_MOD         ,
  &&lab_UNUSED_1            ,
  &&lab_UNUSED_2            ,
  &&lab_FALSE_PUSH          ,
  &&lab_TRUE_PUSH           ,
  &&lab_NIL_PUSH            ,
  &&lab_MINUS1_PUSH         ,
  &&lab_ZERO_PUSH           ,
  &&lab_ONE_PUSH            ,
  &&lab_VOID_PUSH           ,
  &&lab_INT_PUSH            ,
  &&lab_CONSTANT_PUSH       ,
  &&lab_GREF_INVOKE         ,
  &&lab_UGREF_INVOKE        ,
  &&lab_IN_NUMDIFF          ,
  &&lab_IN_NOT_EQ           ,
  &&lab_IN_NOT_EQV          ,
  &&lab_IN_NOT_EQUAL        ,
  &&lab_JUMP_NUMDIFF        ,
  &&lab_JUMP_NUMEQ          ,
  &&lab_JUMP_NUMLT          ,
  &&lab_JUMP_NUMLE          ,
  &&lab_JUMP_NUMGT          ,
  &&lab_JUMP_NUMGE          ,
  &&lab_JUMP_NOT_EQ         ,
  &&lab_JUMP_NOT_EQV        ,
  &&lab_JUMP_NOT_EQUAL      ,
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
  &&lab_LOCAL_REF0_PUSH     ,
  &&lab_LOCAL_REF1_PUSH     ,
  &&lab_LOCAL_REF2_PUSH     ,
  &&lab_LOCAL_REF3_PUSH     ,
  &&lab_LOCAL_REF4_PUSH     ,
  &&lab_GLOBAL_REF_PUSH     ,
  &&lab_UGLOBAL_REF_PUSH    ,
  &&lab_GREF_TAIL_INVOKE    ,
  &&lab_UGREF_TAIL_INVOKE   ,
  &&lab_PUSH_PREPARE_CALL   ,
  &&lab_IN_SINT_ADD2        ,
  &&lab_IN_SINT_SUB2        ,
  &&lab_IN_SINT_MUL2        ,
  &&lab_IN_SINT_DIV2        ,
  &&lab_UNUSED_3            ,
  &&lab_UNUSED_4            ,
  &&lab_UNUSED_5            ,
  &&lab_UNUSED_6            ,
  &&lab_UNUSED_7            ,
  &&lab_UNUSED_8            ,
  &&lab_UNUSED_9            ,
  &&lab_UNUSED_10           ,
  &&lab_UNUSED_11           ,
  &&lab_UNUSED_12           ,
eg's avatar
eg committed
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
  NULL};
#endif
#undef DEFINE_JUMP_TABLE



#ifdef DEFINE_NAME_TABLE
static char *name_table[] = {
  "NOP                 ",
  "IM_FALSE            ",
  "IM_TRUE             ",
  "IM_NIL              ",
  "IM_MINUS1           ",
  "IM_ZERO             ",
  "IM_ONE              ",
  "IM_VOID             ",
  "SMALL_INT           ",
  "CONSTANT            ",
  "GLOBAL_REF          ",
  "UGLOBAL_REF         ",
  "LOCAL_REF0          ",
  "LOCAL_REF1          ",
  "LOCAL_REF2          ",
  "LOCAL_REF3          ",
  "LOCAL_REF4          ",
  "LOCAL_REF           ",
  "DEEP_LOCAL_REF      ",
  "GLOBAL_SET          ",
  "UGLOBAL_SET         ",
  "LOCAL_SET0          ",
  "LOCAL_SET1          ",
  "LOCAL_SET2          ",
  "LOCAL_SET3          ",
  "LOCAL_SET4          ",
  "LOCAL_SET           ",
  "DEEP_LOCAL_SET      ",
  "GOTO                ",
  "JUMP_FALSE          ",
  "JUMP_TRUE           ",
  "DEFINE_SYMBOL       ",
  "POP                 ",
  "PUSH                ",
  "DBG_VM              ",
  "CREATE_CLOSURE      ",
  "RETURN              ",
  "PREPARE_CALL        ",
  "INVOKE              ",
  "TAIL_INVOKE         ",
  "ENTER_LET_STAR      ",
  "ENTER_LET           ",
  "ENTER_TAIL_LET_STAR ",
  "ENTER_TAIL_LET      ",
  "LEAVE_LET           ",
  "PUSH_HANDLER        ",
  "POP_HANDLER         ",
  "END_OF_CODE         ",
  "IN_ADD2             ",
  "IN_SUB2             ",
  "IN_MUL2             ",
  "IN_DIV2             ",
  "IN_NUMEQ            ",
  "IN_NUMLT            ",
  "IN_NUMGT            ",
  "IN_NUMLE            ",
  "IN_NUMGE            ",
  "IN_INCR             ",
  "IN_DECR             ",
  "IN_CONS             ",
  "IN_NULLP            ",
  "IN_CAR              ",
  "IN_CDR              ",
  "IN_LIST             ",
  "IN_NOT              ",
  "IN_VREF             ",
  "IN_VSET             ",
  "IN_SREF             ",
  "IN_SSET             ",
  "IN_EQ               ",
  "IN_EQV              ",
  "IN_EQUAL            ",
  "IN_APPLY            ",
  "MAKE_EXPANDER       ",
  "SET_CUR_MOD         ",
  "UNUSED_1            ",
  "UNUSED_2            ",
  "FALSE_PUSH          ",
  "TRUE_PUSH           ",
  "NIL_PUSH            ",
  "MINUS1_PUSH         ",
  "ZERO_PUSH           ",
  "ONE_PUSH            ",
  "VOID_PUSH           ",
  "INT_PUSH            ",
  "CONSTANT_PUSH       ",
  "GREF_INVOKE         ",
  "UGREF_INVOKE        ",
  "IN_NUMDIFF          ",
  "IN_NOT_EQ           ",
  "IN_NOT_EQV          ",
  "IN_NOT_EQUAL        ",
  "JUMP_NUMDIFF        ",
  "JUMP_NUMEQ          ",
  "JUMP_NUMLT          ",
  "JUMP_NUMLE          ",
  "JUMP_NUMGT          ",
  "JUMP_NUMGE          ",
  "JUMP_NOT_EQ         ",
  "JUMP_NOT_EQV        ",
  "JUMP_NOT_EQUAL      ",
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
  "LOCAL_REF0_PUSH     ",
  "LOCAL_REF1_PUSH     ",
  "LOCAL_REF2_PUSH     ",
  "LOCAL_REF3_PUSH     ",
  "LOCAL_REF4_PUSH     ",
  "GLOBAL_REF_PUSH     ",
  "UGLOBAL_REF_PUSH    ",
  "GREF_TAIL_INVOKE    ",
  "UGREF_TAIL_INVOKE   ",
  "PUSH_PREPARE_CALL   ",
  "IN_SINT_ADD2        ",
  "IN_SINT_SUB2        ",
  "IN_SINT_MUL2        ",
  "IN_SINT_DIV2        ",
  "UNUSED_3            ",
  "UNUSED_4            ",
  "UNUSED_5            ",
  "UNUSED_6            ",
  "UNUSED_7            ",
  "UNUSED_8            ",
  "UNUSED_9            ",
  "UNUSED_10           ",
  "UNUSED_11           ",
  "UNUSED_12           ",
eg's avatar
eg committed
396 397 398
  NULL};
#endif
#undef DEFINE_NAME_TABLE