~ubuntu-branches/ubuntu/trusty/teeworlds/trusty-updates

« back to all changes in this revision

Viewing changes to bam/src/lua/src/lopcodes.c

  • Committer: Bazaar Package Importer
  • Author(s): Gonéri Le Bouder
  • Date: 2009-04-12 02:32:37 UTC
  • mfrom: (3.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090412023237-ufmf1xn0rkjmx6f3
Tags: 0.5.1-2
* Fix the ouput of teeworlds-server --help with /bin/sh ->
  /bin/bash (Closes: #511600)
* Standard version 3.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
** $Id: lopcodes.c,v 1.22 2002/12/04 17:38:31 roberto Exp $
3
 
** extracted automatically from lopcodes.h by mkprint.lua
4
 
** DO NOT EDIT
5
 
** See Copyright Notice in lua.h
6
 
*/
7
 
 
8
 
 
9
 
#define lopcodes_c
10
 
 
11
 
#include "lua.h"
12
 
 
13
 
#include "lobject.h"
14
 
#include "lopcodes.h"
15
 
 
16
 
 
17
 
#ifdef LUA_OPNAMES
18
 
 
19
 
const char *const luaP_opnames[] = {
20
 
  "MOVE",
21
 
  "LOADK",
22
 
  "LOADBOOL",
23
 
  "LOADNIL",
24
 
  "GETUPVAL",
25
 
  "GETGLOBAL",
26
 
  "GETTABLE",
27
 
  "SETGLOBAL",
28
 
  "SETUPVAL",
29
 
  "SETTABLE",
30
 
  "NEWTABLE",
31
 
  "SELF",
32
 
  "ADD",
33
 
  "SUB",
34
 
  "MUL",
35
 
  "DIV",
36
 
  "POW",
37
 
  "UNM",
38
 
  "NOT",
39
 
  "CONCAT",
40
 
  "JMP",
41
 
  "EQ",
42
 
  "LT",
43
 
  "LE",
44
 
  "TEST",
45
 
  "CALL",
46
 
  "TAILCALL",
47
 
  "RETURN",
48
 
  "FORLOOP",
49
 
  "TFORLOOP",
50
 
  "TFORPREP",
51
 
  "SETLIST",
52
 
  "SETLISTO",
53
 
  "CLOSE",
54
 
  "CLOSURE"
55
 
};
56
 
 
57
 
#endif
58
 
 
59
 
#define opmode(t,b,bk,ck,sa,k,m) (((t)<<OpModeT) | \
60
 
   ((b)<<OpModeBreg) | ((bk)<<OpModeBrk) | ((ck)<<OpModeCrk) | \
61
 
   ((sa)<<OpModesetA) | ((k)<<OpModeK) | (m))
62
 
 
63
 
 
64
 
const lu_byte luaP_opmodes[NUM_OPCODES] = {
65
 
/*       T  B Bk Ck sA  K  mode                    opcode    */
66
 
  opmode(0, 1, 0, 0, 1, 0, iABC)                /* OP_MOVE */
67
 
 ,opmode(0, 0, 0, 0, 1, 1, iABx)                /* OP_LOADK */
68
 
 ,opmode(0, 0, 0, 0, 1, 0, iABC)                /* OP_LOADBOOL */
69
 
 ,opmode(0, 1, 0, 0, 1, 0, iABC)                /* OP_LOADNIL */
70
 
 ,opmode(0, 0, 0, 0, 1, 0, iABC)                /* OP_GETUPVAL */
71
 
 ,opmode(0, 0, 0, 0, 1, 1, iABx)                /* OP_GETGLOBAL */
72
 
 ,opmode(0, 1, 0, 1, 1, 0, iABC)                /* OP_GETTABLE */
73
 
 ,opmode(0, 0, 0, 0, 0, 1, iABx)                /* OP_SETGLOBAL */
74
 
 ,opmode(0, 0, 0, 0, 0, 0, iABC)                /* OP_SETUPVAL */
75
 
 ,opmode(0, 0, 1, 1, 0, 0, iABC)                /* OP_SETTABLE */
76
 
 ,opmode(0, 0, 0, 0, 1, 0, iABC)                /* OP_NEWTABLE */
77
 
 ,opmode(0, 1, 0, 1, 1, 0, iABC)                /* OP_SELF */
78
 
 ,opmode(0, 0, 1, 1, 1, 0, iABC)                /* OP_ADD */
79
 
 ,opmode(0, 0, 1, 1, 1, 0, iABC)                /* OP_SUB */
80
 
 ,opmode(0, 0, 1, 1, 1, 0, iABC)                /* OP_MUL */
81
 
 ,opmode(0, 0, 1, 1, 1, 0, iABC)                /* OP_DIV */
82
 
 ,opmode(0, 0, 1, 1, 1, 0, iABC)                /* OP_POW */
83
 
 ,opmode(0, 1, 0, 0, 1, 0, iABC)                /* OP_UNM */
84
 
 ,opmode(0, 1, 0, 0, 1, 0, iABC)                /* OP_NOT */
85
 
 ,opmode(0, 1, 0, 1, 1, 0, iABC)                /* OP_CONCAT */
86
 
 ,opmode(0, 0, 0, 0, 0, 0, iAsBx)               /* OP_JMP */
87
 
 ,opmode(1, 0, 1, 1, 0, 0, iABC)                /* OP_EQ */
88
 
 ,opmode(1, 0, 1, 1, 0, 0, iABC)                /* OP_LT */
89
 
 ,opmode(1, 0, 1, 1, 0, 0, iABC)                /* OP_LE */
90
 
 ,opmode(1, 1, 0, 0, 1, 0, iABC)                /* OP_TEST */
91
 
 ,opmode(0, 0, 0, 0, 0, 0, iABC)                /* OP_CALL */
92
 
 ,opmode(0, 0, 0, 0, 0, 0, iABC)                /* OP_TAILCALL */
93
 
 ,opmode(0, 0, 0, 0, 0, 0, iABC)                /* OP_RETURN */
94
 
 ,opmode(0, 0, 0, 0, 0, 0, iAsBx)               /* OP_FORLOOP */
95
 
 ,opmode(1, 0, 0, 0, 0, 0, iABC)                /* OP_TFORLOOP */
96
 
 ,opmode(0, 0, 0, 0, 0, 0, iAsBx)               /* OP_TFORPREP */
97
 
 ,opmode(0, 0, 0, 0, 0, 0, iABx)                /* OP_SETLIST */
98
 
 ,opmode(0, 0, 0, 0, 0, 0, iABx)                /* OP_SETLISTO */
99
 
 ,opmode(0, 0, 0, 0, 0, 0, iABC)                /* OP_CLOSE */
100
 
 ,opmode(0, 0, 0, 0, 1, 0, iABx)                /* OP_CLOSURE */
101
 
};
102