Skip to content

Commit 29cfa95

Browse files
committed
Removed redundant hunks and modifications in 'lua.pat'
1 parent 267296a commit 29cfa95

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lua.pat

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
11
--- lua/lopcodes.h
22
+++ lua/lopcodes.h
3-
@@ -65,10 +65,16 @@ enum OpMode {iABC, iABx, iAsBx, iAx, isJ}; /* basic instruction formats */
4-
*/
5-
3+
@@ -67,8 +67,9 @@ enum OpMode {iABC, iABx, iAsBx, iAx, isJ}; /* basic instruction formats */
64
/* Check whether type 'int' has at least 'b' bits ('b' < 32) */
7-
+#if defined(_M_I86)
8-
+/* Hardcoded due to bugs in some 16-bit compilers */
9-
+#define L_INTHASBITS(b) ((0xFFFF >> ((b) - 1)) >= 1)
10-
+#else
115
#define L_INTHASBITS(b) ((UINT_MAX >> ((b) - 1)) >= 1)
12-
+#endif
136

147
-
158
-#if L_INTHASBITS(SIZE_Bx)
169
+#if defined(_M_I86)
17-
+#define MAXARG_Bx 0xFFFF
10+
+#define MAXARG_Bx MAX_INT
1811
+#elif L_INTHASBITS(SIZE_Bx)
1912
#define MAXARG_Bx ((1<<SIZE_Bx)-1)
2013
#else
2114
#define MAXARG_Bx MAX_INT
22-
@@ -76,14 +82,17 @@ enum OpMode {iABC, iABx, iAsBx, iAx, isJ}; /* basic instruction formats */
15+
@@ -76,14 +77,17 @@ enum OpMode {iABC, iABx, iAsBx, iAx, isJ}; /* basic instruction formats */
2316

2417
#define OFFSET_sBx (MAXARG_Bx>>1) /* 'sBx' is signed */
2518

2619
-
2720
-#if L_INTHASBITS(SIZE_Ax)
2821
+#if defined(_M_I86)
29-
+#define MAXARG_Ax 0xFFFF
22+
+#define MAXARG_Ax MAX_INT
3023
+#elif L_INTHASBITS(SIZE_Ax)
3124
#define MAXARG_Ax ((1<<SIZE_Ax)-1)
3225
#else
@@ -35,7 +28,7 @@
3528

3629
-#if L_INTHASBITS(SIZE_sJ)
3730
+#if defined(_M_I86)
38-
+#define MAXARG_sJ 0xFFFF
31+
+#define MAXARG_sJ MAX_INT
3932
+#elif L_INTHASBITS(SIZE_sJ)
4033
#define MAXARG_sJ ((1 << SIZE_sJ) - 1)
4134
#else

0 commit comments

Comments
 (0)