Rizin
unix-like reverse engineering framework and cli tools
luac_specs_53.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 // SPDX-FileCopyrightText: 2017 pancake <pancake@nopcode.org>
3 // SPDX-FileCopyrightText: 2021 Heersin <teablearcher@gmail.com>
4 
5 #ifndef BUILD_LUAC_SPECS_53_H
6 #define BUILD_LUAC_SPECS_53_H
7 
9 
10 typedef double LUA_NUMBER;
11 typedef ut64 LUA_INTEGER;
12 typedef ut32 LUA_INT;
13 
14 #define cast(t, exp) ((t)(exp))
15 #define cast_num(i) cast(LUA_NUMBER, (i))
16 
17 #define LUAC_54_FORMAT 0
18 #define LUAC_54_DATA "\x19\x93\r\n\x1a\n"
19 #define LUAC_53_INT_VALIDATION 0x5678
20 #define LUAC_53_NUMBER_VALIDATION cast_num(370.5)
21 
22 /* Header Part */
23 #define LUAC_53_FORMAT_OFFSET 0x05
24 #define LUAC_53_LUAC_DATA_OFFSET 0x06
25 #define LUAC_53_INT_SIZE_OFFSET 0x0C
26 #define LUAC_53_SIZET_SIZE_OFFSET 0x0D
27 #define LUAC_53_INSTRUCTION_SIZE_OFFSET 0x0E
28 #define LUAC_53_INTEGER_SIZE_OFFSET 0x0F
29 #define LUAC_53_NUMBER_SIZE_OFFSET 0x10
30 #define LUAC_53_INTEGER_VALID_OFFSET 0x11 /* from 0x11 - 0x18 : 8 bytes */
31 #define LUAC_53_NUMBER_VALID_OFFSET 0x19 /* from 0x19 - 0x20 : 8 bytes */
32 #define LUAC_53_UPVALUES_NUMBER_OFFSET 0x21
33 
34 #define LUAC_53_HDRSIZE 0x22
35 
36 /* Body */
37 #define LUAC_FILENAME_OFFSET 0x22
38 
39 /* Macros of tag */
40 // conflict with 5.4
41 #define LUA_TNUMFLT (3 | (0 << 4)) /* float numbers */
42 #define LUA_TNUMINT (3 | (1 << 4)) /* integer numbers */
43 
44 #endif // BUILD_LUAC_SPECS_53_H
uint32_t ut32
ut64 LUA_INTEGER
Definition: luac_specs_53.h:11
double LUA_NUMBER
Definition: luac_specs_53.h:10
ut32 LUA_INT
Definition: luac_specs_53.h:12
ut64(WINAPI *w32_GetEnabledXStateFeatures)()