mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix TSETM on x64/SSE builds when table is resized.
This commit is contained in:
parent
871941a840
commit
1fea5cb822
@ -57,6 +57,7 @@ to see whether newer versions are available.
|
||||
<ul>
|
||||
<li>Correctness and completeness:
|
||||
<ul>
|
||||
<li>Fix <tt>{f()}</tt> on x64 when table is resized.</li>
|
||||
<li>Fix folding of ordered comparisons with same references.</li>
|
||||
<li>Fix snapshot restores for multi-result bytecodes.</li>
|
||||
<li>Fix potential hang when recording bytecode with nested closures.</li>
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define DASM_SECTION_CODE_OP 0
|
||||
#define DASM_SECTION_CODE_SUB 1
|
||||
#define DASM_MAXSECTION 2
|
||||
static const unsigned char build_actionlist[14049] = {
|
||||
static const unsigned char build_actionlist[14048] = {
|
||||
254,1,248,10,252,247,195,237,15,132,244,11,131,227,252,248,41,218,72,141,
|
||||
76,25,252,248,139,90,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,4,
|
||||
252,247,195,237,15,132,244,13,248,14,252,247,195,237,15,132,244,10,65,199,
|
||||
@ -615,83 +615,83 @@ static const unsigned char build_actionlist[14049] = {
|
||||
232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,131,189,233,0,15,132,
|
||||
244,1,255,139,141,233,252,246,129,233,235,15,132,244,38,15,182,75,252,253,
|
||||
252,233,244,1,248,7,128,165,233,235,65,139,142,233,65,137,174,233,137,141,
|
||||
233,15,182,75,252,253,252,233,244,2,255,68,137,60,36,255,248,1,141,12,202,
|
||||
139,105,252,248,252,246,133,233,235,15,133,244,253,248,2,139,68,36,4,255,
|
||||
252,242,68,15,45,252,248,255,131,232,1,15,132,244,250,68,1,252,248,59,133,
|
||||
233,15,131,244,251,68,41,252,248,65,193,231,3,68,3,189,233,248,3,139,41,65,
|
||||
137,47,139,105,4,131,193,8,65,137,111,4,65,131,199,8,131,232,1,15,133,244,
|
||||
3,248,4,68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,
|
||||
252,255,36,252,238,248,5,139,124,36,24,137,151,233,137,252,238,137,194,137,
|
||||
252,253,137,92,36,28,232,251,1,33,139,149,233,15,182,75,252,253,252,233,244,
|
||||
1,248,7,128,165,233,235,65,139,134,233,65,137,174,233,255,137,133,233,252,
|
||||
233,244,2,255,3,68,36,4,255,129,124,253,202,4,239,139,44,202,15,133,244,51,
|
||||
141,84,202,8,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,
|
||||
131,195,4,65,252,255,36,252,238,255,141,76,202,8,65,137,215,139,105,252,248,
|
||||
129,121,253,252,252,239,15,133,244,28,248,52,139,90,252,252,252,247,195,237,
|
||||
15,133,244,253,248,1,137,106,252,248,137,68,36,4,131,232,1,15,132,244,249,
|
||||
248,2,139,41,65,137,47,139,105,4,65,137,111,4,65,131,199,8,131,193,8,131,
|
||||
232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,4,128,189,233,1,15,135,
|
||||
244,251,248,4,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,
|
||||
255,36,252,238,248,5,255,252,247,195,237,15,133,244,4,15,182,75,252,253,72,
|
||||
252,247,209,141,12,202,68,139,121,252,248,69,139,191,233,69,139,191,233,252,
|
||||
233,244,4,248,7,15,139,244,1,131,227,252,248,41,218,65,137,215,139,90,252,
|
||||
252,252,233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,41,137,
|
||||
65,4,139,105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,139,65,
|
||||
228,137,105,252,248,137,65,252,252,129,252,248,239,184,237,15,133,244,28,
|
||||
137,202,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131,195,
|
||||
4,65,252,255,36,252,238,255,15,182,252,236,139,66,252,248,141,12,202,139,
|
||||
128,233,15,182,128,233,68,137,60,36,68,141,188,253,194,233,68,43,122,252,
|
||||
252,133,252,237,15,132,244,251,141,108,252,233,252,248,65,57,215,15,131,244,
|
||||
248,248,1,65,139,71,252,248,137,1,65,139,71,252,252,65,131,199,8,137,65,4,
|
||||
131,193,8,57,252,233,15,131,244,249,65,57,215,15,130,244,1,248,2,199,65,4,
|
||||
237,131,193,8,57,252,233,15,130,244,2,248,3,68,139,60,36,139,3,15,182,204,
|
||||
15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,5,199,68,36,4,1,
|
||||
0,0,0,137,208,68,41,252,248,15,134,244,3,255,137,197,193,252,237,3,131,197,
|
||||
1,137,108,36,4,139,108,36,24,1,200,59,133,233,15,135,244,253,248,6,65,139,
|
||||
71,252,248,137,1,65,139,71,252,252,65,131,199,8,137,65,4,131,193,8,65,57,
|
||||
215,15,130,244,6,252,233,244,3,248,7,137,149,233,137,141,233,137,92,36,28,
|
||||
65,41,215,139,116,36,4,131,252,238,1,137,252,239,232,251,1,0,139,149,233,
|
||||
139,141,233,65,1,215,252,233,244,6,255,193,225,3,255,248,1,139,90,252,252,
|
||||
137,68,36,4,252,247,195,237,15,133,244,253,255,248,13,65,137,215,131,232,
|
||||
1,15,132,244,249,248,2,65,139,44,15,65,137,111,252,248,65,139,108,15,4,65,
|
||||
137,111,252,252,65,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,4,15,
|
||||
182,107,252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,252,
|
||||
252,139,44,10,137,106,252,248,255,248,5,56,67,252,255,15,135,244,252,255,
|
||||
15,182,75,252,253,72,252,247,209,141,20,202,68,139,122,252,248,69,139,191,
|
||||
233,69,139,191,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,
|
||||
255,36,252,238,248,6,255,65,199,71,252,252,237,65,131,199,8,255,199,68,194,
|
||||
252,244,237,255,131,192,1,252,233,244,5,248,7,15,139,244,14,131,227,252,248,
|
||||
41,218,255,1,217,255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,
|
||||
233,1,15,132,244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,
|
||||
121,253,12,239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,
|
||||
53,255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,
|
||||
15,17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,
|
||||
1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,
|
||||
252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,
|
||||
15,183,67,252,254,255,15,131,244,248,141,156,253,131,233,255,141,156,253,
|
||||
131,233,15,183,67,252,254,15,131,245,255,15,130,244,248,141,156,253,131,233,
|
||||
255,248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,
|
||||
239,15,132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,
|
||||
255,141,156,253,131,233,139,1,137,105,252,252,137,65,252,248,255,65,139,142,
|
||||
233,139,4,193,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233,
|
||||
76,137,36,36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253,
|
||||
131,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,
|
||||
238,255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,
|
||||
244,142,255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,
|
||||
23,15,182,139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233,
|
||||
245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,
|
||||
244,2,255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68,
|
||||
137,120,252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,22,137,209,
|
||||
137,194,15,182,171,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,
|
||||
15,131,244,249,68,139,121,252,248,68,137,56,68,139,121,252,252,68,137,120,
|
||||
4,131,192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,68,139,
|
||||
187,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,
|
||||
238,255,248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,
|
||||
2,255,139,106,252,248,76,139,189,233,139,108,36,24,141,68,194,252,248,137,
|
||||
149,233,141,136,233,59,141,233,137,133,233,255,137,252,239,255,76,137,252,
|
||||
254,137,252,239,255,15,135,244,21,65,199,134,233,237,255,65,252,255,215,255,
|
||||
65,252,255,150,233,255,65,199,134,233,237,139,149,233,141,12,194,252,247,
|
||||
217,3,141,233,139,90,252,252,252,233,244,12,255,254,0
|
||||
233,15,182,75,252,253,252,233,244,2,255,68,137,60,36,255,252,242,69,15,45,
|
||||
60,199,255,248,1,141,12,202,139,105,252,248,252,246,133,233,235,15,133,244,
|
||||
253,248,2,139,68,36,4,131,232,1,15,132,244,250,68,1,252,248,59,133,233,15,
|
||||
131,244,251,68,41,252,248,65,193,231,3,68,3,189,233,248,3,139,41,65,137,47,
|
||||
139,105,4,131,193,8,65,137,111,4,65,131,199,8,131,232,1,15,133,244,3,248,
|
||||
4,68,139,60,36,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,
|
||||
36,252,238,248,5,139,124,36,24,137,151,233,137,252,238,137,194,137,252,253,
|
||||
137,92,36,28,232,251,1,33,139,149,233,15,182,75,252,253,252,233,244,1,248,
|
||||
7,255,128,165,233,235,65,139,134,233,65,137,174,233,137,133,233,252,233,244,
|
||||
2,255,3,68,36,4,255,129,124,253,202,4,239,139,44,202,15,133,244,51,141,84,
|
||||
202,8,137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131,195,
|
||||
4,65,252,255,36,252,238,255,141,76,202,8,65,137,215,139,105,252,248,129,121,
|
||||
253,252,252,239,15,133,244,28,248,52,139,90,252,252,252,247,195,237,15,133,
|
||||
244,253,248,1,137,106,252,248,137,68,36,4,131,232,1,15,132,244,249,248,2,
|
||||
139,41,65,137,47,139,105,4,65,137,111,4,65,131,199,8,131,193,8,131,232,1,
|
||||
15,133,244,2,139,106,252,248,248,3,139,68,36,4,128,189,233,1,15,135,244,251,
|
||||
248,4,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,252,255,36,
|
||||
252,238,248,5,255,252,247,195,237,15,133,244,4,15,182,75,252,253,72,252,247,
|
||||
209,141,12,202,68,139,121,252,248,69,139,191,233,69,139,191,233,252,233,244,
|
||||
4,248,7,15,139,244,1,131,227,252,248,41,218,65,137,215,139,90,252,252,252,
|
||||
233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,41,137,65,4,139,
|
||||
105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,139,65,228,137,
|
||||
105,252,248,137,65,252,252,129,252,248,239,184,237,15,133,244,28,137,202,
|
||||
137,90,252,252,139,157,233,139,11,15,182,252,233,15,182,205,131,195,4,65,
|
||||
252,255,36,252,238,255,15,182,252,236,139,66,252,248,141,12,202,139,128,233,
|
||||
15,182,128,233,68,137,60,36,68,141,188,253,194,233,68,43,122,252,252,133,
|
||||
252,237,15,132,244,251,141,108,252,233,252,248,65,57,215,15,131,244,248,248,
|
||||
1,65,139,71,252,248,137,1,65,139,71,252,252,65,131,199,8,137,65,4,131,193,
|
||||
8,57,252,233,15,131,244,249,65,57,215,15,130,244,1,248,2,199,65,4,237,131,
|
||||
193,8,57,252,233,15,130,244,2,248,3,68,139,60,36,139,3,15,182,204,15,182,
|
||||
232,131,195,4,193,232,16,65,252,255,36,252,238,248,5,199,68,36,4,1,0,0,0,
|
||||
137,208,68,41,252,248,15,134,244,3,255,137,197,193,252,237,3,131,197,1,137,
|
||||
108,36,4,139,108,36,24,1,200,59,133,233,15,135,244,253,248,6,65,139,71,252,
|
||||
248,137,1,65,139,71,252,252,65,131,199,8,137,65,4,131,193,8,65,57,215,15,
|
||||
130,244,6,252,233,244,3,248,7,137,149,233,137,141,233,137,92,36,28,65,41,
|
||||
215,139,116,36,4,131,252,238,1,137,252,239,232,251,1,0,139,149,233,139,141,
|
||||
233,65,1,215,252,233,244,6,255,193,225,3,255,248,1,139,90,252,252,137,68,
|
||||
36,4,252,247,195,237,15,133,244,253,255,248,13,65,137,215,131,232,1,15,132,
|
||||
244,249,248,2,65,139,44,15,65,137,111,252,248,65,139,108,15,4,65,137,111,
|
||||
252,252,65,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,4,15,182,107,
|
||||
252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,252,252,139,
|
||||
44,10,137,106,252,248,255,248,5,56,67,252,255,15,135,244,252,255,15,182,75,
|
||||
252,253,72,252,247,209,141,20,202,68,139,122,252,248,69,139,191,233,69,139,
|
||||
191,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,
|
||||
238,248,6,255,65,199,71,252,252,237,65,131,199,8,255,199,68,194,252,244,237,
|
||||
255,131,192,1,252,233,244,5,248,7,15,139,244,14,131,227,252,248,41,218,255,
|
||||
1,217,255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,
|
||||
132,244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121,253,
|
||||
12,239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53,255,
|
||||
252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,
|
||||
1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,
|
||||
242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,
|
||||
237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,
|
||||
183,67,252,254,255,15,131,244,248,141,156,253,131,233,255,141,156,253,131,
|
||||
233,15,183,67,252,254,15,131,245,255,15,130,244,248,141,156,253,131,233,255,
|
||||
248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,
|
||||
15,132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,
|
||||
141,156,253,131,233,139,1,137,105,252,252,137,65,252,248,255,65,139,142,233,
|
||||
139,4,193,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233,76,137,
|
||||
36,36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253,131,233,
|
||||
139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,
|
||||
137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,244,142,
|
||||
255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,23,15,182,
|
||||
139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233,245,255,
|
||||
248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,
|
||||
255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68,137,120,
|
||||
252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,22,137,209,137,194,
|
||||
15,182,171,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,
|
||||
249,68,139,121,252,248,68,137,56,68,139,121,252,252,68,137,120,4,131,192,
|
||||
8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,68,139,187,233,
|
||||
139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,
|
||||
248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,
|
||||
139,106,252,248,76,139,189,233,139,108,36,24,141,68,194,252,248,137,149,233,
|
||||
141,136,233,59,141,233,137,133,233,255,137,252,239,255,76,137,252,254,137,
|
||||
252,239,255,15,135,244,21,65,199,134,233,237,255,65,252,255,215,255,65,252,
|
||||
255,150,233,255,65,199,134,233,237,139,149,233,141,12,194,252,247,217,3,141,
|
||||
233,139,90,252,252,252,233,244,12,255,254,0
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -1960,16 +1960,11 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_TSETM:
|
||||
dasm_put(Dst, 12468);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 10999);
|
||||
dasm_put(Dst, 12473);
|
||||
} else {
|
||||
}
|
||||
dasm_put(Dst, 12473, Dt6(->marked), LJ_GC_BLACK);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 12498);
|
||||
} else {
|
||||
}
|
||||
dasm_put(Dst, 12506, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
|
||||
dasm_put(Dst, 12642, Dt6(->gclist));
|
||||
dasm_put(Dst, 12481, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
|
||||
dasm_put(Dst, 12629, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
|
||||
break;
|
||||
|
||||
/* -- Calls and vararg handling ----------------------------------------- */
|
||||
@ -1977,60 +1972,60 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_CALL: case BC_CALLM:
|
||||
dasm_put(Dst, 10079);
|
||||
if (op == BC_CALLM) {
|
||||
dasm_put(Dst, 12650);
|
||||
dasm_put(Dst, 12649);
|
||||
}
|
||||
dasm_put(Dst, 12655, LJ_TFUNC, Dt7(->pc));
|
||||
dasm_put(Dst, 12654, LJ_TFUNC, Dt7(->pc));
|
||||
break;
|
||||
|
||||
case BC_CALLMT:
|
||||
dasm_put(Dst, 12650);
|
||||
dasm_put(Dst, 12649);
|
||||
break;
|
||||
case BC_CALLT:
|
||||
dasm_put(Dst, 12698, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
|
||||
dasm_put(Dst, 12822, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
|
||||
dasm_put(Dst, 12697, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
|
||||
dasm_put(Dst, 12821, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
|
||||
break;
|
||||
|
||||
case BC_ITERC:
|
||||
dasm_put(Dst, 12883, LJ_TFUNC, 2+1, Dt7(->pc));
|
||||
dasm_put(Dst, 12882, LJ_TFUNC, 2+1, Dt7(->pc));
|
||||
break;
|
||||
|
||||
case BC_VARG:
|
||||
dasm_put(Dst, 12965, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
|
||||
dasm_put(Dst, 13119, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
|
||||
dasm_put(Dst, 12964, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
|
||||
dasm_put(Dst, 13118, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
|
||||
break;
|
||||
|
||||
/* -- Returns ----------------------------------------------------------- */
|
||||
|
||||
case BC_RETM:
|
||||
dasm_put(Dst, 12650);
|
||||
dasm_put(Dst, 12649);
|
||||
break;
|
||||
|
||||
case BC_RET: case BC_RET0: case BC_RET1:
|
||||
if (op != BC_RET0) {
|
||||
dasm_put(Dst, 13224);
|
||||
dasm_put(Dst, 13223);
|
||||
}
|
||||
dasm_put(Dst, 13228, FRAME_TYPE);
|
||||
dasm_put(Dst, 13227, FRAME_TYPE);
|
||||
switch (op) {
|
||||
case BC_RET:
|
||||
dasm_put(Dst, 13247);
|
||||
dasm_put(Dst, 13246);
|
||||
break;
|
||||
case BC_RET1:
|
||||
dasm_put(Dst, 13311);
|
||||
dasm_put(Dst, 13310);
|
||||
/* fallthrough */
|
||||
case BC_RET0:
|
||||
dasm_put(Dst, 13327);
|
||||
dasm_put(Dst, 13326);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dasm_put(Dst, 13338, Dt7(->pc), PC2PROTO(k));
|
||||
dasm_put(Dst, 13337, Dt7(->pc), PC2PROTO(k));
|
||||
if (op == BC_RET) {
|
||||
dasm_put(Dst, 13386, LJ_TNIL);
|
||||
dasm_put(Dst, 13385, LJ_TNIL);
|
||||
} else {
|
||||
dasm_put(Dst, 13397, LJ_TNIL);
|
||||
dasm_put(Dst, 13396, LJ_TNIL);
|
||||
}
|
||||
dasm_put(Dst, 13404);
|
||||
dasm_put(Dst, 13403);
|
||||
if (op != BC_RET0) {
|
||||
dasm_put(Dst, 13424);
|
||||
dasm_put(Dst, 13423);
|
||||
}
|
||||
dasm_put(Dst, 4596);
|
||||
break;
|
||||
@ -2040,7 +2035,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FORL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13427, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13426, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2052,57 +2047,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_FORI:
|
||||
case BC_IFORL:
|
||||
vk = (op == BC_IFORL || op == BC_JFORL);
|
||||
dasm_put(Dst, 13448);
|
||||
dasm_put(Dst, 13447);
|
||||
if (!vk) {
|
||||
dasm_put(Dst, 13452, LJ_TISNUM, LJ_TISNUM);
|
||||
dasm_put(Dst, 13451, LJ_TISNUM, LJ_TISNUM);
|
||||
}
|
||||
dasm_put(Dst, 13471);
|
||||
dasm_put(Dst, 13470);
|
||||
if (!vk) {
|
||||
dasm_put(Dst, 13475, LJ_TISNUM);
|
||||
dasm_put(Dst, 13474, LJ_TISNUM);
|
||||
}
|
||||
if (sse) {
|
||||
dasm_put(Dst, 13484);
|
||||
dasm_put(Dst, 13483);
|
||||
if (vk) {
|
||||
dasm_put(Dst, 13496);
|
||||
dasm_put(Dst, 13495);
|
||||
} else {
|
||||
dasm_put(Dst, 13515);
|
||||
dasm_put(Dst, 13514);
|
||||
}
|
||||
dasm_put(Dst, 13520);
|
||||
dasm_put(Dst, 13519);
|
||||
} else {
|
||||
dasm_put(Dst, 13533);
|
||||
dasm_put(Dst, 13532);
|
||||
if (vk) {
|
||||
dasm_put(Dst, 13539);
|
||||
dasm_put(Dst, 13538);
|
||||
} else {
|
||||
dasm_put(Dst, 13555);
|
||||
dasm_put(Dst, 13554);
|
||||
}
|
||||
dasm_put(Dst, 13563);
|
||||
dasm_put(Dst, 13562);
|
||||
if (cmov) {
|
||||
dasm_put(Dst, 9494);
|
||||
} else {
|
||||
dasm_put(Dst, 9500);
|
||||
}
|
||||
if (!cmov) {
|
||||
dasm_put(Dst, 13568);
|
||||
dasm_put(Dst, 13567);
|
||||
}
|
||||
}
|
||||
if (op == BC_FORI) {
|
||||
dasm_put(Dst, 13574, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13573, -BCBIAS_J*4);
|
||||
} else if (op == BC_JFORI) {
|
||||
dasm_put(Dst, 13584, -BCBIAS_J*4, BC_JLOOP);
|
||||
dasm_put(Dst, 13583, -BCBIAS_J*4, BC_JLOOP);
|
||||
} else if (op == BC_IFORL) {
|
||||
dasm_put(Dst, 13598, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13597, -BCBIAS_J*4);
|
||||
} else {
|
||||
dasm_put(Dst, 13594, BC_JLOOP);
|
||||
dasm_put(Dst, 13593, BC_JLOOP);
|
||||
}
|
||||
dasm_put(Dst, 9529);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 13608);
|
||||
dasm_put(Dst, 13607);
|
||||
}
|
||||
break;
|
||||
|
||||
case BC_ITERL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13427, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13426, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2111,18 +2106,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break;
|
||||
#endif
|
||||
case BC_IITERL:
|
||||
dasm_put(Dst, 13619, LJ_TNIL);
|
||||
dasm_put(Dst, 13618, LJ_TNIL);
|
||||
if (op == BC_JITERL) {
|
||||
dasm_put(Dst, 13634, BC_JLOOP);
|
||||
dasm_put(Dst, 13633, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 13648, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13647, -BCBIAS_J*4);
|
||||
}
|
||||
dasm_put(Dst, 9833);
|
||||
break;
|
||||
|
||||
case BC_LOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13427, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13426, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2132,12 +2127,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_JLOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13664, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
|
||||
dasm_put(Dst, 13663, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case BC_JMP:
|
||||
dasm_put(Dst, 13705, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13704, -BCBIAS_J*4);
|
||||
break;
|
||||
|
||||
/* -- Function headers -------------------------------------------------- */
|
||||
@ -2151,7 +2146,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FUNCF:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13731, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13730, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
case BC_FUNCV: /* NYI: compiled vararg functions. */
|
||||
break;
|
||||
@ -2161,13 +2156,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break;
|
||||
#endif
|
||||
case BC_IFUNCF:
|
||||
dasm_put(Dst, 13752, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
|
||||
dasm_put(Dst, 13751, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
|
||||
if (op == BC_JFUNCF) {
|
||||
dasm_put(Dst, 13783, BC_JLOOP);
|
||||
dasm_put(Dst, 13782, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 9531);
|
||||
}
|
||||
dasm_put(Dst, 13792, LJ_TNIL);
|
||||
dasm_put(Dst, 13791, LJ_TNIL);
|
||||
break;
|
||||
|
||||
case BC_JFUNCV:
|
||||
@ -2178,30 +2173,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break; /* NYI: compiled vararg functions. */
|
||||
|
||||
case BC_IFUNCV:
|
||||
dasm_put(Dst, 13814, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
|
||||
dasm_put(Dst, 13813, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
|
||||
if (op == BC_JFUNCV) {
|
||||
dasm_put(Dst, 13783, BC_JLOOP);
|
||||
dasm_put(Dst, 13782, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 13911, -4+PC2PROTO(k));
|
||||
dasm_put(Dst, 13910, -4+PC2PROTO(k));
|
||||
}
|
||||
dasm_put(Dst, 13936, LJ_TNIL);
|
||||
dasm_put(Dst, 13935, LJ_TNIL);
|
||||
break;
|
||||
|
||||
case BC_FUNCC:
|
||||
case BC_FUNCCW:
|
||||
dasm_put(Dst, 13958, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
|
||||
dasm_put(Dst, 13957, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
|
||||
if (op == BC_FUNCC) {
|
||||
dasm_put(Dst, 13988);
|
||||
dasm_put(Dst, 13987);
|
||||
} else {
|
||||
dasm_put(Dst, 13992);
|
||||
dasm_put(Dst, 13991);
|
||||
}
|
||||
dasm_put(Dst, 14000, DISPATCH_GL(vmstate), ~LJ_VMST_C);
|
||||
dasm_put(Dst, 13999, DISPATCH_GL(vmstate), ~LJ_VMST_C);
|
||||
if (op == BC_FUNCC) {
|
||||
dasm_put(Dst, 14010);
|
||||
dasm_put(Dst, 14009);
|
||||
} else {
|
||||
dasm_put(Dst, 14015, DISPATCH_GL(wrapf));
|
||||
dasm_put(Dst, 14014, DISPATCH_GL(wrapf));
|
||||
}
|
||||
dasm_put(Dst, 14021, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
|
||||
dasm_put(Dst, 14020, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
|
||||
break;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -2229,7 +2224,7 @@ static int build_backend(BuildCtx *ctx)
|
||||
|
||||
build_subroutines(ctx, cmov, sse);
|
||||
|
||||
dasm_put(Dst, 14047);
|
||||
dasm_put(Dst, 14046);
|
||||
for (op = 0; op < BC__MAX; op++)
|
||||
build_ins(ctx, (BCOp)op, op, cmov, sse);
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define DASM_SECTION_CODE_OP 0
|
||||
#define DASM_SECTION_CODE_SUB 1
|
||||
#define DASM_MAXSECTION 2
|
||||
static const unsigned char build_actionlist[13997] = {
|
||||
static const unsigned char build_actionlist[13996] = {
|
||||
254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,72,
|
||||
141,76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,
|
||||
36,84,252,247,198,237,15,132,244,13,248,14,252,247,198,237,15,132,244,10,
|
||||
@ -614,84 +614,84 @@ static const unsigned char build_actionlist[13997] = {
|
||||
15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,3,131,189,233,0,15,
|
||||
132,244,1,255,139,141,233,252,246,129,233,235,15,132,244,38,15,182,78,252,
|
||||
253,252,233,244,1,248,7,128,165,233,235,139,139,233,137,171,233,137,141,233,
|
||||
15,182,78,252,253,252,233,244,2,255,137,124,36,80,255,248,1,141,12,202,139,
|
||||
105,252,248,252,246,133,233,235,15,133,244,253,248,2,139,68,36,84,255,252,
|
||||
242,15,45,252,248,255,131,232,1,15,132,244,250,1,252,248,59,133,233,15,131,
|
||||
244,251,41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139,105,4,131,
|
||||
193,8,137,111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124,36,80,139,
|
||||
6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,5,139,
|
||||
76,36,96,137,145,233,137,252,234,65,137,192,137,205,137,116,36,100,232,251,
|
||||
1,33,139,149,233,15,182,78,252,253,252,233,244,1,248,7,128,165,233,235,139,
|
||||
131,233,137,171,233,255,137,133,233,252,233,244,2,255,3,68,36,84,255,129,
|
||||
124,253,202,4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,252,252,139,
|
||||
181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,252,235,255,
|
||||
141,76,202,8,137,215,139,105,252,248,129,121,253,252,252,239,15,133,244,28,
|
||||
248,52,139,114,252,252,252,247,198,237,15,133,244,253,248,1,137,106,252,248,
|
||||
137,68,36,84,131,232,1,15,132,244,249,248,2,139,41,137,47,139,105,4,137,111,
|
||||
4,131,199,8,131,193,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,68,
|
||||
36,84,128,189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,233,
|
||||
15,182,205,131,198,4,252,255,36,252,235,248,5,255,252,247,198,237,15,133,
|
||||
244,4,15,182,78,252,253,72,252,247,209,141,12,202,139,121,252,248,139,191,
|
||||
233,139,191,233,252,233,244,4,248,7,15,139,244,1,131,230,252,248,41,252,242,
|
||||
137,215,139,114,252,252,252,233,244,1,255,141,76,202,8,139,105,232,139,65,
|
||||
252,236,137,41,137,65,4,139,105,252,240,139,65,252,244,137,105,8,137,65,12,
|
||||
139,105,224,139,65,228,137,105,252,248,137,65,252,252,129,252,248,239,184,
|
||||
237,15,133,244,28,137,202,137,114,252,252,139,181,233,139,14,15,182,252,233,
|
||||
15,182,205,131,198,4,252,255,36,252,235,255,15,182,252,236,139,66,252,248,
|
||||
141,12,202,139,128,233,15,182,128,233,137,124,36,80,141,188,253,194,233,43,
|
||||
122,252,252,133,252,237,15,132,244,251,141,108,252,233,252,248,57,215,15,
|
||||
131,244,248,248,1,139,71,252,248,137,1,139,71,252,252,131,199,8,137,65,4,
|
||||
131,193,8,57,252,233,15,131,244,249,57,215,15,130,244,1,248,2,199,65,4,237,
|
||||
131,193,8,57,252,233,15,130,244,2,248,3,139,124,36,80,139,6,15,182,204,15,
|
||||
182,232,131,198,4,193,232,16,252,255,36,252,235,248,5,199,68,36,84,1,0,0,
|
||||
0,137,208,41,252,248,15,134,244,3,255,137,197,193,252,237,3,131,197,1,137,
|
||||
108,36,84,139,108,36,96,1,200,59,133,233,15,135,244,253,248,6,139,71,252,
|
||||
248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,215,15,130,244,6,
|
||||
252,233,244,3,248,7,137,149,233,137,141,233,137,116,36,100,41,215,139,84,
|
||||
36,84,131,252,234,1,137,252,233,232,251,1,0,139,149,233,139,141,233,1,215,
|
||||
252,233,244,6,255,193,225,3,255,248,1,139,114,252,252,137,68,36,84,252,247,
|
||||
198,237,15,133,244,253,255,248,13,137,215,131,232,1,15,132,244,249,248,2,
|
||||
139,44,15,137,111,252,248,139,108,15,4,137,111,252,252,131,199,8,131,232,
|
||||
1,15,133,244,2,248,3,139,68,36,84,15,182,110,252,255,248,5,57,197,15,135,
|
||||
244,252,255,139,108,10,4,137,106,252,252,139,44,10,137,106,252,248,255,248,
|
||||
5,56,70,252,255,15,135,244,252,255,15,182,78,252,253,72,252,247,209,141,20,
|
||||
202,139,122,252,248,139,191,233,139,191,233,139,6,15,182,204,15,182,232,131,
|
||||
198,4,193,232,16,252,255,36,252,235,248,6,255,199,71,252,252,237,131,199,
|
||||
8,255,199,68,194,252,244,237,255,131,192,1,252,233,244,5,248,7,15,139,244,
|
||||
14,131,230,252,248,41,252,242,255,1,252,241,255,137,252,245,209,252,237,129,
|
||||
229,239,102,131,172,253,43,233,1,15,132,244,140,255,141,12,202,255,129,121,
|
||||
253,4,239,15,135,244,53,129,121,253,12,239,15,135,244,53,255,139,105,20,255,
|
||||
129,252,253,239,15,135,244,53,255,252,242,15,16,1,252,242,15,16,73,8,255,
|
||||
252,242,15,88,65,16,252,242,15,17,1,133,252,237,15,136,244,249,255,15,140,
|
||||
244,249,255,102,15,46,200,248,1,252,242,15,17,65,24,255,221,65,8,221,1,255,
|
||||
220,65,16,221,17,221,81,24,133,252,237,15,136,244,247,255,221,81,24,15,140,
|
||||
244,247,255,217,201,248,1,255,15,183,70,252,254,255,15,131,244,248,141,180,
|
||||
253,134,233,255,141,180,253,134,233,15,183,70,252,254,15,131,245,255,15,130,
|
||||
244,248,141,180,253,134,233,255,248,3,102,15,46,193,252,233,244,1,255,141,
|
||||
12,202,139,105,4,129,252,253,239,15,132,244,247,255,137,105,252,252,139,41,
|
||||
137,105,252,248,252,233,245,255,141,180,253,134,233,139,1,137,105,252,252,
|
||||
137,65,252,248,255,139,139,233,139,4,193,72,139,128,233,139,108,36,96,137,
|
||||
147,233,137,171,233,76,137,100,36,80,76,137,108,36,32,76,137,116,36,24,76,
|
||||
137,124,36,16,72,137,225,72,129,252,236,239,102,15,127,49,102,15,127,185,
|
||||
233,102,68,15,127,129,233,102,68,15,127,137,233,102,68,15,127,145,233,102,
|
||||
68,15,127,153,233,102,68,15,127,161,233,102,68,15,127,169,233,102,68,15,127,
|
||||
177,233,102,68,15,127,185,233,252,255,224,255,141,180,253,134,233,139,6,15,
|
||||
182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,137,252,245,
|
||||
209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,244,142,255,139,190,
|
||||
233,139,108,36,96,141,12,202,59,141,233,15,135,244,23,15,182,142,233,57,200,
|
||||
15,134,244,249,248,2,255,15,183,70,252,254,252,233,245,255,248,3,199,68,194,
|
||||
252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237,
|
||||
141,4,194,139,122,252,248,137,104,252,252,137,120,252,248,139,108,36,96,141,
|
||||
12,200,59,141,233,15,135,244,22,137,209,137,194,15,182,174,233,133,252,237,
|
||||
15,132,244,248,248,1,131,193,8,57,209,15,131,244,249,139,121,252,248,137,
|
||||
56,139,121,252,252,137,120,4,131,192,8,199,65,252,252,237,131,252,237,1,15,
|
||||
133,244,1,248,2,255,139,190,233,139,6,15,182,204,15,182,232,131,198,4,193,
|
||||
232,16,252,255,36,252,235,255,248,3,199,64,4,237,131,192,8,131,252,237,1,
|
||||
15,133,244,3,252,233,244,2,255,139,106,252,248,72,139,189,233,139,108,36,
|
||||
96,141,68,194,252,248,137,149,233,141,136,233,59,141,233,137,133,233,255,
|
||||
137,252,233,255,72,137,252,250,137,252,233,255,15,135,244,21,199,131,233,
|
||||
237,255,252,255,215,255,252,255,147,233,255,199,131,233,237,139,149,233,141,
|
||||
12,194,252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254,0
|
||||
15,182,78,252,253,252,233,244,2,255,137,124,36,80,255,252,242,15,45,60,199,
|
||||
255,248,1,141,12,202,139,105,252,248,252,246,133,233,235,15,133,244,253,248,
|
||||
2,139,68,36,84,131,232,1,15,132,244,250,1,252,248,59,133,233,15,131,244,251,
|
||||
41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139,105,4,131,193,8,137,
|
||||
111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124,36,80,139,6,15,182,204,
|
||||
15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,5,139,76,36,96,137,
|
||||
145,233,137,252,234,65,137,192,137,205,137,116,36,100,232,251,1,33,139,149,
|
||||
233,15,182,78,252,253,252,233,244,1,248,7,255,128,165,233,235,139,131,233,
|
||||
137,171,233,137,133,233,252,233,244,2,255,3,68,36,84,255,129,124,253,202,
|
||||
4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,252,252,139,181,233,139,
|
||||
14,15,182,252,233,15,182,205,131,198,4,252,255,36,252,235,255,141,76,202,
|
||||
8,137,215,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248,52,139,
|
||||
114,252,252,252,247,198,237,15,133,244,253,248,1,137,106,252,248,137,68,36,
|
||||
84,131,232,1,15,132,244,249,248,2,139,41,137,47,139,105,4,137,111,4,131,199,
|
||||
8,131,193,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,84,128,
|
||||
189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,233,15,182,205,
|
||||
131,198,4,252,255,36,252,235,248,5,255,252,247,198,237,15,133,244,4,15,182,
|
||||
78,252,253,72,252,247,209,141,12,202,139,121,252,248,139,191,233,139,191,
|
||||
233,252,233,244,4,248,7,15,139,244,1,131,230,252,248,41,252,242,137,215,139,
|
||||
114,252,252,252,233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,
|
||||
41,137,65,4,139,105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,
|
||||
139,65,228,137,105,252,248,137,65,252,252,129,252,248,239,184,237,15,133,
|
||||
244,28,137,202,137,114,252,252,139,181,233,139,14,15,182,252,233,15,182,205,
|
||||
131,198,4,252,255,36,252,235,255,15,182,252,236,139,66,252,248,141,12,202,
|
||||
139,128,233,15,182,128,233,137,124,36,80,141,188,253,194,233,43,122,252,252,
|
||||
133,252,237,15,132,244,251,141,108,252,233,252,248,57,215,15,131,244,248,
|
||||
248,1,139,71,252,248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,
|
||||
252,233,15,131,244,249,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,
|
||||
252,233,15,130,244,2,248,3,139,124,36,80,139,6,15,182,204,15,182,232,131,
|
||||
198,4,193,232,16,252,255,36,252,235,248,5,199,68,36,84,1,0,0,0,137,208,41,
|
||||
252,248,15,134,244,3,255,137,197,193,252,237,3,131,197,1,137,108,36,84,139,
|
||||
108,36,96,1,200,59,133,233,15,135,244,253,248,6,139,71,252,248,137,1,139,
|
||||
71,252,252,131,199,8,137,65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,
|
||||
248,7,137,149,233,137,141,233,137,116,36,100,41,215,139,84,36,84,131,252,
|
||||
234,1,137,252,233,232,251,1,0,139,149,233,139,141,233,1,215,252,233,244,6,
|
||||
255,193,225,3,255,248,1,139,114,252,252,137,68,36,84,252,247,198,237,15,133,
|
||||
244,253,255,248,13,137,215,131,232,1,15,132,244,249,248,2,139,44,15,137,111,
|
||||
252,248,139,108,15,4,137,111,252,252,131,199,8,131,232,1,15,133,244,2,248,
|
||||
3,139,68,36,84,15,182,110,252,255,248,5,57,197,15,135,244,252,255,139,108,
|
||||
10,4,137,106,252,252,139,44,10,137,106,252,248,255,248,5,56,70,252,255,15,
|
||||
135,244,252,255,15,182,78,252,253,72,252,247,209,141,20,202,139,122,252,248,
|
||||
139,191,233,139,191,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
|
||||
252,255,36,252,235,248,6,255,199,71,252,252,237,131,199,8,255,199,68,194,
|
||||
252,244,237,255,131,192,1,252,233,244,5,248,7,15,139,244,14,131,230,252,248,
|
||||
41,252,242,255,1,252,241,255,137,252,245,209,252,237,129,229,239,102,131,
|
||||
172,253,43,233,1,15,132,244,140,255,141,12,202,255,129,121,253,4,239,15,135,
|
||||
244,53,129,121,253,12,239,15,135,244,53,255,139,105,20,255,129,252,253,239,
|
||||
15,135,244,53,255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,
|
||||
16,252,242,15,17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,
|
||||
15,46,200,248,1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,
|
||||
17,221,81,24,133,252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,
|
||||
217,201,248,1,255,15,183,70,252,254,255,15,131,244,248,141,180,253,134,233,
|
||||
255,141,180,253,134,233,15,183,70,252,254,15,131,245,255,15,130,244,248,141,
|
||||
180,253,134,233,255,248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,
|
||||
105,4,129,252,253,239,15,132,244,247,255,137,105,252,252,139,41,137,105,252,
|
||||
248,252,233,245,255,141,180,253,134,233,139,1,137,105,252,252,137,65,252,
|
||||
248,255,139,139,233,139,4,193,72,139,128,233,139,108,36,96,137,147,233,137,
|
||||
171,233,76,137,100,36,80,76,137,108,36,32,76,137,116,36,24,76,137,124,36,
|
||||
16,72,137,225,72,129,252,236,239,102,15,127,49,102,15,127,185,233,102,68,
|
||||
15,127,129,233,102,68,15,127,137,233,102,68,15,127,145,233,102,68,15,127,
|
||||
153,233,102,68,15,127,161,233,102,68,15,127,169,233,102,68,15,127,177,233,
|
||||
102,68,15,127,185,233,252,255,224,255,141,180,253,134,233,139,6,15,182,204,
|
||||
15,182,232,131,198,4,193,232,16,252,255,36,252,235,255,137,252,245,209,252,
|
||||
237,129,229,239,102,131,172,253,43,233,1,15,132,244,142,255,139,190,233,139,
|
||||
108,36,96,141,12,202,59,141,233,15,135,244,23,15,182,142,233,57,200,15,134,
|
||||
244,249,248,2,255,15,183,70,252,254,252,233,245,255,248,3,199,68,194,252,
|
||||
252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,255,141,44,197,237,141,
|
||||
4,194,139,122,252,248,137,104,252,252,137,120,252,248,139,108,36,96,141,12,
|
||||
200,59,141,233,15,135,244,22,137,209,137,194,15,182,174,233,133,252,237,15,
|
||||
132,244,248,248,1,131,193,8,57,209,15,131,244,249,139,121,252,248,137,56,
|
||||
139,121,252,252,137,120,4,131,192,8,199,65,252,252,237,131,252,237,1,15,133,
|
||||
244,1,248,2,255,139,190,233,139,6,15,182,204,15,182,232,131,198,4,193,232,
|
||||
16,252,255,36,252,235,255,248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,
|
||||
244,3,252,233,244,2,255,139,106,252,248,72,139,189,233,139,108,36,96,141,
|
||||
68,194,252,248,137,149,233,141,136,233,59,141,233,137,133,233,255,137,252,
|
||||
233,255,72,137,252,250,137,252,233,255,15,135,244,21,199,131,233,237,255,
|
||||
252,255,215,255,252,255,147,233,255,199,131,233,237,139,149,233,141,12,194,
|
||||
252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254,0
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -1960,16 +1960,11 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_TSETM:
|
||||
dasm_put(Dst, 12408);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 10963);
|
||||
dasm_put(Dst, 12413);
|
||||
} else {
|
||||
}
|
||||
dasm_put(Dst, 12413, Dt6(->marked), LJ_GC_BLACK);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 12438);
|
||||
} else {
|
||||
}
|
||||
dasm_put(Dst, 12445, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
|
||||
dasm_put(Dst, 12571, Dt6(->gclist));
|
||||
dasm_put(Dst, 12420, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
|
||||
dasm_put(Dst, 12560, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
|
||||
break;
|
||||
|
||||
/* -- Calls and vararg handling ----------------------------------------- */
|
||||
@ -1977,60 +1972,60 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_CALL: case BC_CALLM:
|
||||
dasm_put(Dst, 10079);
|
||||
if (op == BC_CALLM) {
|
||||
dasm_put(Dst, 12579);
|
||||
dasm_put(Dst, 12578);
|
||||
}
|
||||
dasm_put(Dst, 12584, LJ_TFUNC, Dt7(->pc));
|
||||
dasm_put(Dst, 12583, LJ_TFUNC, Dt7(->pc));
|
||||
break;
|
||||
|
||||
case BC_CALLMT:
|
||||
dasm_put(Dst, 12579);
|
||||
dasm_put(Dst, 12578);
|
||||
break;
|
||||
case BC_CALLT:
|
||||
dasm_put(Dst, 12626, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
|
||||
dasm_put(Dst, 12745, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
|
||||
dasm_put(Dst, 12625, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
|
||||
dasm_put(Dst, 12744, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
|
||||
break;
|
||||
|
||||
case BC_ITERC:
|
||||
dasm_put(Dst, 12803, LJ_TFUNC, 2+1, Dt7(->pc));
|
||||
dasm_put(Dst, 12802, LJ_TFUNC, 2+1, Dt7(->pc));
|
||||
break;
|
||||
|
||||
case BC_VARG:
|
||||
dasm_put(Dst, 12884, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
|
||||
dasm_put(Dst, 13029, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
|
||||
dasm_put(Dst, 12883, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
|
||||
dasm_put(Dst, 13028, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
|
||||
break;
|
||||
|
||||
/* -- Returns ----------------------------------------------------------- */
|
||||
|
||||
case BC_RETM:
|
||||
dasm_put(Dst, 12579);
|
||||
dasm_put(Dst, 12578);
|
||||
break;
|
||||
|
||||
case BC_RET: case BC_RET0: case BC_RET1:
|
||||
if (op != BC_RET0) {
|
||||
dasm_put(Dst, 13128);
|
||||
dasm_put(Dst, 13127);
|
||||
}
|
||||
dasm_put(Dst, 13132, FRAME_TYPE);
|
||||
dasm_put(Dst, 13131, FRAME_TYPE);
|
||||
switch (op) {
|
||||
case BC_RET:
|
||||
dasm_put(Dst, 13151);
|
||||
dasm_put(Dst, 13150);
|
||||
break;
|
||||
case BC_RET1:
|
||||
dasm_put(Dst, 13209);
|
||||
dasm_put(Dst, 13208);
|
||||
/* fallthrough */
|
||||
case BC_RET0:
|
||||
dasm_put(Dst, 13225);
|
||||
dasm_put(Dst, 13224);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dasm_put(Dst, 13236, Dt7(->pc), PC2PROTO(k));
|
||||
dasm_put(Dst, 13235, Dt7(->pc), PC2PROTO(k));
|
||||
if (op == BC_RET) {
|
||||
dasm_put(Dst, 13280, LJ_TNIL);
|
||||
dasm_put(Dst, 13279, LJ_TNIL);
|
||||
} else {
|
||||
dasm_put(Dst, 13289, LJ_TNIL);
|
||||
dasm_put(Dst, 13288, LJ_TNIL);
|
||||
}
|
||||
dasm_put(Dst, 13296);
|
||||
dasm_put(Dst, 13295);
|
||||
if (op != BC_RET0) {
|
||||
dasm_put(Dst, 13317);
|
||||
dasm_put(Dst, 13316);
|
||||
}
|
||||
dasm_put(Dst, 4570);
|
||||
break;
|
||||
@ -2040,7 +2035,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FORL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13321, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13320, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2052,57 +2047,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_FORI:
|
||||
case BC_IFORL:
|
||||
vk = (op == BC_IFORL || op == BC_JFORL);
|
||||
dasm_put(Dst, 13342);
|
||||
dasm_put(Dst, 13341);
|
||||
if (!vk) {
|
||||
dasm_put(Dst, 13346, LJ_TISNUM, LJ_TISNUM);
|
||||
dasm_put(Dst, 13345, LJ_TISNUM, LJ_TISNUM);
|
||||
}
|
||||
dasm_put(Dst, 13365);
|
||||
dasm_put(Dst, 13364);
|
||||
if (!vk) {
|
||||
dasm_put(Dst, 13369, LJ_TISNUM);
|
||||
dasm_put(Dst, 13368, LJ_TISNUM);
|
||||
}
|
||||
if (sse) {
|
||||
dasm_put(Dst, 13378);
|
||||
dasm_put(Dst, 13377);
|
||||
if (vk) {
|
||||
dasm_put(Dst, 13390);
|
||||
dasm_put(Dst, 13389);
|
||||
} else {
|
||||
dasm_put(Dst, 13409);
|
||||
dasm_put(Dst, 13408);
|
||||
}
|
||||
dasm_put(Dst, 13414);
|
||||
dasm_put(Dst, 13413);
|
||||
} else {
|
||||
dasm_put(Dst, 13427);
|
||||
dasm_put(Dst, 13426);
|
||||
if (vk) {
|
||||
dasm_put(Dst, 13433);
|
||||
dasm_put(Dst, 13432);
|
||||
} else {
|
||||
dasm_put(Dst, 13449);
|
||||
dasm_put(Dst, 13448);
|
||||
}
|
||||
dasm_put(Dst, 13457);
|
||||
dasm_put(Dst, 13456);
|
||||
if (cmov) {
|
||||
dasm_put(Dst, 9502);
|
||||
} else {
|
||||
dasm_put(Dst, 9508);
|
||||
}
|
||||
if (!cmov) {
|
||||
dasm_put(Dst, 13462);
|
||||
dasm_put(Dst, 13461);
|
||||
}
|
||||
}
|
||||
if (op == BC_FORI) {
|
||||
dasm_put(Dst, 13468, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13467, -BCBIAS_J*4);
|
||||
} else if (op == BC_JFORI) {
|
||||
dasm_put(Dst, 13478, -BCBIAS_J*4, BC_JLOOP);
|
||||
dasm_put(Dst, 13477, -BCBIAS_J*4, BC_JLOOP);
|
||||
} else if (op == BC_IFORL) {
|
||||
dasm_put(Dst, 13492, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13491, -BCBIAS_J*4);
|
||||
} else {
|
||||
dasm_put(Dst, 13488, BC_JLOOP);
|
||||
dasm_put(Dst, 13487, BC_JLOOP);
|
||||
}
|
||||
dasm_put(Dst, 9537);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 13502);
|
||||
dasm_put(Dst, 13501);
|
||||
}
|
||||
break;
|
||||
|
||||
case BC_ITERL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13321, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13320, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2111,18 +2106,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break;
|
||||
#endif
|
||||
case BC_IITERL:
|
||||
dasm_put(Dst, 13513, LJ_TNIL);
|
||||
dasm_put(Dst, 13512, LJ_TNIL);
|
||||
if (op == BC_JITERL) {
|
||||
dasm_put(Dst, 13528, BC_JLOOP);
|
||||
dasm_put(Dst, 13527, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 13542, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13541, -BCBIAS_J*4);
|
||||
}
|
||||
dasm_put(Dst, 9837);
|
||||
break;
|
||||
|
||||
case BC_LOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13321, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13320, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2132,12 +2127,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_JLOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13558, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), 9*16+4*8, -1*16, -2*16, -3*16, -4*16, -5*16, -6*16, -7*16, -8*16, -9*16);
|
||||
dasm_put(Dst, 13557, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L), 9*16+4*8, -1*16, -2*16, -3*16, -4*16, -5*16, -6*16, -7*16, -8*16, -9*16);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case BC_JMP:
|
||||
dasm_put(Dst, 13667, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 13666, -BCBIAS_J*4);
|
||||
break;
|
||||
|
||||
/* -- Function headers -------------------------------------------------- */
|
||||
@ -2151,7 +2146,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FUNCF:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 13692, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 13691, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
case BC_FUNCV: /* NYI: compiled vararg functions. */
|
||||
break;
|
||||
@ -2161,13 +2156,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break;
|
||||
#endif
|
||||
case BC_IFUNCF:
|
||||
dasm_put(Dst, 13713, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
|
||||
dasm_put(Dst, 13712, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
|
||||
if (op == BC_JFUNCF) {
|
||||
dasm_put(Dst, 13743, BC_JLOOP);
|
||||
dasm_put(Dst, 13742, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 9539);
|
||||
}
|
||||
dasm_put(Dst, 13752, LJ_TNIL);
|
||||
dasm_put(Dst, 13751, LJ_TNIL);
|
||||
break;
|
||||
|
||||
case BC_JFUNCV:
|
||||
@ -2178,30 +2173,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break; /* NYI: compiled vararg functions. */
|
||||
|
||||
case BC_IFUNCV:
|
||||
dasm_put(Dst, 13774, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
|
||||
dasm_put(Dst, 13773, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
|
||||
if (op == BC_JFUNCV) {
|
||||
dasm_put(Dst, 13743, BC_JLOOP);
|
||||
dasm_put(Dst, 13742, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 13865, -4+PC2PROTO(k));
|
||||
dasm_put(Dst, 13864, -4+PC2PROTO(k));
|
||||
}
|
||||
dasm_put(Dst, 13888, LJ_TNIL);
|
||||
dasm_put(Dst, 13887, LJ_TNIL);
|
||||
break;
|
||||
|
||||
case BC_FUNCC:
|
||||
case BC_FUNCCW:
|
||||
dasm_put(Dst, 13910, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
|
||||
dasm_put(Dst, 13909, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
|
||||
if (op == BC_FUNCC) {
|
||||
dasm_put(Dst, 13940);
|
||||
dasm_put(Dst, 13939);
|
||||
} else {
|
||||
dasm_put(Dst, 13944);
|
||||
dasm_put(Dst, 13943);
|
||||
}
|
||||
dasm_put(Dst, 13952, DISPATCH_GL(vmstate), ~LJ_VMST_C);
|
||||
dasm_put(Dst, 13951, DISPATCH_GL(vmstate), ~LJ_VMST_C);
|
||||
if (op == BC_FUNCC) {
|
||||
dasm_put(Dst, 13961);
|
||||
dasm_put(Dst, 13960);
|
||||
} else {
|
||||
dasm_put(Dst, 13965, DISPATCH_GL(wrapf));
|
||||
dasm_put(Dst, 13964, DISPATCH_GL(wrapf));
|
||||
}
|
||||
dasm_put(Dst, 13970, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
|
||||
dasm_put(Dst, 13969, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
|
||||
break;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -2229,7 +2224,7 @@ static int build_backend(BuildCtx *ctx)
|
||||
|
||||
build_subroutines(ctx, cmov, sse);
|
||||
|
||||
dasm_put(Dst, 13995);
|
||||
dasm_put(Dst, 13994);
|
||||
for (op = 0; op < BC__MAX; op++)
|
||||
build_ins(ctx, (BCOp)op, op, cmov, sse);
|
||||
|
||||
|
@ -4284,11 +4284,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
| ins_AD // RA = base (table at base-1), RD = num const (start index)
|
||||
| mov TMP1, KBASE // Need one more free register.
|
||||
if (sse) {
|
||||
| movsd xmm0, qword [KBASE+RD*8]
|
||||
| cvtsd2si KBASE, qword [KBASE+RD*8]
|
||||
} else {
|
||||
|.if not X64
|
||||
| fld qword [KBASE+RD*8]
|
||||
| fistp ARG4 // Const is guaranteed to be an int.
|
||||
| mov KBASE, ARG4
|
||||
|.endif
|
||||
}
|
||||
|1:
|
||||
@ -4298,13 +4299,6 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
| jnz >7
|
||||
|2:
|
||||
| mov RD, MULTRES
|
||||
if (sse) {
|
||||
| cvtsd2si KBASE, xmm0 // Const is guaranteed to be an int.
|
||||
} else {
|
||||
|.if not X64
|
||||
| mov KBASE, ARG4
|
||||
|.endif
|
||||
}
|
||||
| sub RD, 1
|
||||
| jz >4 // Nothing to copy?
|
||||
| add RD, KBASE // Compute needed size.
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define DASM_SECTION_CODE_OP 0
|
||||
#define DASM_SECTION_CODE_SUB 1
|
||||
#define DASM_MAXSECTION 2
|
||||
static const unsigned char build_actionlist[15198] = {
|
||||
static const unsigned char build_actionlist[15196] = {
|
||||
254,1,248,10,252,247,198,237,15,132,244,11,131,230,252,248,41,252,242,141,
|
||||
76,49,252,248,139,114,252,252,199,68,10,4,237,248,12,131,192,1,137,68,36,
|
||||
20,252,247,198,237,15,132,244,13,248,14,252,247,198,237,15,132,244,10,199,
|
||||
@ -672,80 +672,79 @@ static const unsigned char build_actionlist[15198] = {
|
||||
255,36,171,248,3,131,189,233,0,15,132,244,1,255,139,141,233,252,246,129,233,
|
||||
235,15,132,244,38,15,182,78,252,253,252,233,244,1,248,7,128,165,233,235,139,
|
||||
139,233,137,171,233,137,141,233,15,182,78,252,253,252,233,244,2,255,137,124,
|
||||
36,16,255,221,4,199,219,92,36,12,255,248,1,141,12,202,139,105,252,248,252,
|
||||
246,133,233,235,15,133,244,253,248,2,139,68,36,20,255,252,242,15,45,252,248,
|
||||
255,139,124,36,12,255,131,232,1,15,132,244,250,1,252,248,59,133,233,15,131,
|
||||
244,251,41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139,105,4,131,
|
||||
193,8,137,111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124,36,16,139,
|
||||
6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,5,137,108,
|
||||
36,4,139,108,36,48,137,149,233,137,68,36,8,137,44,36,137,116,36,24,232,251,
|
||||
1,33,139,149,233,15,182,78,252,253,252,233,244,1,248,7,128,165,233,235,139,
|
||||
131,233,137,171,233,255,137,133,233,252,233,244,2,255,3,68,36,20,255,129,
|
||||
124,253,202,4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,252,252,139,
|
||||
181,233,139,14,15,182,252,233,15,182,205,131,198,4,252,255,36,171,255,141,
|
||||
76,202,8,137,215,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248,
|
||||
52,139,114,252,252,252,247,198,237,15,133,244,253,248,1,137,106,252,248,137,
|
||||
68,36,20,131,232,1,15,132,244,249,248,2,139,41,137,47,139,105,4,137,111,4,
|
||||
131,199,8,131,193,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,
|
||||
20,128,189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,233,15,
|
||||
182,205,131,198,4,252,255,36,171,248,5,255,252,247,198,237,15,133,244,4,15,
|
||||
182,78,252,253,252,247,209,141,12,202,139,121,252,248,139,191,233,139,191,
|
||||
233,252,233,244,4,248,7,15,139,244,1,131,230,252,248,41,252,242,137,215,139,
|
||||
114,252,252,252,233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,
|
||||
41,137,65,4,139,105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,
|
||||
139,65,228,137,105,252,248,137,65,252,252,129,252,248,239,184,237,15,133,
|
||||
244,28,137,202,137,114,252,252,139,181,233,139,14,15,182,252,233,15,182,205,
|
||||
131,198,4,252,255,36,171,255,15,182,252,236,139,66,252,248,141,12,202,139,
|
||||
128,233,15,182,128,233,137,124,36,16,141,188,253,194,233,43,122,252,252,133,
|
||||
252,237,15,132,244,251,141,108,252,233,252,248,57,215,15,131,244,248,248,
|
||||
1,139,71,252,248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,252,
|
||||
233,15,131,244,249,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,
|
||||
233,15,130,244,2,248,3,139,124,36,16,139,6,15,182,204,15,182,232,131,198,
|
||||
4,193,232,16,252,255,36,171,248,5,199,68,36,20,1,0,0,0,137,208,41,252,248,
|
||||
15,134,244,3,255,137,197,193,252,237,3,131,197,1,137,108,36,20,139,108,36,
|
||||
48,1,200,59,133,233,15,135,244,253,248,6,139,71,252,248,137,1,139,71,252,
|
||||
252,131,199,8,137,65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,
|
||||
137,149,233,137,141,233,137,116,36,24,41,215,139,84,36,20,131,252,234,1,137,
|
||||
252,233,232,251,1,0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,
|
||||
3,255,248,1,139,114,252,252,137,68,36,20,252,247,198,237,15,133,244,253,255,
|
||||
248,13,137,215,131,232,1,15,132,244,249,248,2,139,44,15,137,111,252,248,139,
|
||||
108,15,4,137,111,252,252,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,
|
||||
20,15,182,110,252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,
|
||||
252,252,139,44,10,137,106,252,248,255,248,5,56,70,252,255,15,135,244,252,
|
||||
255,15,182,78,252,253,252,247,209,141,20,202,139,122,252,248,139,191,233,
|
||||
139,191,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,
|
||||
248,6,255,199,71,252,252,237,131,199,8,255,199,68,194,252,244,237,255,131,
|
||||
192,1,252,233,244,5,248,7,15,139,244,14,131,230,252,248,41,252,242,255,1,
|
||||
252,241,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,
|
||||
15,132,244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121,
|
||||
253,12,239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53,
|
||||
255,252,242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,
|
||||
17,1,133,252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,
|
||||
1,252,242,15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,
|
||||
252,237,15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,
|
||||
15,183,70,252,254,255,15,131,244,248,141,180,253,134,233,255,141,180,253,
|
||||
134,233,15,183,70,252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,
|
||||
255,248,3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,
|
||||
239,15,132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,
|
||||
255,141,180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,
|
||||
233,139,4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,
|
||||
255,141,180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,
|
||||
252,255,36,171,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,
|
||||
233,1,15,132,244,142,255,139,190,233,139,108,36,48,141,12,202,59,141,233,
|
||||
15,135,244,23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,
|
||||
254,252,233,245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,
|
||||
244,3,252,233,244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,
|
||||
252,252,137,120,252,248,139,108,36,48,141,12,200,59,141,233,15,135,244,22,
|
||||
137,209,137,194,15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,
|
||||
57,209,15,131,244,249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,
|
||||
192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,
|
||||
139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,
|
||||
199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,
|
||||
252,248,139,189,233,139,108,36,48,141,68,194,252,248,137,149,233,141,136,
|
||||
233,59,141,233,137,133,233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,
|
||||
135,244,21,199,131,233,237,255,252,255,215,255,252,255,147,233,255,199,131,
|
||||
233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,114,252,252,252,
|
||||
233,244,12,255,254,0
|
||||
36,16,255,252,242,15,45,60,199,255,221,4,199,219,92,36,12,139,124,36,12,255,
|
||||
248,1,141,12,202,139,105,252,248,252,246,133,233,235,15,133,244,253,248,2,
|
||||
139,68,36,20,131,232,1,15,132,244,250,1,252,248,59,133,233,15,131,244,251,
|
||||
41,252,248,193,231,3,3,189,233,248,3,139,41,137,47,139,105,4,131,193,8,137,
|
||||
111,4,131,199,8,131,232,1,15,133,244,3,248,4,139,124,36,16,139,6,15,182,204,
|
||||
15,182,232,131,198,4,193,232,16,252,255,36,171,248,5,137,108,36,4,139,108,
|
||||
36,48,137,149,233,137,68,36,8,137,44,36,137,116,36,24,232,251,1,33,139,149,
|
||||
233,15,182,78,252,253,252,233,244,1,248,7,255,128,165,233,235,139,131,233,
|
||||
137,171,233,137,133,233,252,233,244,2,255,3,68,36,20,255,129,124,253,202,
|
||||
4,239,139,44,202,15,133,244,51,141,84,202,8,137,114,252,252,139,181,233,139,
|
||||
14,15,182,252,233,15,182,205,131,198,4,252,255,36,171,255,141,76,202,8,137,
|
||||
215,139,105,252,248,129,121,253,252,252,239,15,133,244,28,248,52,139,114,
|
||||
252,252,252,247,198,237,15,133,244,253,248,1,137,106,252,248,137,68,36,20,
|
||||
131,232,1,15,132,244,249,248,2,139,41,137,47,139,105,4,137,111,4,131,199,
|
||||
8,131,193,8,131,232,1,15,133,244,2,139,106,252,248,248,3,139,68,36,20,128,
|
||||
189,233,1,15,135,244,251,248,4,139,181,233,139,14,15,182,252,233,15,182,205,
|
||||
131,198,4,252,255,36,171,248,5,255,252,247,198,237,15,133,244,4,15,182,78,
|
||||
252,253,252,247,209,141,12,202,139,121,252,248,139,191,233,139,191,233,252,
|
||||
233,244,4,248,7,15,139,244,1,131,230,252,248,41,252,242,137,215,139,114,252,
|
||||
252,252,233,244,1,255,141,76,202,8,139,105,232,139,65,252,236,137,41,137,
|
||||
65,4,139,105,252,240,139,65,252,244,137,105,8,137,65,12,139,105,224,139,65,
|
||||
228,137,105,252,248,137,65,252,252,129,252,248,239,184,237,15,133,244,28,
|
||||
137,202,137,114,252,252,139,181,233,139,14,15,182,252,233,15,182,205,131,
|
||||
198,4,252,255,36,171,255,15,182,252,236,139,66,252,248,141,12,202,139,128,
|
||||
233,15,182,128,233,137,124,36,16,141,188,253,194,233,43,122,252,252,133,252,
|
||||
237,15,132,244,251,141,108,252,233,252,248,57,215,15,131,244,248,248,1,139,
|
||||
71,252,248,137,1,139,71,252,252,131,199,8,137,65,4,131,193,8,57,252,233,15,
|
||||
131,244,249,57,215,15,130,244,1,248,2,199,65,4,237,131,193,8,57,252,233,15,
|
||||
130,244,2,248,3,139,124,36,16,139,6,15,182,204,15,182,232,131,198,4,193,232,
|
||||
16,252,255,36,171,248,5,199,68,36,20,1,0,0,0,137,208,41,252,248,15,134,244,
|
||||
3,255,137,197,193,252,237,3,131,197,1,137,108,36,20,139,108,36,48,1,200,59,
|
||||
133,233,15,135,244,253,248,6,139,71,252,248,137,1,139,71,252,252,131,199,
|
||||
8,137,65,4,131,193,8,57,215,15,130,244,6,252,233,244,3,248,7,137,149,233,
|
||||
137,141,233,137,116,36,24,41,215,139,84,36,20,131,252,234,1,137,252,233,232,
|
||||
251,1,0,139,149,233,139,141,233,1,215,252,233,244,6,255,193,225,3,255,248,
|
||||
1,139,114,252,252,137,68,36,20,252,247,198,237,15,133,244,253,255,248,13,
|
||||
137,215,131,232,1,15,132,244,249,248,2,139,44,15,137,111,252,248,139,108,
|
||||
15,4,137,111,252,252,131,199,8,131,232,1,15,133,244,2,248,3,139,68,36,20,
|
||||
15,182,110,252,255,248,5,57,197,15,135,244,252,255,139,108,10,4,137,106,252,
|
||||
252,139,44,10,137,106,252,248,255,248,5,56,70,252,255,15,135,244,252,255,
|
||||
15,182,78,252,253,252,247,209,141,20,202,139,122,252,248,139,191,233,139,
|
||||
191,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,
|
||||
6,255,199,71,252,252,237,131,199,8,255,199,68,194,252,244,237,255,131,192,
|
||||
1,252,233,244,5,248,7,15,139,244,14,131,230,252,248,41,252,242,255,1,252,
|
||||
241,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,132,
|
||||
244,140,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121,253,12,
|
||||
239,15,135,244,53,255,139,105,20,255,129,252,253,239,15,135,244,53,255,252,
|
||||
242,15,16,1,252,242,15,16,73,8,255,252,242,15,88,65,16,252,242,15,17,1,133,
|
||||
252,237,15,136,244,249,255,15,140,244,249,255,102,15,46,200,248,1,252,242,
|
||||
15,17,65,24,255,221,65,8,221,1,255,220,65,16,221,17,221,81,24,133,252,237,
|
||||
15,136,244,247,255,221,81,24,15,140,244,247,255,217,201,248,1,255,15,183,
|
||||
70,252,254,255,15,131,244,248,141,180,253,134,233,255,141,180,253,134,233,
|
||||
15,183,70,252,254,15,131,245,255,15,130,244,248,141,180,253,134,233,255,248,
|
||||
3,102,15,46,193,252,233,244,1,255,141,12,202,139,105,4,129,252,253,239,15,
|
||||
132,244,247,255,137,105,252,252,139,41,137,105,252,248,252,233,245,255,141,
|
||||
180,253,134,233,139,1,137,105,252,252,137,65,252,248,255,139,139,233,139,
|
||||
4,129,139,128,233,139,108,36,48,137,147,233,137,171,233,252,255,224,255,141,
|
||||
180,253,134,233,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,
|
||||
36,171,255,137,252,245,209,252,237,129,229,239,102,131,172,253,43,233,1,15,
|
||||
132,244,142,255,139,190,233,139,108,36,48,141,12,202,59,141,233,15,135,244,
|
||||
23,15,182,142,233,57,200,15,134,244,249,248,2,255,15,183,70,252,254,252,233,
|
||||
245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,
|
||||
244,2,255,141,44,197,237,141,4,194,139,122,252,248,137,104,252,252,137,120,
|
||||
252,248,139,108,36,48,141,12,200,59,141,233,15,135,244,22,137,209,137,194,
|
||||
15,182,174,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,
|
||||
249,139,121,252,248,137,56,139,121,252,252,137,120,4,131,192,8,199,65,252,
|
||||
252,237,131,252,237,1,15,133,244,1,248,2,255,139,190,233,139,6,15,182,204,
|
||||
15,182,232,131,198,4,193,232,16,252,255,36,171,255,248,3,199,64,4,237,131,
|
||||
192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,139,106,252,248,139,189,
|
||||
233,139,108,36,48,141,68,194,252,248,137,149,233,141,136,233,59,141,233,137,
|
||||
133,233,255,137,44,36,255,137,124,36,4,137,44,36,255,15,135,244,21,199,131,
|
||||
233,237,255,252,255,215,255,252,255,147,233,255,199,131,233,237,139,149,233,
|
||||
141,12,194,252,247,217,3,141,233,139,114,252,252,252,233,244,12,255,254,0
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -2086,18 +2085,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_TSETM:
|
||||
dasm_put(Dst, 13690);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 12241);
|
||||
} else {
|
||||
dasm_put(Dst, 13695);
|
||||
}
|
||||
dasm_put(Dst, 13703, Dt6(->marked), LJ_GC_BLACK);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 13728);
|
||||
} else {
|
||||
dasm_put(Dst, 13735);
|
||||
dasm_put(Dst, 13702);
|
||||
}
|
||||
dasm_put(Dst, 13740, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain));
|
||||
dasm_put(Dst, 13868, Dt6(->gclist));
|
||||
dasm_put(Dst, 13714, Dt6(->marked), LJ_GC_BLACK, Dt6(->asize), Dt6(->array), Dt1(->base), Dt1(->base));
|
||||
dasm_put(Dst, 13856, Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist));
|
||||
break;
|
||||
|
||||
/* -- Calls and vararg handling ----------------------------------------- */
|
||||
@ -2105,60 +2098,60 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_CALL: case BC_CALLM:
|
||||
dasm_put(Dst, 11362);
|
||||
if (op == BC_CALLM) {
|
||||
dasm_put(Dst, 13876);
|
||||
dasm_put(Dst, 13874);
|
||||
}
|
||||
dasm_put(Dst, 13881, LJ_TFUNC, Dt7(->pc));
|
||||
dasm_put(Dst, 13879, LJ_TFUNC, Dt7(->pc));
|
||||
break;
|
||||
|
||||
case BC_CALLMT:
|
||||
dasm_put(Dst, 13876);
|
||||
dasm_put(Dst, 13874);
|
||||
break;
|
||||
case BC_CALLT:
|
||||
dasm_put(Dst, 13922, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
|
||||
dasm_put(Dst, 14040, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
|
||||
dasm_put(Dst, 13920, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc));
|
||||
dasm_put(Dst, 14038, FRAME_TYPE, Dt7(->pc), PC2PROTO(k));
|
||||
break;
|
||||
|
||||
case BC_ITERC:
|
||||
dasm_put(Dst, 14097, LJ_TFUNC, 2+1, Dt7(->pc));
|
||||
dasm_put(Dst, 14095, LJ_TFUNC, 2+1, Dt7(->pc));
|
||||
break;
|
||||
|
||||
case BC_VARG:
|
||||
dasm_put(Dst, 14177, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
|
||||
dasm_put(Dst, 14321, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
|
||||
dasm_put(Dst, 14175, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL);
|
||||
dasm_put(Dst, 14319, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top));
|
||||
break;
|
||||
|
||||
/* -- Returns ----------------------------------------------------------- */
|
||||
|
||||
case BC_RETM:
|
||||
dasm_put(Dst, 13876);
|
||||
dasm_put(Dst, 13874);
|
||||
break;
|
||||
|
||||
case BC_RET: case BC_RET0: case BC_RET1:
|
||||
if (op != BC_RET0) {
|
||||
dasm_put(Dst, 14420);
|
||||
dasm_put(Dst, 14418);
|
||||
}
|
||||
dasm_put(Dst, 14424, FRAME_TYPE);
|
||||
dasm_put(Dst, 14422, FRAME_TYPE);
|
||||
switch (op) {
|
||||
case BC_RET:
|
||||
dasm_put(Dst, 14443);
|
||||
dasm_put(Dst, 14441);
|
||||
break;
|
||||
case BC_RET1:
|
||||
dasm_put(Dst, 14501);
|
||||
dasm_put(Dst, 14499);
|
||||
/* fallthrough */
|
||||
case BC_RET0:
|
||||
dasm_put(Dst, 14517);
|
||||
dasm_put(Dst, 14515);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dasm_put(Dst, 14528, Dt7(->pc), PC2PROTO(k));
|
||||
dasm_put(Dst, 14526, Dt7(->pc), PC2PROTO(k));
|
||||
if (op == BC_RET) {
|
||||
dasm_put(Dst, 14570, LJ_TNIL);
|
||||
dasm_put(Dst, 14568, LJ_TNIL);
|
||||
} else {
|
||||
dasm_put(Dst, 14579, LJ_TNIL);
|
||||
dasm_put(Dst, 14577, LJ_TNIL);
|
||||
}
|
||||
dasm_put(Dst, 14586);
|
||||
dasm_put(Dst, 14584);
|
||||
if (op != BC_RET0) {
|
||||
dasm_put(Dst, 14607);
|
||||
dasm_put(Dst, 14605);
|
||||
}
|
||||
dasm_put(Dst, 4680);
|
||||
break;
|
||||
@ -2168,7 +2161,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FORL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 14611, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 14609, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2180,57 +2173,57 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
case BC_FORI:
|
||||
case BC_IFORL:
|
||||
vk = (op == BC_IFORL || op == BC_JFORL);
|
||||
dasm_put(Dst, 14632);
|
||||
dasm_put(Dst, 14630);
|
||||
if (!vk) {
|
||||
dasm_put(Dst, 14636, LJ_TISNUM, LJ_TISNUM);
|
||||
dasm_put(Dst, 14634, LJ_TISNUM, LJ_TISNUM);
|
||||
}
|
||||
dasm_put(Dst, 14655);
|
||||
dasm_put(Dst, 14653);
|
||||
if (!vk) {
|
||||
dasm_put(Dst, 14659, LJ_TISNUM);
|
||||
dasm_put(Dst, 14657, LJ_TISNUM);
|
||||
}
|
||||
if (sse) {
|
||||
dasm_put(Dst, 14668);
|
||||
dasm_put(Dst, 14666);
|
||||
if (vk) {
|
||||
dasm_put(Dst, 14680);
|
||||
dasm_put(Dst, 14678);
|
||||
} else {
|
||||
dasm_put(Dst, 14699);
|
||||
dasm_put(Dst, 14697);
|
||||
}
|
||||
dasm_put(Dst, 14704);
|
||||
dasm_put(Dst, 14702);
|
||||
} else {
|
||||
dasm_put(Dst, 14717);
|
||||
dasm_put(Dst, 14715);
|
||||
if (vk) {
|
||||
dasm_put(Dst, 14723);
|
||||
dasm_put(Dst, 14721);
|
||||
} else {
|
||||
dasm_put(Dst, 14739);
|
||||
dasm_put(Dst, 14737);
|
||||
}
|
||||
dasm_put(Dst, 14747);
|
||||
dasm_put(Dst, 14745);
|
||||
if (cmov) {
|
||||
dasm_put(Dst, 10777);
|
||||
} else {
|
||||
dasm_put(Dst, 10783);
|
||||
}
|
||||
if (!cmov) {
|
||||
dasm_put(Dst, 14752);
|
||||
dasm_put(Dst, 14750);
|
||||
}
|
||||
}
|
||||
if (op == BC_FORI) {
|
||||
dasm_put(Dst, 14758, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 14756, -BCBIAS_J*4);
|
||||
} else if (op == BC_JFORI) {
|
||||
dasm_put(Dst, 14768, -BCBIAS_J*4, BC_JLOOP);
|
||||
dasm_put(Dst, 14766, -BCBIAS_J*4, BC_JLOOP);
|
||||
} else if (op == BC_IFORL) {
|
||||
dasm_put(Dst, 14782, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 14780, -BCBIAS_J*4);
|
||||
} else {
|
||||
dasm_put(Dst, 14778, BC_JLOOP);
|
||||
dasm_put(Dst, 14776, BC_JLOOP);
|
||||
}
|
||||
dasm_put(Dst, 10812);
|
||||
if (sse) {
|
||||
dasm_put(Dst, 14792);
|
||||
dasm_put(Dst, 14790);
|
||||
}
|
||||
break;
|
||||
|
||||
case BC_ITERL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 14611, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 14609, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2239,18 +2232,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break;
|
||||
#endif
|
||||
case BC_IITERL:
|
||||
dasm_put(Dst, 14803, LJ_TNIL);
|
||||
dasm_put(Dst, 14801, LJ_TNIL);
|
||||
if (op == BC_JITERL) {
|
||||
dasm_put(Dst, 14818, BC_JLOOP);
|
||||
dasm_put(Dst, 14816, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 14832, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 14830, -BCBIAS_J*4);
|
||||
}
|
||||
dasm_put(Dst, 11109);
|
||||
break;
|
||||
|
||||
case BC_LOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 14611, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 14609, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -2260,12 +2253,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_JLOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 14848, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
|
||||
dasm_put(Dst, 14846, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case BC_JMP:
|
||||
dasm_put(Dst, 14871, -BCBIAS_J*4);
|
||||
dasm_put(Dst, 14869, -BCBIAS_J*4);
|
||||
break;
|
||||
|
||||
/* -- Function headers -------------------------------------------------- */
|
||||
@ -2279,7 +2272,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FUNCF:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 14895, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 14893, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
#endif
|
||||
case BC_FUNCV: /* NYI: compiled vararg functions. */
|
||||
break;
|
||||
@ -2289,13 +2282,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break;
|
||||
#endif
|
||||
case BC_IFUNCF:
|
||||
dasm_put(Dst, 14916, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
|
||||
dasm_put(Dst, 14914, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams));
|
||||
if (op == BC_JFUNCF) {
|
||||
dasm_put(Dst, 14946, BC_JLOOP);
|
||||
dasm_put(Dst, 14944, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 10814);
|
||||
}
|
||||
dasm_put(Dst, 14955, LJ_TNIL);
|
||||
dasm_put(Dst, 14953, LJ_TNIL);
|
||||
break;
|
||||
|
||||
case BC_JFUNCV:
|
||||
@ -2306,30 +2299,30 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
break; /* NYI: compiled vararg functions. */
|
||||
|
||||
case BC_IFUNCV:
|
||||
dasm_put(Dst, 14977, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
|
||||
dasm_put(Dst, 14975, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL);
|
||||
if (op == BC_JFUNCV) {
|
||||
dasm_put(Dst, 14946, BC_JLOOP);
|
||||
dasm_put(Dst, 14944, BC_JLOOP);
|
||||
} else {
|
||||
dasm_put(Dst, 15068, -4+PC2PROTO(k));
|
||||
dasm_put(Dst, 15066, -4+PC2PROTO(k));
|
||||
}
|
||||
dasm_put(Dst, 15090, LJ_TNIL);
|
||||
dasm_put(Dst, 15088, LJ_TNIL);
|
||||
break;
|
||||
|
||||
case BC_FUNCC:
|
||||
case BC_FUNCCW:
|
||||
dasm_put(Dst, 15112, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
|
||||
dasm_put(Dst, 15110, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top));
|
||||
if (op == BC_FUNCC) {
|
||||
dasm_put(Dst, 15141);
|
||||
dasm_put(Dst, 15139);
|
||||
} else {
|
||||
dasm_put(Dst, 15145);
|
||||
dasm_put(Dst, 15143);
|
||||
}
|
||||
dasm_put(Dst, 15153, DISPATCH_GL(vmstate), ~LJ_VMST_C);
|
||||
dasm_put(Dst, 15151, DISPATCH_GL(vmstate), ~LJ_VMST_C);
|
||||
if (op == BC_FUNCC) {
|
||||
dasm_put(Dst, 15162);
|
||||
dasm_put(Dst, 15160);
|
||||
} else {
|
||||
dasm_put(Dst, 15166, DISPATCH_GL(wrapf));
|
||||
dasm_put(Dst, 15164, DISPATCH_GL(wrapf));
|
||||
}
|
||||
dasm_put(Dst, 15171, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
|
||||
dasm_put(Dst, 15169, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top));
|
||||
break;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -2357,7 +2350,7 @@ static int build_backend(BuildCtx *ctx)
|
||||
|
||||
build_subroutines(ctx, cmov, sse);
|
||||
|
||||
dasm_put(Dst, 15196);
|
||||
dasm_put(Dst, 15194);
|
||||
for (op = 0; op < BC__MAX; op++)
|
||||
build_ins(ctx, (BCOp)op, op, cmov, sse);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user