From 2a2f8ed6a144fe763379f9cf0eb6a45750432a47 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 14 Feb 2010 20:48:33 +0100 Subject: Implement return hooks for Lua functions (zero-cost if disabled). --- src/buildvm_x64.h | 1099 +++++++++++++++++++++++++------------------------- src/buildvm_x64win.h | 761 +++++++++++++++++----------------- src/buildvm_x86.dasc | 8 +- src/buildvm_x86.h | 1025 +++++++++++++++++++++++----------------------- src/lj_dispatch.c | 38 +- src/lj_dispatch.h | 3 +- src/lj_vm.h | 3 +- 7 files changed, 1490 insertions(+), 1447 deletions(-) (limited to 'src') diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h index ac2ee63e..c738eaa4 100644 --- a/src/buildvm_x64.h +++ b/src/buildvm_x64.h @@ -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[13665] = { +static const unsigned char build_actionlist[13682] = { 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, @@ -354,254 +354,255 @@ static const unsigned char build_actionlist[13665] = { 1,19,139,149,233,139,133,233,41,208,193,232,3,131,192,1,72,139,108,36,24, 85,195,248,136,255,65,15,182,134,233,168,235,15,133,244,251,168,235,15,133, 244,247,168,235,15,132,244,247,65,252,255,142,233,252,233,244,247,255,248, - 137,65,15,182,134,233,168,235,15,133,244,251,168,235,15,132,244,251,65,252, - 255,142,233,15,132,244,247,168,235,15,132,244,251,248,1,139,108,36,16,137, - 149,233,137,222,137,252,239,232,251,1,20,248,3,139,149,233,248,4,15,182,75, - 252,253,248,5,255,15,182,107,252,252,15,183,67,252,254,65,252,255,164,253, - 252,238,233,248,138,131,195,4,139,77,232,137,76,36,4,252,233,244,4,248,139, - 255,204,255,248,140,255,73,199,134,233,0,0,0,0,252,233,244,247,255,248,141, - 255,73,137,174,233,248,1,255,141,68,194,252,248,139,108,36,16,137,149,233, - 137,133,233,137,222,137,252,239,137,92,36,20,232,251,1,21,199,68,36,20,0, - 0,0,0,139,149,233,72,137,193,139,133,233,41,208,72,137,205,15,182,75,252, - 253,193,232,3,131,192,1,252,255,229,248,142,255,248,143,255,68,139,122,252, - 248,69,139,191,233,69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237, - 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255, - 248,82,255,217,124,36,4,137,68,36,8,102,184,0,4,102,11,68,36,4,102,37,252, - 255,252,247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68, - 36,8,195,255,248,144,72,184,237,237,102,72,15,110,208,72,184,237,237,102, - 72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15, - 85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102, - 72,15,110,208,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40, - 193,248,1,195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36, - 4,102,37,252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108, - 36,4,139,68,36,8,195,255,248,145,72,184,237,237,102,72,15,110,208,72,184, - 237,237,102,72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244, - 247,102,15,85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184, - 237,237,102,72,15,110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92, - 200,15,40,193,248,1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12, - 102,11,68,36,4,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139, + 137,65,15,182,134,233,168,235,15,133,244,251,252,233,244,247,248,138,65,15, + 182,134,233,168,235,15,133,244,251,168,235,15,132,244,251,65,252,255,142, + 233,15,132,244,247,168,235,15,132,244,251,248,1,255,139,108,36,16,137,149, + 233,137,222,137,252,239,232,251,1,20,248,3,139,149,233,248,4,15,182,75,252, + 253,248,5,15,182,107,252,252,15,183,67,252,254,65,252,255,164,253,252,238, + 233,248,139,131,195,4,139,77,232,137,76,36,4,252,233,244,4,248,140,255,204, + 255,248,141,255,73,199,134,233,0,0,0,0,252,233,244,247,255,248,142,255,73, + 137,174,233,248,1,255,141,68,194,252,248,139,108,36,16,137,149,233,137,133, + 233,137,222,137,252,239,137,92,36,20,232,251,1,21,199,68,36,20,0,0,0,0,139, + 149,233,72,137,193,139,133,233,41,208,72,137,205,15,182,75,252,253,193,232, + 3,131,192,1,252,255,229,248,143,255,248,144,255,68,139,122,252,248,69,139, + 191,233,69,139,191,233,65,199,134,233,0,0,0,0,65,199,134,233,237,139,3,15, + 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,248,82, + 255,217,124,36,4,137,68,36,8,102,184,0,4,102,11,68,36,4,102,37,252,255,252, + 247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195, + 255,248,145,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110, + 216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252, + 242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110, + 208,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193,248,1, + 195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102,37, + 252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139, 68,36,8,195,255,248,146,72,184,237,237,102,72,15,110,208,72,184,237,237,102, 72,15,110,216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15, - 85,208,15,40,193,252,242,15,88,203,252,242,15,92,203,72,184,237,237,102,72, - 15,110,216,252,242,15,194,193,1,102,15,84,195,252,242,15,92,200,102,15,86, - 202,15,40,193,248,1,195,248,147,255,15,40,232,252,242,15,94,193,72,184,237, - 237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,224,102,15,84, - 226,102,15,46,220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242, - 15,92,227,102,15,86,226,72,184,237,237,102,72,15,110,208,252,242,15,194,196, - 1,102,15,84,194,252,242,15,92,224,15,40,197,252,242,15,89,204,252,242,15, - 92,193,195,248,1,252,242,15,89,200,15,40,197,252,242,15,92,193,195,255,217, - 193,216,252,241,217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252,255,252, - 247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,222,201,222,252, - 233,195,255,248,88,217,252,234,222,201,248,148,217,84,36,252,248,129,124, - 36,252,248,0,0,128,127,15,132,244,247,129,124,36,252,248,0,0,128,252,255, - 15,132,244,248,248,149,217,192,217,252,252,220,252,233,217,201,217,252,240, - 217,232,222,193,217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195, - 255,248,107,255,248,150,252,242,15,45,193,252,242,15,42,208,102,15,46,202, - 15,133,244,254,15,138,244,255,248,151,131,252,248,1,15,142,244,252,248,1, - 169,1,0,0,0,15,133,244,248,252,242,15,89,192,209,232,252,233,244,1,248,2, - 209,232,15,132,244,251,15,40,200,248,3,252,242,15,89,192,209,232,15,132,244, - 250,15,131,244,3,255,252,242,15,89,200,252,233,244,3,248,4,252,242,15,89, - 193,248,5,195,248,6,15,132,244,5,15,130,244,253,80,72,184,237,237,102,72, - 15,110,200,252,242,15,94,200,88,15,40,193,252,247,216,131,252,248,1,15,132, - 244,5,252,233,244,1,248,7,72,184,237,237,102,72,15,110,192,195,248,8,102, - 72,15,126,200,72,209,224,72,193,192,12,72,61,252,254,15,0,0,15,132,244,248, - 255,102,72,15,126,192,72,209,224,15,132,244,250,72,193,192,12,72,61,252,254, - 15,0,0,15,132,244,251,252,242,15,17,76,36,252,240,252,242,15,17,68,36,252, - 248,221,68,36,252,240,221,68,36,252,248,217,252,241,217,192,217,252,252,220, - 252,233,217,201,217,252,240,217,232,222,193,217,252,253,221,217,221,92,36, - 252,248,252,242,15,16,68,36,252,248,195,248,9,72,184,237,237,102,72,15,110, - 208,102,15,46,194,15,132,244,247,15,40,193,248,1,195,248,2,72,184,237,237, - 102,72,15,110,208,102,15,84,194,72,184,237,237,102,72,15,110,208,102,15,46, - 194,15,132,244,1,102,15,80,193,15,87,192,136,196,15,146,208,48,224,15,133, - 244,1,248,3,72,184,237,237,255,102,72,15,110,192,195,248,4,102,15,80,193, - 133,192,15,133,244,3,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244, - 3,15,87,192,195,248,152,255,131,252,255,1,15,130,244,82,15,132,244,84,131, - 252,255,3,15,130,244,104,15,135,244,248,252,242,15,81,192,195,248,2,252,242, - 15,17,68,36,252,248,221,68,36,252,248,131,252,255,5,15,135,244,248,15,132, - 244,247,232,244,88,252,233,244,253,248,1,232,244,148,255,252,233,244,253, - 248,2,131,252,255,7,15,132,244,247,15,135,244,248,217,252,237,217,201,217, - 252,241,252,233,244,253,248,1,217,232,217,201,217,252,241,252,233,244,253, - 248,2,131,252,255,9,15,132,244,247,15,135,244,248,217,252,236,217,201,217, - 252,241,252,233,244,253,248,1,255,217,252,254,252,233,244,253,248,2,131,252, - 255,11,15,132,244,247,15,135,244,255,217,252,255,252,233,244,253,248,1,217, - 252,242,221,216,248,7,221,92,36,252,248,252,242,15,16,68,36,252,248,195,255, - 139,124,36,12,221,68,36,4,131,252,255,1,15,130,244,82,15,132,244,84,131,252, - 255,3,15,130,244,104,15,135,244,248,217,252,250,195,248,2,131,252,255,5,15, - 130,244,88,15,132,244,148,131,252,255,7,15,132,244,247,15,135,244,248,217, - 252,237,217,201,217,252,241,195,248,1,217,232,217,201,217,252,241,195,248, - 2,131,252,255,9,15,132,244,247,255,15,135,244,248,217,252,236,217,201,217, - 252,241,195,248,1,217,252,254,195,248,2,131,252,255,11,15,132,244,247,15, - 135,244,255,217,252,255,195,248,1,217,252,242,221,216,195,255,248,9,204,248, - 153,255,131,252,255,1,15,132,244,247,15,135,244,248,252,242,15,88,193,195, - 248,1,252,242,15,92,193,195,248,2,131,252,255,3,15,132,244,247,15,135,244, - 248,252,242,15,89,193,195,248,1,252,242,15,94,193,195,248,2,131,252,255,5, - 15,130,244,147,15,132,244,107,131,252,255,7,15,132,244,247,15,135,244,248, - 72,184,237,237,255,102,72,15,110,200,15,87,193,195,248,1,72,184,237,237,102, - 72,15,110,200,15,84,193,195,248,2,131,252,255,9,15,135,244,248,252,242,15, - 17,68,36,252,248,252,242,15,17,76,36,252,240,221,68,36,252,248,221,68,36, - 252,240,15,132,244,247,217,252,243,248,7,221,92,36,252,248,252,242,15,16, - 68,36,252,248,195,248,1,217,201,217,252,253,221,217,252,233,244,7,248,2,131, - 252,255,11,15,132,244,247,15,135,244,255,252,242,15,93,193,195,248,1,252, - 242,15,95,193,195,248,9,204,255,139,68,36,20,221,68,36,4,221,68,36,12,131, - 252,248,1,15,132,244,247,15,135,244,248,222,193,195,248,1,222,252,233,195, - 248,2,131,252,248,3,15,132,244,247,15,135,244,248,222,201,195,248,1,222,252, - 249,195,248,2,131,252,248,5,15,130,244,147,15,132,244,107,131,252,248,7,15, - 132,244,247,15,135,244,248,255,221,216,217,224,195,248,1,221,216,217,225, - 195,248,2,131,252,248,9,15,132,244,247,15,135,244,248,217,252,243,195,248, - 1,217,201,217,252,253,221,217,195,248,2,131,252,248,11,15,132,244,247,15, - 135,244,255,255,219,252,233,219,209,221,217,195,248,1,219,252,233,218,209, - 221,217,195,255,221,225,223,224,252,246,196,1,15,132,244,248,217,201,248, - 2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133,244,248,217,201, - 248,2,221,216,195,255,248,154,137,252,248,83,15,162,137,6,137,94,4,137,78, - 8,137,86,12,91,195,255,249,255,129,124,253,202,4,239,15,135,244,41,129,124, - 253,194,4,239,15,135,244,41,255,252,242,15,16,4,194,131,195,4,102,15,46,4, - 202,255,221,4,202,221,4,194,131,195,4,255,223,252,233,221,216,255,218,252, - 233,223,224,158,255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,67, - 252,254,141,156,253,131,233,248,2,139,3,15,182,204,15,182,232,131,195,4,193, - 232,16,65,252,255,36,252,238,255,139,108,194,4,131,195,4,129,252,253,239, - 15,135,244,251,129,124,253,202,4,239,15,135,244,251,255,252,242,15,16,4,194, - 102,15,46,4,202,255,221,4,202,221,4,194,255,15,138,244,248,15,133,244,248, - 255,15,138,244,248,15,132,244,247,255,248,1,15,183,67,252,254,141,156,253, - 131,233,248,2,255,248,2,15,183,67,252,254,141,156,253,131,233,248,1,255,248, - 5,57,108,202,4,15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4, - 194,57,193,15,132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252, - 237,15,132,244,2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189, - 1,0,0,0,255,252,233,244,45,255,72,252,247,208,131,195,4,129,124,253,202,4, - 239,15,133,244,248,139,12,202,65,59,12,135,255,131,195,4,129,124,253,202, - 4,239,15,135,244,248,255,252,242,65,15,16,4,199,102,15,46,4,202,255,221,4, - 202,65,221,4,199,255,72,252,247,208,131,195,4,57,68,202,4,255,139,108,194, - 4,131,195,4,129,252,253,239,255,15,131,244,247,255,15,130,244,247,255,137, - 108,202,4,139,44,194,137,44,202,255,15,183,67,252,254,141,156,253,131,233, - 248,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, - 238,255,139,108,194,4,139,4,194,137,108,202,4,137,4,202,139,3,15,182,204, - 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,49,252,237,129, - 124,253,194,4,239,129,213,239,137,108,202,4,139,3,15,182,204,15,182,232,131, - 195,4,193,232,16,65,252,255,36,252,238,255,129,124,253,194,4,239,15,135,244, - 48,255,252,242,15,16,4,194,72,184,237,237,102,72,15,110,200,15,87,193,252, - 242,15,17,4,202,255,221,4,194,217,224,221,28,202,255,129,124,253,194,4,239, - 15,133,244,248,139,4,194,255,15,87,192,252,242,15,42,128,233,248,1,252,242, - 15,17,4,202,255,219,128,233,248,1,221,28,202,255,139,3,15,182,204,15,182, - 232,131,195,4,193,232,16,65,252,255,36,252,238,248,2,129,124,253,194,4,239, - 15,133,244,50,139,60,194,137,213,232,251,1,18,255,252,242,15,42,192,137,252, - 234,255,15,182,75,252,253,252,233,244,1,255,15,182,252,236,15,182,192,255, - 129,124,253,252,234,4,239,15,135,244,46,255,252,242,15,16,4,252,234,252,242, - 65,15,88,4,199,255,221,4,252,234,65,220,4,199,255,129,124,253,252,234,4,239, - 15,135,244,47,255,252,242,65,15,16,4,199,252,242,15,88,4,252,234,255,65,221, - 4,199,220,4,252,234,255,129,124,253,252,234,4,239,15,135,244,49,129,124,253, - 194,4,239,15,135,244,49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255, - 221,4,252,234,220,4,194,255,252,242,15,16,4,252,234,252,242,65,15,92,4,199, - 255,221,4,252,234,65,220,36,199,255,252,242,65,15,16,4,199,252,242,15,92, - 4,252,234,255,65,221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252, - 242,15,92,4,194,255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234, - 252,242,65,15,89,4,199,255,221,4,252,234,65,220,12,199,255,252,242,65,15, - 16,4,199,252,242,15,89,4,252,234,255,65,221,4,199,220,12,252,234,255,252, - 242,15,16,4,252,234,252,242,15,89,4,194,255,221,4,252,234,220,12,194,255, - 252,242,15,16,4,252,234,252,242,65,15,94,4,199,255,221,4,252,234,65,220,52, - 199,255,252,242,65,15,16,4,199,252,242,15,94,4,252,234,255,65,221,4,199,220, - 52,252,234,255,252,242,15,16,4,252,234,252,242,15,94,4,194,255,221,4,252, - 234,220,52,194,255,252,242,15,16,4,252,234,252,242,65,15,16,12,199,255,221, - 4,252,234,65,221,4,199,255,252,242,65,15,16,4,199,252,242,15,16,12,252,234, - 255,65,221,4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15,16, - 12,194,255,221,4,252,234,221,4,194,255,248,155,232,244,147,255,252,233,244, - 155,255,232,244,107,255,15,182,252,236,15,182,192,139,124,36,16,137,151,233, - 141,52,194,137,194,41,252,234,248,33,137,252,253,137,92,36,20,232,251,1,22, - 139,149,233,133,192,15,133,244,42,15,182,107,252,255,15,182,75,252,253,139, - 68,252,234,4,139,44,252,234,137,68,202,4,137,44,202,139,3,15,182,204,15,182, - 232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,252,247,208,65,139, - 4,135,199,68,202,4,237,137,4,202,139,3,15,182,204,15,182,232,131,195,4,193, - 232,16,65,252,255,36,252,238,255,15,191,192,252,242,15,42,192,252,242,15, - 17,4,202,255,223,67,252,254,221,28,202,255,252,242,65,15,16,4,199,252,242, - 15,17,4,202,255,65,221,4,199,221,28,202,255,72,252,247,208,137,68,202,4,139, + 85,208,252,242,15,88,203,252,242,15,92,203,102,15,86,202,72,184,237,237,102, + 72,15,110,208,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40, + 193,248,1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68, + 36,4,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195, + 255,248,147,72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110, + 216,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,15, + 40,193,252,242,15,88,203,252,242,15,92,203,72,184,237,237,102,72,15,110,216, + 252,242,15,194,193,1,102,15,84,195,252,242,15,92,200,102,15,86,202,15,40, + 193,248,1,195,248,148,255,15,40,232,252,242,15,94,193,72,184,237,237,102, + 72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,224,102,15,84,226,102, + 15,46,220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92,227, + 102,15,86,226,72,184,237,237,102,72,15,110,208,252,242,15,194,196,1,102,15, + 84,194,252,242,15,92,224,15,40,197,252,242,15,89,204,252,242,15,92,193,195, + 248,1,252,242,15,89,200,15,40,197,252,242,15,92,193,195,255,217,193,216,252, + 241,217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137, + 68,36,6,217,108,36,6,217,252,252,217,108,36,4,222,201,222,252,233,195,255, + 248,88,217,252,234,222,201,248,149,217,84,36,252,248,129,124,36,252,248,0, + 0,128,127,15,132,244,247,129,124,36,252,248,0,0,128,252,255,15,132,244,248, + 248,150,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193, + 217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255,248,107,255, + 248,151,252,242,15,45,193,252,242,15,42,208,102,15,46,202,15,133,244,254, + 15,138,244,255,248,152,131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15, + 133,244,248,252,242,15,89,192,209,232,252,233,244,1,248,2,209,232,15,132, + 244,251,15,40,200,248,3,252,242,15,89,192,209,232,15,132,244,250,15,131,244, + 3,255,252,242,15,89,200,252,233,244,3,248,4,252,242,15,89,193,248,5,195,248, + 6,15,132,244,5,15,130,244,253,80,72,184,237,237,102,72,15,110,200,252,242, + 15,94,200,88,15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244, + 1,248,7,72,184,237,237,102,72,15,110,192,195,248,8,102,72,15,126,200,72,209, + 224,72,193,192,12,72,61,252,254,15,0,0,15,132,244,248,255,102,72,15,126,192, + 72,209,224,15,132,244,250,72,193,192,12,72,61,252,254,15,0,0,15,132,244,251, + 252,242,15,17,76,36,252,240,252,242,15,17,68,36,252,248,221,68,36,252,240, + 221,68,36,252,248,217,252,241,217,192,217,252,252,220,252,233,217,201,217, + 252,240,217,232,222,193,217,252,253,221,217,221,92,36,252,248,252,242,15, + 16,68,36,252,248,195,248,9,72,184,237,237,102,72,15,110,208,102,15,46,194, + 15,132,244,247,15,40,193,248,1,195,248,2,72,184,237,237,102,72,15,110,208, + 102,15,84,194,72,184,237,237,102,72,15,110,208,102,15,46,194,15,132,244,1, + 102,15,80,193,15,87,192,136,196,15,146,208,48,224,15,133,244,1,248,3,72,184, + 237,237,255,102,72,15,110,192,195,248,4,102,15,80,193,133,192,15,133,244, + 3,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192,195,248, + 153,255,131,252,255,1,15,130,244,82,15,132,244,84,131,252,255,3,15,130,244, + 104,15,135,244,248,252,242,15,81,192,195,248,2,252,242,15,17,68,36,252,248, + 221,68,36,252,248,131,252,255,5,15,135,244,248,15,132,244,247,232,244,88, + 252,233,244,253,248,1,232,244,149,255,252,233,244,253,248,2,131,252,255,7, + 15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,252,233,244, + 253,248,1,217,232,217,201,217,252,241,252,233,244,253,248,2,131,252,255,9, + 15,132,244,247,15,135,244,248,217,252,236,217,201,217,252,241,252,233,244, + 253,248,1,255,217,252,254,252,233,244,253,248,2,131,252,255,11,15,132,244, + 247,15,135,244,255,217,252,255,252,233,244,253,248,1,217,252,242,221,216, + 248,7,221,92,36,252,248,252,242,15,16,68,36,252,248,195,255,139,124,36,12, + 221,68,36,4,131,252,255,1,15,130,244,82,15,132,244,84,131,252,255,3,15,130, + 244,104,15,135,244,248,217,252,250,195,248,2,131,252,255,5,15,130,244,88, + 15,132,244,149,131,252,255,7,15,132,244,247,15,135,244,248,217,252,237,217, + 201,217,252,241,195,248,1,217,232,217,201,217,252,241,195,248,2,131,252,255, + 9,15,132,244,247,255,15,135,244,248,217,252,236,217,201,217,252,241,195,248, + 1,217,252,254,195,248,2,131,252,255,11,15,132,244,247,15,135,244,255,217, + 252,255,195,248,1,217,252,242,221,216,195,255,248,9,204,248,154,255,131,252, + 255,1,15,132,244,247,15,135,244,248,252,242,15,88,193,195,248,1,252,242,15, + 92,193,195,248,2,131,252,255,3,15,132,244,247,15,135,244,248,252,242,15,89, + 193,195,248,1,252,242,15,94,193,195,248,2,131,252,255,5,15,130,244,148,15, + 132,244,107,131,252,255,7,15,132,244,247,15,135,244,248,72,184,237,237,255, + 102,72,15,110,200,15,87,193,195,248,1,72,184,237,237,102,72,15,110,200,15, + 84,193,195,248,2,131,252,255,9,15,135,244,248,252,242,15,17,68,36,252,248, + 252,242,15,17,76,36,252,240,221,68,36,252,248,221,68,36,252,240,15,132,244, + 247,217,252,243,248,7,221,92,36,252,248,252,242,15,16,68,36,252,248,195,248, + 1,217,201,217,252,253,221,217,252,233,244,7,248,2,131,252,255,11,15,132,244, + 247,15,135,244,255,252,242,15,93,193,195,248,1,252,242,15,95,193,195,248, + 9,204,255,139,68,36,20,221,68,36,4,221,68,36,12,131,252,248,1,15,132,244, + 247,15,135,244,248,222,193,195,248,1,222,252,233,195,248,2,131,252,248,3, + 15,132,244,247,15,135,244,248,222,201,195,248,1,222,252,249,195,248,2,131, + 252,248,5,15,130,244,148,15,132,244,107,131,252,248,7,15,132,244,247,15,135, + 244,248,255,221,216,217,224,195,248,1,221,216,217,225,195,248,2,131,252,248, + 9,15,132,244,247,15,135,244,248,217,252,243,195,248,1,217,201,217,252,253, + 221,217,195,248,2,131,252,248,11,15,132,244,247,15,135,244,255,255,219,252, + 233,219,209,221,217,195,248,1,219,252,233,218,209,221,217,195,255,221,225, + 223,224,252,246,196,1,15,132,244,248,217,201,248,2,221,216,195,248,1,221, + 225,223,224,252,246,196,1,15,133,244,248,217,201,248,2,221,216,195,255,248, + 155,137,252,248,83,15,162,137,6,137,94,4,137,78,8,137,86,12,91,195,255,249, + 255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239,15,135,244, + 41,255,252,242,15,16,4,194,131,195,4,102,15,46,4,202,255,221,4,202,221,4, + 194,131,195,4,255,223,252,233,221,216,255,218,252,233,223,224,158,255,15, + 134,244,248,255,15,131,244,248,255,248,1,15,183,67,252,254,141,156,253,131, + 233,248,2,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36, + 252,238,255,139,108,194,4,131,195,4,129,252,253,239,15,135,244,251,129,124, + 253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4,202,255, + 221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138,244,248, + 15,132,244,247,255,248,1,15,183,67,252,254,141,156,253,131,233,248,2,255, + 248,2,15,183,67,252,254,141,156,253,131,233,248,1,255,248,5,57,108,202,4, + 15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193,15, + 132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132,244, + 2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255,252, + 233,244,45,255,72,252,247,208,131,195,4,129,124,253,202,4,239,15,133,244, + 248,139,12,202,65,59,12,135,255,131,195,4,129,124,253,202,4,239,15,135,244, + 248,255,252,242,65,15,16,4,199,102,15,46,4,202,255,221,4,202,65,221,4,199, + 255,72,252,247,208,131,195,4,57,68,202,4,255,139,108,194,4,131,195,4,129, + 252,253,239,255,15,131,244,247,255,15,130,244,247,255,137,108,202,4,139,44, + 194,137,44,202,255,15,183,67,252,254,141,156,253,131,233,248,1,139,3,15,182, + 204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,139,108,194, + 4,139,4,194,137,108,202,4,137,4,202,139,3,15,182,204,15,182,232,131,195,4, + 193,232,16,65,252,255,36,252,238,255,49,252,237,129,124,253,194,4,239,129, + 213,239,137,108,202,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, + 252,255,36,252,238,255,129,124,253,194,4,239,15,135,244,48,255,252,242,15, + 16,4,194,72,184,237,237,102,72,15,110,200,15,87,193,252,242,15,17,4,202,255, + 221,4,194,217,224,221,28,202,255,129,124,253,194,4,239,15,133,244,248,139, + 4,194,255,15,87,192,252,242,15,42,128,233,248,1,252,242,15,17,4,202,255,219, + 128,233,248,1,221,28,202,255,139,3,15,182,204,15,182,232,131,195,4,193,232, + 16,65,252,255,36,252,238,248,2,129,124,253,194,4,239,15,133,244,50,139,60, + 194,137,213,232,251,1,18,255,252,242,15,42,192,137,252,234,255,15,182,75, + 252,253,252,233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,234, + 4,239,15,135,244,46,255,252,242,15,16,4,252,234,252,242,65,15,88,4,199,255, + 221,4,252,234,65,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255, + 252,242,65,15,16,4,199,252,242,15,88,4,252,234,255,65,221,4,199,220,4,252, + 234,255,129,124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15, + 135,244,49,255,252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252, + 234,220,4,194,255,252,242,15,16,4,252,234,252,242,65,15,92,4,199,255,221, + 4,252,234,65,220,36,199,255,252,242,65,15,16,4,199,252,242,15,92,4,252,234, + 255,65,221,4,199,220,36,252,234,255,252,242,15,16,4,252,234,252,242,15,92, + 4,194,255,221,4,252,234,220,36,194,255,252,242,15,16,4,252,234,252,242,65, + 15,89,4,199,255,221,4,252,234,65,220,12,199,255,252,242,65,15,16,4,199,252, + 242,15,89,4,252,234,255,65,221,4,199,220,12,252,234,255,252,242,15,16,4,252, + 234,252,242,15,89,4,194,255,221,4,252,234,220,12,194,255,252,242,15,16,4, + 252,234,252,242,65,15,94,4,199,255,221,4,252,234,65,220,52,199,255,252,242, + 65,15,16,4,199,252,242,15,94,4,252,234,255,65,221,4,199,220,52,252,234,255, + 252,242,15,16,4,252,234,252,242,15,94,4,194,255,221,4,252,234,220,52,194, + 255,252,242,15,16,4,252,234,252,242,65,15,16,12,199,255,221,4,252,234,65, + 221,4,199,255,252,242,65,15,16,4,199,252,242,15,16,12,252,234,255,65,221, + 4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15,16,12,194,255, + 221,4,252,234,221,4,194,255,248,156,232,244,148,255,252,233,244,156,255,232, + 244,107,255,15,182,252,236,15,182,192,139,124,36,16,137,151,233,141,52,194, + 137,194,41,252,234,248,33,137,252,253,137,92,36,20,232,251,1,22,139,149,233, + 133,192,15,133,244,42,15,182,107,252,255,15,182,75,252,253,139,68,252,234, + 4,139,44,252,234,137,68,202,4,137,44,202,139,3,15,182,204,15,182,232,131, + 195,4,193,232,16,65,252,255,36,252,238,255,72,252,247,208,65,139,4,135,199, + 68,202,4,237,137,4,202,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, + 252,255,36,252,238,255,15,191,192,252,242,15,42,192,252,242,15,17,4,202,255, + 223,67,252,254,221,28,202,255,252,242,65,15,16,4,199,252,242,15,17,4,202, + 255,65,221,4,199,221,28,202,255,72,252,247,208,137,68,202,4,139,3,15,182, + 204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,141,76,202, + 12,141,68,194,4,189,237,137,105,252,248,248,1,137,41,131,193,8,57,193,15, + 134,244,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36, + 252,238,255,139,106,252,248,139,172,253,133,233,139,173,233,139,69,4,139, + 109,0,137,68,202,4,137,44,202,139,3,15,182,204,15,182,232,131,195,4,193,232, + 16,65,252,255,36,252,238,255,139,106,252,248,139,172,253,141,233,128,189, + 233,0,139,173,233,139,12,194,139,68,194,4,137,77,0,137,69,4,15,132,244,247, + 252,246,133,233,235,15,133,244,248,248,1,139,3,15,182,204,15,182,232,131, + 195,4,193,232,16,65,252,255,36,252,238,248,2,129,232,239,129,252,248,239, + 15,134,244,1,252,246,129,233,235,15,132,244,1,137,252,238,137,213,65,141, + 190,233,255,232,251,1,23,137,252,234,252,233,244,1,255,72,252,247,208,139, + 106,252,248,139,172,253,141,233,65,139,12,135,139,133,233,137,8,199,64,4, + 237,252,246,133,233,235,15,133,244,248,248,1,139,3,15,182,204,15,182,232, + 131,195,4,193,232,16,65,252,255,36,252,238,248,2,252,246,129,233,235,15,132, + 244,1,128,189,233,0,15,132,244,1,137,213,137,198,65,141,190,233,232,251,1, + 23,137,252,234,252,233,244,1,255,139,106,252,248,255,252,242,65,15,16,4,199, + 255,139,172,253,141,233,139,141,233,255,252,242,15,17,1,255,221,25,255,72, + 252,247,208,139,106,252,248,139,172,253,141,233,139,141,233,137,65,4,139, 3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,141, - 76,202,12,141,68,194,4,189,237,137,105,252,248,248,1,137,41,131,193,8,57, - 193,15,134,244,1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252, - 255,36,252,238,255,139,106,252,248,139,172,253,133,233,139,173,233,139,69, - 4,139,109,0,137,68,202,4,137,44,202,139,3,15,182,204,15,182,232,131,195,4, - 193,232,16,65,252,255,36,252,238,255,139,106,252,248,139,172,253,141,233, - 128,189,233,0,139,173,233,139,12,194,139,68,194,4,137,77,0,137,69,4,15,132, - 244,247,252,246,133,233,235,15,133,244,248,248,1,139,3,15,182,204,15,182, - 232,131,195,4,193,232,16,65,252,255,36,252,238,248,2,129,232,239,129,252, - 248,239,15,134,244,1,252,246,129,233,235,15,132,244,1,137,252,238,137,213, - 65,141,190,233,255,232,251,1,23,137,252,234,252,233,244,1,255,72,252,247, - 208,139,106,252,248,139,172,253,141,233,65,139,12,135,139,133,233,137,8,199, - 64,4,237,252,246,133,233,235,15,133,244,248,248,1,139,3,15,182,204,15,182, - 232,131,195,4,193,232,16,65,252,255,36,252,238,248,2,252,246,129,233,235, - 15,132,244,1,128,189,233,0,15,132,244,1,137,213,137,198,65,141,190,233,232, - 251,1,23,137,252,234,252,233,244,1,255,139,106,252,248,255,252,242,65,15, - 16,4,199,255,139,172,253,141,233,139,141,233,255,252,242,15,17,1,255,221, - 25,255,72,252,247,208,139,106,252,248,139,172,253,141,233,139,141,233,137, - 65,4,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238, - 255,141,156,253,131,233,139,108,36,16,131,189,233,0,15,132,244,247,137,149, - 233,141,52,202,137,252,239,232,251,1,24,139,149,233,248,1,139,3,15,182,204, - 15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,252,247,208, - 139,108,36,16,137,149,233,139,82,252,248,65,139,52,135,137,252,239,137,92, - 36,20,232,251,1,25,139,149,233,15,182,75,252,253,137,4,202,199,68,202,4,237, - 139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255, - 139,124,36,16,137,151,233,248,1,137,194,37,252,255,7,0,0,193,252,234,11,61, - 252,255,7,0,0,15,132,244,249,248,2,137,198,65,139,134,233,137,252,253,65, - 59,134,233,137,92,36,20,15,131,244,251,232,251,1,26,139,149,233,15,182,75, - 252,253,137,4,202,199,68,202,4,237,139,3,15,182,204,15,182,232,131,195,4, - 193,232,16,65,252,255,36,252,238,248,3,184,1,8,0,0,252,233,244,2,248,5,232, - 251,1,27,15,183,67,252,254,137,252,239,252,233,244,1,255,72,252,247,208,139, - 108,36,16,65,139,142,233,137,92,36,20,65,59,142,233,137,149,233,15,131,244, - 249,248,2,65,139,52,135,137,252,239,232,251,1,28,139,149,233,15,182,75,252, - 253,137,4,202,199,68,202,4,237,139,3,15,182,204,15,182,232,131,195,4,193, - 232,16,65,252,255,36,252,238,248,3,137,252,239,232,251,1,27,15,183,67,252, - 254,72,252,247,208,252,233,244,2,255,72,252,247,208,139,106,252,248,139,173, - 233,65,139,4,135,252,233,244,156,255,72,252,247,208,139,106,252,248,139,173, - 233,65,139,4,135,252,233,244,157,255,15,182,252,236,15,182,192,129,124,253, - 252,234,4,239,15,133,244,36,139,44,252,234,129,124,253,194,4,239,15,135,244, - 251,255,252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,102,15,46, - 193,255,15,133,244,36,59,133,233,15,131,244,36,193,224,3,3,133,233,129,120, - 253,4,239,15,132,244,248,248,1,139,40,139,64,4,137,44,202,137,68,202,4,139, - 3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,2, - 131,189,233,0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,36, - 15,182,75,252,253,252,233,244,1,248,5,255,129,124,253,194,4,239,15,133,244, - 36,139,4,194,252,233,244,156,255,15,182,252,236,15,182,192,72,252,247,208, - 65,139,4,135,129,124,253,252,234,4,239,15,133,244,34,139,44,252,234,248,156, - 139,141,233,35,136,233,105,201,239,3,141,233,248,1,129,185,233,239,15,133, - 244,250,57,129,233,15,133,244,250,129,121,253,4,239,15,132,244,251,15,182, - 67,252,253,139,41,139,73,4,137,44,194,248,2,255,137,76,194,4,139,3,15,182, - 204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,15,182,67, - 252,253,185,237,252,233,244,2,248,4,139,137,233,133,201,15,133,244,1,248, - 5,139,141,233,133,201,15,132,244,3,252,246,129,233,235,15,133,244,3,252,233, - 244,34,255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244, - 35,139,44,252,234,59,133,233,15,131,244,35,193,224,3,3,133,233,129,120,253, - 4,239,15,132,244,248,248,1,139,40,139,64,4,137,44,202,137,68,202,4,139,3, - 15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,2,131, - 189,233,0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,35,255, - 15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,39,139,44, - 252,234,129,124,253,194,4,239,15,135,244,251,255,15,133,244,39,59,133,233, - 15,131,244,39,193,224,3,3,133,233,129,120,253,4,239,15,132,244,249,248,1, - 252,246,133,233,235,15,133,244,253,248,2,139,108,202,4,139,12,202,137,104, - 4,137,8,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252, - 238,248,3,131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,233,235, - 15,132,244,39,15,182,75,252,253,252,233,244,1,248,5,129,124,253,194,4,239, - 15,133,244,39,139,4,194,252,233,244,157,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,15,182, - 252,236,15,182,192,72,252,247,208,65,139,4,135,129,124,253,252,234,4,239, - 15,133,244,37,139,44,252,234,248,157,139,141,233,35,136,233,105,201,239,198, - 133,233,0,3,141,233,248,1,129,185,233,239,15,133,244,251,57,129,233,15,133, - 244,251,129,121,253,4,239,15,132,244,250,248,2,255,252,246,133,233,235,15, - 133,244,253,248,3,15,182,67,252,253,139,108,194,4,139,4,194,137,105,4,137, - 1,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238, - 248,4,131,189,233,0,15,132,244,2,137,12,36,139,141,233,252,246,129,233,235, - 15,132,244,37,139,12,36,252,233,244,2,248,5,139,137,233,133,201,15,133,244, - 1,255,139,141,233,133,201,15,132,244,252,252,246,129,233,235,15,132,244,37, - 248,6,137,4,36,199,68,36,4,237,137,108,36,24,139,124,36,16,137,151,233,72, - 141,20,36,137,252,238,137,252,253,137,92,36,20,232,251,1,29,139,149,233,139, - 108,36,24,137,193,252,233,244,2,248,7,128,165,233,235,65,139,134,233,65,137, - 174,233,137,133,233,252,233,244,3,255,15,182,252,236,15,182,192,129,124,253, - 252,234,4,239,15,133,244,38,139,44,252,234,59,133,233,15,131,244,38,193,224, - 3,3,133,233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15, - 133,244,253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139,3,15,182,204, - 15,182,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, + 156,253,131,233,139,108,36,16,131,189,233,0,15,132,244,247,137,149,233,141, + 52,202,137,252,239,232,251,1,24,139,149,233,248,1,139,3,15,182,204,15,182, + 232,131,195,4,193,232,16,65,252,255,36,252,238,255,72,252,247,208,139,108, + 36,16,137,149,233,139,82,252,248,65,139,52,135,137,252,239,137,92,36,20,232, + 251,1,25,139,149,233,15,182,75,252,253,137,4,202,199,68,202,4,237,139,3,15, + 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,139,124, + 36,16,137,151,233,248,1,137,194,37,252,255,7,0,0,193,252,234,11,61,252,255, + 7,0,0,15,132,244,249,248,2,137,198,65,139,134,233,137,252,253,65,59,134,233, + 137,92,36,20,15,131,244,251,232,251,1,26,139,149,233,15,182,75,252,253,137, + 4,202,199,68,202,4,237,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, + 252,255,36,252,238,248,3,184,1,8,0,0,252,233,244,2,248,5,232,251,1,27,15, + 183,67,252,254,137,252,239,252,233,244,1,255,72,252,247,208,139,108,36,16, + 65,139,142,233,137,92,36,20,65,59,142,233,137,149,233,15,131,244,249,248, + 2,65,139,52,135,137,252,239,232,251,1,28,139,149,233,15,182,75,252,253,137, + 4,202,199,68,202,4,237,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65, + 252,255,36,252,238,248,3,137,252,239,232,251,1,27,15,183,67,252,254,72,252, + 247,208,252,233,244,2,255,72,252,247,208,139,106,252,248,139,173,233,65,139, + 4,135,252,233,244,157,255,72,252,247,208,139,106,252,248,139,173,233,65,139, + 4,135,252,233,244,158,255,15,182,252,236,15,182,192,129,124,253,252,234,4, + 239,15,133,244,36,139,44,252,234,129,124,253,194,4,239,15,135,244,251,255, + 252,242,15,16,4,194,252,242,15,45,192,252,242,15,42,200,102,15,46,193,255, + 15,133,244,36,59,133,233,15,131,244,36,193,224,3,3,133,233,129,120,253,4, + 239,15,132,244,248,248,1,139,40,139,64,4,137,44,202,137,68,202,4,139,3,15, + 182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,2,131,189, + 233,0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,36,15,182,75, + 252,253,252,233,244,1,248,5,255,129,124,253,194,4,239,15,133,244,36,139,4, + 194,252,233,244,157,255,15,182,252,236,15,182,192,72,252,247,208,65,139,4, + 135,129,124,253,252,234,4,239,15,133,244,34,139,44,252,234,248,157,139,141, + 233,35,136,233,105,201,239,3,141,233,248,1,129,185,233,239,15,133,244,250, + 57,129,233,15,133,244,250,129,121,253,4,239,15,132,244,251,15,182,67,252, + 253,139,41,139,73,4,137,44,194,248,2,255,137,76,194,4,139,3,15,182,204,15, + 182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3,15,182,67,252,253, + 185,237,252,233,244,2,248,4,139,137,233,133,201,15,133,244,1,248,5,139,141, + 233,133,201,15,132,244,3,252,246,129,233,235,15,133,244,3,252,233,244,34, + 255,15,182,252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,35,139, + 44,252,234,59,133,233,15,131,244,35,193,224,3,3,133,233,129,120,253,4,239, + 15,132,244,248,248,1,139,40,139,64,4,137,44,202,137,68,202,4,139,3,15,182, + 204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,2,131,189,233, + 0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,35,255,15,182,252, + 236,15,182,192,129,124,253,252,234,4,239,15,133,244,39,139,44,252,234,129, + 124,253,194,4,239,15,135,244,251,255,15,133,244,39,59,133,233,15,131,244, + 39,193,224,3,3,133,233,129,120,253,4,239,15,132,244,249,248,1,252,246,133, + 233,235,15,133,244,253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139, + 3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,3, + 131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,233,235,15,132,244, + 39,15,182,75,252,253,252,233,244,1,248,5,129,124,253,194,4,239,15,133,244, + 39,139,4,194,252,233,244,158,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,15,182,252,236,15, + 182,192,72,252,247,208,65,139,4,135,129,124,253,252,234,4,239,15,133,244, + 37,139,44,252,234,248,158,139,141,233,35,136,233,105,201,239,198,133,233, + 0,3,141,233,248,1,129,185,233,239,15,133,244,251,57,129,233,15,133,244,251, + 129,121,253,4,239,15,132,244,250,248,2,255,252,246,133,233,235,15,133,244, + 253,248,3,15,182,67,252,253,139,108,194,4,139,4,194,137,105,4,137,1,139,3, + 15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,4,131, + 189,233,0,15,132,244,2,137,12,36,139,141,233,252,246,129,233,235,15,132,244, + 37,139,12,36,252,233,244,2,248,5,139,137,233,133,201,15,133,244,1,255,139, + 141,233,133,201,15,132,244,252,252,246,129,233,235,15,132,244,37,248,6,137, + 4,36,199,68,36,4,237,137,108,36,24,139,124,36,16,137,151,233,72,141,20,36, + 137,252,238,137,252,253,137,92,36,20,232,251,1,29,139,149,233,139,108,36, + 24,137,193,252,233,244,2,248,7,128,165,233,235,65,139,134,233,65,137,174, + 233,137,133,233,252,233,244,3,255,15,182,252,236,15,182,192,129,124,253,252, + 234,4,239,15,133,244,38,139,44,252,234,59,133,233,15,131,244,38,193,224,3, + 3,133,233,129,120,253,4,239,15,132,244,249,248,1,252,246,133,233,235,15,133, + 244,253,248,2,139,108,202,4,139,12,202,137,104,4,137,8,139,3,15,182,204,15, + 182,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,16,137,151,233,137,252,238,137,194, @@ -645,7 +646,7 @@ static const unsigned char build_actionlist[13665] = { 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,139,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129, + 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, @@ -804,7 +805,8 @@ enum { GLOB_ff_bit_rol, GLOB_ff_bit_ror, GLOB_vm_record, - GLOB_vm_hook, + GLOB_vm_rethook, + GLOB_vm_inshook, GLOB_cont_hook, GLOB_vm_hotloop, GLOB_vm_callhook, @@ -955,7 +957,8 @@ static const char *const globnames[] = { "ff_bit_rol", "ff_bit_ror", "vm_record", - "vm_hook", + "vm_rethook", + "vm_inshook", "cont_hook", "vm_hotloop", "vm_callhook", @@ -1322,84 +1325,84 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #if LJ_HASJIT dasm_put(Dst, 7009, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); #endif - dasm_put(Dst, 7042, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base)); - dasm_put(Dst, 7109, GG_DISP2STATIC); + dasm_put(Dst, 7042, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); + dasm_put(Dst, 7096, Dt1(->base), Dt1(->base), GG_DISP2STATIC); #if LJ_HASJIT - dasm_put(Dst, 7146); + dasm_put(Dst, 7163); #endif - dasm_put(Dst, 7148); + dasm_put(Dst, 7165); #if LJ_HASJIT - dasm_put(Dst, 7151, DISPATCH_J(L)); + dasm_put(Dst, 7168, DISPATCH_J(L)); #endif - dasm_put(Dst, 7164); + dasm_put(Dst, 7181); #if LJ_HASJIT - dasm_put(Dst, 7167, DISPATCH_J(L)); + dasm_put(Dst, 7184, DISPATCH_J(L)); #endif - dasm_put(Dst, 7174, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 7191, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 7146); + dasm_put(Dst, 7163); #endif - dasm_put(Dst, 7241); + dasm_put(Dst, 7258); #if LJ_HASJIT - dasm_put(Dst, 7244, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); + dasm_put(Dst, 7261, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); #endif - dasm_put(Dst, 7291); + dasm_put(Dst, 7308); if (!sse) { - dasm_put(Dst, 7294); + dasm_put(Dst, 7311); } - dasm_put(Dst, 7339, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7356, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7425); + dasm_put(Dst, 7442); } - dasm_put(Dst, 7470, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); + dasm_put(Dst, 7487, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7556); + dasm_put(Dst, 7573); } - dasm_put(Dst, 7595, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7612, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (sse) { - dasm_put(Dst, 7684, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7701, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); } else { - dasm_put(Dst, 7798); + dasm_put(Dst, 7815); } - dasm_put(Dst, 7845); + dasm_put(Dst, 7862); if (!sse) { } else { - dasm_put(Dst, 7922); + dasm_put(Dst, 7939); } - dasm_put(Dst, 7925); - dasm_put(Dst, 8010, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); - dasm_put(Dst, 8111, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); - dasm_put(Dst, 8285); + dasm_put(Dst, 7942); + dasm_put(Dst, 8027, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 8128, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); + dasm_put(Dst, 8302); if (sse) { - dasm_put(Dst, 8326); - dasm_put(Dst, 8396); - dasm_put(Dst, 8468); + dasm_put(Dst, 8343); + dasm_put(Dst, 8413); + dasm_put(Dst, 8485); } else { - dasm_put(Dst, 8520); - dasm_put(Dst, 8612); + dasm_put(Dst, 8537); + dasm_put(Dst, 8629); } - dasm_put(Dst, 8658); + dasm_put(Dst, 8675); if (sse) { - dasm_put(Dst, 8664, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); - dasm_put(Dst, 8749, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); + dasm_put(Dst, 8681, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); + dasm_put(Dst, 8766, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); } else { - dasm_put(Dst, 8877); - dasm_put(Dst, 8960); + dasm_put(Dst, 8894); + dasm_put(Dst, 8977); if (cmov) { - dasm_put(Dst, 9015); + dasm_put(Dst, 9032); } else { - dasm_put(Dst, 9034); + dasm_put(Dst, 9051); } - dasm_put(Dst, 8873); + dasm_put(Dst, 8890); } - dasm_put(Dst, 9075); + dasm_put(Dst, 9092); } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) { int vk = 0; - dasm_put(Dst, 9097, defop); + dasm_put(Dst, 9114, defop); switch (op) { @@ -1408,600 +1411,600 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - dasm_put(Dst, 9099, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9116, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9120); + dasm_put(Dst, 9137); } else { - dasm_put(Dst, 9135); + dasm_put(Dst, 9152); if (cmov) { - dasm_put(Dst, 9145); + dasm_put(Dst, 9162); } else { - dasm_put(Dst, 9151); + dasm_put(Dst, 9168); } } switch (op) { case BC_ISLT: - dasm_put(Dst, 9158); + dasm_put(Dst, 9175); break; case BC_ISGE: - dasm_put(Dst, 8955); + dasm_put(Dst, 8972); break; case BC_ISLE: dasm_put(Dst, 5914); break; case BC_ISGT: - dasm_put(Dst, 9163); + dasm_put(Dst, 9180); break; default: break; /* Shut up GCC. */ } - dasm_put(Dst, 9168, -BCBIAS_J*4); + dasm_put(Dst, 9185, -BCBIAS_J*4); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 9203, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9220, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9229); + dasm_put(Dst, 9246); } else { - dasm_put(Dst, 9241); + dasm_put(Dst, 9258); if (cmov) { - dasm_put(Dst, 9145); + dasm_put(Dst, 9162); } else { - dasm_put(Dst, 9151); + dasm_put(Dst, 9168); } } iseqne_fp: if (vk) { - dasm_put(Dst, 9248); + dasm_put(Dst, 9265); } else { - dasm_put(Dst, 9257); + dasm_put(Dst, 9274); } iseqne_end: if (vk) { - dasm_put(Dst, 9266, -BCBIAS_J*4); + dasm_put(Dst, 9283, -BCBIAS_J*4); } else { - dasm_put(Dst, 9281, -BCBIAS_J*4); + dasm_put(Dst, 9298, -BCBIAS_J*4); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); if (op == BC_ISEQV || op == BC_ISNEV) { - dasm_put(Dst, 9296, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<>32)); + dasm_put(Dst, 9607, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); } else { - dasm_put(Dst, 9615); + dasm_put(Dst, 9632); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_LEN: - dasm_put(Dst, 9624, LJ_TSTR); + dasm_put(Dst, 9641, LJ_TSTR); if (sse) { - dasm_put(Dst, 9638, Dt5(->len)); + dasm_put(Dst, 9655, Dt5(->len)); } else { - dasm_put(Dst, 9656, Dt5(->len)); + dasm_put(Dst, 9673, Dt5(->len)); } - dasm_put(Dst, 9665, LJ_TTAB); + dasm_put(Dst, 9682, LJ_TTAB); if (sse) { - dasm_put(Dst, 9707); + dasm_put(Dst, 9724); } else { } - dasm_put(Dst, 9716); + dasm_put(Dst, 9733); break; /* -- Binary ops -------------------------------------------------------- */ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9746); + dasm_put(Dst, 9763); } else { - dasm_put(Dst, 9761); + dasm_put(Dst, 9778); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9782); + dasm_put(Dst, 9799); } else { - dasm_put(Dst, 9797); + dasm_put(Dst, 9814); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9828); + dasm_put(Dst, 9845); } else { - dasm_put(Dst, 9842); + dasm_put(Dst, 9859); } break; } if (sse) { - dasm_put(Dst, 9608); + dasm_put(Dst, 9625); } else { - dasm_put(Dst, 9620); + dasm_put(Dst, 9637); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9850); + dasm_put(Dst, 9867); } else { - dasm_put(Dst, 9865); + dasm_put(Dst, 9882); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9874); + dasm_put(Dst, 9891); } else { - dasm_put(Dst, 9889); + dasm_put(Dst, 9906); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9898); + dasm_put(Dst, 9915); } else { - dasm_put(Dst, 9912); + dasm_put(Dst, 9929); } break; } if (sse) { - dasm_put(Dst, 9608); + dasm_put(Dst, 9625); } else { - dasm_put(Dst, 9620); + dasm_put(Dst, 9637); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9920); + dasm_put(Dst, 9937); } else { - dasm_put(Dst, 9935); + dasm_put(Dst, 9952); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9944); + dasm_put(Dst, 9961); } else { - dasm_put(Dst, 9959); + dasm_put(Dst, 9976); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9968); + dasm_put(Dst, 9985); } else { - dasm_put(Dst, 9982); + dasm_put(Dst, 9999); } break; } if (sse) { - dasm_put(Dst, 9608); + dasm_put(Dst, 9625); } else { - dasm_put(Dst, 9620); + dasm_put(Dst, 9637); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9990); + dasm_put(Dst, 10007); } else { - dasm_put(Dst, 10005); + dasm_put(Dst, 10022); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10014); + dasm_put(Dst, 10031); } else { - dasm_put(Dst, 10029); + dasm_put(Dst, 10046); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10038); + dasm_put(Dst, 10055); } else { - dasm_put(Dst, 10052); + dasm_put(Dst, 10069); } break; } if (sse) { - dasm_put(Dst, 9608); + dasm_put(Dst, 9625); } else { - dasm_put(Dst, 9620); + dasm_put(Dst, 9637); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_MODVN: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10060); + dasm_put(Dst, 10077); } else { - dasm_put(Dst, 10075); + dasm_put(Dst, 10092); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10084); + dasm_put(Dst, 10101); } else { - dasm_put(Dst, 10099); + dasm_put(Dst, 10116); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10108); + dasm_put(Dst, 10125); } else { - dasm_put(Dst, 10122); + dasm_put(Dst, 10139); } break; } - dasm_put(Dst, 10130); + dasm_put(Dst, 10147); if (sse) { - dasm_put(Dst, 9608); + dasm_put(Dst, 9625); } else { - dasm_put(Dst, 9620); + dasm_put(Dst, 9637); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_MODNV: case BC_MODVV: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10060); + dasm_put(Dst, 10077); } else { - dasm_put(Dst, 10075); + dasm_put(Dst, 10092); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10084); + dasm_put(Dst, 10101); } else { - dasm_put(Dst, 10099); + dasm_put(Dst, 10116); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10108); + dasm_put(Dst, 10125); } else { - dasm_put(Dst, 10122); + dasm_put(Dst, 10139); } break; } - dasm_put(Dst, 10136); + dasm_put(Dst, 10153); break; case BC_POW: - dasm_put(Dst, 9726); + dasm_put(Dst, 9743); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9734, LJ_TISNUM); + dasm_put(Dst, 9751, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10060); + dasm_put(Dst, 10077); } else { - dasm_put(Dst, 10075); + dasm_put(Dst, 10092); } break; case 1: - dasm_put(Dst, 9770, LJ_TISNUM); + dasm_put(Dst, 9787, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10084); + dasm_put(Dst, 10101); } else { - dasm_put(Dst, 10099); + dasm_put(Dst, 10116); } break; default: - dasm_put(Dst, 9806, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10108); + dasm_put(Dst, 10125); } else { - dasm_put(Dst, 10122); + dasm_put(Dst, 10139); } break; } - dasm_put(Dst, 10141); + dasm_put(Dst, 10158); if (sse) { - dasm_put(Dst, 9608); + dasm_put(Dst, 9625); } else { - dasm_put(Dst, 9620); + dasm_put(Dst, 9637); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_CAT: - dasm_put(Dst, 10145, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10162, Dt1(->base), Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 10236, LJ_TSTR); + dasm_put(Dst, 10253, LJ_TSTR); break; case BC_KSHORT: if (sse) { - dasm_put(Dst, 10273); + dasm_put(Dst, 10290); } else { - dasm_put(Dst, 10288); + dasm_put(Dst, 10305); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_KNUM: if (sse) { - dasm_put(Dst, 10296); + dasm_put(Dst, 10313); } else { - dasm_put(Dst, 10310); + dasm_put(Dst, 10327); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_KPRI: - dasm_put(Dst, 10318); + dasm_put(Dst, 10335); break; case BC_KNIL: - dasm_put(Dst, 10347, LJ_TNIL); + dasm_put(Dst, 10364, LJ_TNIL); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 10395, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10412, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) - dasm_put(Dst, 10441, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); - dasm_put(Dst, 10537); + dasm_put(Dst, 10458, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 10554); break; #undef TV2MARKOFS case BC_USETS: - dasm_put(Dst, 10549, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); + dasm_put(Dst, 10566, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 10645); + dasm_put(Dst, 10662); if (sse) { - dasm_put(Dst, 10650); + dasm_put(Dst, 10667); } else { - dasm_put(Dst, 9424); + dasm_put(Dst, 9441); } - dasm_put(Dst, 10658, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10675, offsetof(GCfuncL, uvptr), DtA(->v)); if (sse) { - dasm_put(Dst, 10667); + dasm_put(Dst, 10684); } else { - dasm_put(Dst, 10673); + dasm_put(Dst, 10690); } - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_USETP: - dasm_put(Dst, 10676, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10693, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 10716, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10733, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 10772, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 10789, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: - dasm_put(Dst, 10839, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10856, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); break; case BC_TDUP: - dasm_put(Dst, 10963, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10980, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_GGET: - dasm_put(Dst, 11062, Dt7(->env)); + dasm_put(Dst, 11079, Dt7(->env)); break; case BC_GSET: - dasm_put(Dst, 11082, Dt7(->env)); + dasm_put(Dst, 11099, Dt7(->env)); break; case BC_TGETV: - dasm_put(Dst, 11102, LJ_TTAB, LJ_TISNUM); + dasm_put(Dst, 11119, LJ_TTAB, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11135); + dasm_put(Dst, 11152); } else { } - dasm_put(Dst, 11156, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11354, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11371, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); - dasm_put(Dst, 11646, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11578, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); + dasm_put(Dst, 11663, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 11710, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11787, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); - dasm_put(Dst, 11879, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11727, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11804, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); + dasm_put(Dst, 11896, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 11971, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); - dasm_put(Dst, 12071, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11988, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); + dasm_put(Dst, 12088, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 12119); + dasm_put(Dst, 12136); if (sse) { - dasm_put(Dst, 10650); + dasm_put(Dst, 10667); } else { } - dasm_put(Dst, 12124, Dt6(->marked), LJ_GC_BLACK); + dasm_put(Dst, 12141, Dt6(->marked), LJ_GC_BLACK); if (sse) { - dasm_put(Dst, 12149); + dasm_put(Dst, 12166); } else { } - dasm_put(Dst, 12157, 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, 12293, Dt6(->gclist)); + dasm_put(Dst, 12174, 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, 12310, Dt6(->gclist)); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: - dasm_put(Dst, 9730); + dasm_put(Dst, 9747); if (op == BC_CALLM) { - dasm_put(Dst, 12301); + dasm_put(Dst, 12318); } - dasm_put(Dst, 12306, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 12323, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 12301); + dasm_put(Dst, 12318); break; case BC_CALLT: - dasm_put(Dst, 12349, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); - dasm_put(Dst, 12473, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 12366, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); + dasm_put(Dst, 12490, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); break; case BC_ITERC: - dasm_put(Dst, 12534, LJ_TFUNC, 2+1, Dt7(->pc)); + dasm_put(Dst, 12551, LJ_TFUNC, 2+1, Dt7(->pc)); break; case BC_VARG: - dasm_put(Dst, 12616, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); - dasm_put(Dst, 12770, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 12633, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); + dasm_put(Dst, 12787, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 12301); + dasm_put(Dst, 12318); break; case BC_RET: case BC_RET0: case BC_RET1: if (op != BC_RET0) { - dasm_put(Dst, 12875); + dasm_put(Dst, 12892); } - dasm_put(Dst, 12879, FRAME_TYPE); + dasm_put(Dst, 12896, FRAME_TYPE); switch (op) { case BC_RET: - dasm_put(Dst, 12898); + dasm_put(Dst, 12915); break; case BC_RET1: - dasm_put(Dst, 12962); + dasm_put(Dst, 12979); /* fallthrough */ case BC_RET0: - dasm_put(Dst, 12978); + dasm_put(Dst, 12995); default: break; } - dasm_put(Dst, 12989, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 13006, Dt7(->pc), PC2PROTO(k)); if (op == BC_RET) { - dasm_put(Dst, 13037, LJ_TNIL); + dasm_put(Dst, 13054, LJ_TNIL); } else { - dasm_put(Dst, 13048, LJ_TNIL); + dasm_put(Dst, 13065, LJ_TNIL); } - dasm_put(Dst, 13055); + dasm_put(Dst, 13072); if (op != BC_RET0) { - dasm_put(Dst, 13075); + dasm_put(Dst, 13092); } dasm_put(Dst, 4568); break; @@ -2011,7 +2014,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 13078, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2023,57 +2026,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, 13099); + dasm_put(Dst, 13116); if (!vk) { - dasm_put(Dst, 13103, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 13120, LJ_TISNUM, LJ_TISNUM); } - dasm_put(Dst, 13122); + dasm_put(Dst, 13139); if (!vk) { - dasm_put(Dst, 13126, LJ_TISNUM); + dasm_put(Dst, 13143, LJ_TISNUM); } if (sse) { - dasm_put(Dst, 13135); + dasm_put(Dst, 13152); if (vk) { - dasm_put(Dst, 13147); + dasm_put(Dst, 13164); } else { - dasm_put(Dst, 13166); + dasm_put(Dst, 13183); } - dasm_put(Dst, 13171); + dasm_put(Dst, 13188); } else { - dasm_put(Dst, 13184); + dasm_put(Dst, 13201); if (vk) { - dasm_put(Dst, 13190); + dasm_put(Dst, 13207); } else { - dasm_put(Dst, 13206); + dasm_put(Dst, 13223); } - dasm_put(Dst, 13214); + dasm_put(Dst, 13231); if (cmov) { - dasm_put(Dst, 9145); + dasm_put(Dst, 9162); } else { - dasm_put(Dst, 9151); + dasm_put(Dst, 9168); } if (!cmov) { - dasm_put(Dst, 13219); + dasm_put(Dst, 13236); } } if (op == BC_FORI) { - dasm_put(Dst, 13225, -BCBIAS_J*4); + dasm_put(Dst, 13242, -BCBIAS_J*4); } else if (op == BC_JFORI) { - dasm_put(Dst, 13235, -BCBIAS_J*4, BC_JLOOP); + dasm_put(Dst, 13252, -BCBIAS_J*4, BC_JLOOP); } else if (op == BC_IFORL) { - dasm_put(Dst, 13249, -BCBIAS_J*4); + dasm_put(Dst, 13266, -BCBIAS_J*4); } else { - dasm_put(Dst, 13245, BC_JLOOP); + dasm_put(Dst, 13262, BC_JLOOP); } - dasm_put(Dst, 9180); + dasm_put(Dst, 9197); if (sse) { - dasm_put(Dst, 13259); + dasm_put(Dst, 13276); } break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 13078, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2082,33 +2085,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IITERL: - dasm_put(Dst, 13270, LJ_TNIL); + dasm_put(Dst, 13287, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 13285, BC_JLOOP); + dasm_put(Dst, 13302, BC_JLOOP); } else { - dasm_put(Dst, 13299, -BCBIAS_J*4); + dasm_put(Dst, 13316, -BCBIAS_J*4); } - dasm_put(Dst, 9484); + dasm_put(Dst, 9501); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 13078, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 13095, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; case BC_ILOOP: - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 13315, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); + dasm_put(Dst, 13332, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); #endif break; case BC_JMP: - dasm_put(Dst, 13342, -BCBIAS_J*4); + dasm_put(Dst, 13359, -BCBIAS_J*4); break; /* -- Function headers -------------------------------------------------- */ @@ -2131,47 +2134,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IFUNCF: - dasm_put(Dst, 13368, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); + dasm_put(Dst, 13385, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); if (op == BC_JFUNCF) { - dasm_put(Dst, 13399, BC_JLOOP); + dasm_put(Dst, 13416, BC_JLOOP); } else { - dasm_put(Dst, 7270); + dasm_put(Dst, 7287); } - dasm_put(Dst, 13408, LJ_TNIL); + dasm_put(Dst, 13425, LJ_TNIL); break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif - dasm_put(Dst, 7146); + dasm_put(Dst, 7163); break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 13430, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 13447, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); if (op == BC_JFUNCV) { - dasm_put(Dst, 13399, BC_JLOOP); + dasm_put(Dst, 13416, BC_JLOOP); } else { - dasm_put(Dst, 13527, -4+PC2PROTO(k)); + dasm_put(Dst, 13544, -4+PC2PROTO(k)); } - dasm_put(Dst, 13552, LJ_TNIL); + dasm_put(Dst, 13569, LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: - dasm_put(Dst, 13574, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); + dasm_put(Dst, 13591, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); if (op == BC_FUNCC) { - dasm_put(Dst, 13604); + dasm_put(Dst, 13621); } else { - dasm_put(Dst, 13608); + dasm_put(Dst, 13625); } - dasm_put(Dst, 13616, DISPATCH_GL(vmstate), ~LJ_VMST_C); + dasm_put(Dst, 13633, DISPATCH_GL(vmstate), ~LJ_VMST_C); if (op == BC_FUNCC) { - dasm_put(Dst, 13626); + dasm_put(Dst, 13643); } else { - dasm_put(Dst, 13631, DISPATCH_GL(wrapf)); + dasm_put(Dst, 13648, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 13637, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); + dasm_put(Dst, 13654, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); break; /* ---------------------------------------------------------------------- */ @@ -2199,7 +2202,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx, cmov, sse); - dasm_put(Dst, 13663); + dasm_put(Dst, 13680); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op, cmov, sse); diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h index 772660d9..093b5fa0 100644 --- a/src/buildvm_x64win.h +++ b/src/buildvm_x64win.h @@ -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[13478] = { +static const unsigned char build_actionlist[13494] = { 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, @@ -354,71 +354,72 @@ static const unsigned char build_actionlist[13478] = { 149,233,139,133,233,41,208,193,232,3,131,192,1,72,139,108,36,32,85,195,248, 136,255,15,182,131,233,168,235,15,133,244,251,168,235,15,133,244,247,168, 235,15,132,244,247,252,255,139,233,252,233,244,247,255,248,137,15,182,131, - 233,168,235,15,133,244,251,168,235,15,132,244,251,252,255,139,233,15,132, - 244,247,168,235,15,132,244,251,248,1,139,108,36,96,137,149,233,137,252,242, - 137,252,233,232,251,1,20,248,3,139,149,233,248,4,15,182,78,252,253,248,5, - 255,15,182,110,252,252,15,183,70,252,254,252,255,164,253,252,235,233,248, - 138,131,198,4,139,77,232,137,76,36,84,252,233,244,4,248,139,255,204,255,248, - 140,255,72,199,131,233,0,0,0,0,252,233,244,247,255,248,141,255,72,137,171, - 233,248,1,255,141,68,194,252,248,139,108,36,96,137,149,233,137,133,233,137, - 252,242,137,252,233,137,116,36,100,232,251,1,21,199,68,36,100,0,0,0,0,139, - 149,233,72,137,193,139,133,233,41,208,72,137,205,15,182,78,252,253,193,232, - 3,131,192,1,252,255,229,248,142,255,248,143,255,139,122,252,248,139,191,233, - 139,191,233,199,131,233,0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232, - 131,198,4,193,232,16,252,255,36,252,235,255,248,82,255,217,124,36,4,137,68, - 36,8,102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217, - 108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,144,72,184,237, - 237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102,15,84, - 202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252,242, - 15,92,203,102,15,86,202,72,184,237,237,102,72,15,110,208,252,242,15,194,193, - 1,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195,248,84,255,217,124, - 36,4,137,68,36,8,102,184,0,8,102,11,68,36,4,102,37,252,255,252,251,102,137, - 68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,145, - 72,184,237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200, - 102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203, - 252,242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110,208,252,242, - 15,194,193,6,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195,248,104, - 255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102,137,68,36,6, + 233,168,235,15,133,244,251,252,233,244,247,248,138,15,182,131,233,168,235, + 15,133,244,251,168,235,15,132,244,251,252,255,139,233,15,132,244,247,168, + 235,15,132,244,251,248,1,255,139,108,36,96,137,149,233,137,252,242,137,252, + 233,232,251,1,20,248,3,139,149,233,248,4,15,182,78,252,253,248,5,15,182,110, + 252,252,15,183,70,252,254,252,255,164,253,252,235,233,248,139,131,198,4,139, + 77,232,137,76,36,84,252,233,244,4,248,140,255,204,255,248,141,255,72,199, + 131,233,0,0,0,0,252,233,244,247,255,248,142,255,72,137,171,233,248,1,255, + 141,68,194,252,248,139,108,36,96,137,149,233,137,133,233,137,252,242,137, + 252,233,137,116,36,100,232,251,1,21,199,68,36,100,0,0,0,0,139,149,233,72, + 137,193,139,133,233,41,208,72,137,205,15,182,78,252,253,193,232,3,131,192, + 1,252,255,229,248,143,255,248,144,255,139,122,252,248,139,191,233,139,191, + 233,199,131,233,0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198, + 4,193,232,16,252,255,36,252,235,255,248,82,255,217,124,36,4,137,68,36,8,102, + 184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36, + 6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,145,72,184,237,237,102, + 72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202,102, + 15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252,242,15,92,203, + 102,15,86,202,72,184,237,237,102,72,15,110,208,252,242,15,194,193,1,102,15, + 84,194,252,242,15,92,200,15,40,193,248,1,195,248,84,255,217,124,36,4,137, + 68,36,8,102,184,0,8,102,11,68,36,4,102,37,252,255,252,251,102,137,68,36,6, 217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,146,72,184, 237,237,102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102, - 15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,15,40,193,252,242,15, - 88,203,252,242,15,92,203,72,184,237,237,102,72,15,110,216,252,242,15,194, - 193,1,102,15,84,195,252,242,15,92,200,102,15,86,202,15,40,193,248,1,195,248, - 147,255,15,40,232,252,242,15,94,193,72,184,237,237,102,72,15,110,208,72,184, - 237,237,102,72,15,110,216,15,40,224,102,15,84,226,102,15,46,220,15,134,244, - 247,102,15,85,208,252,242,15,88,227,252,242,15,92,227,102,15,86,226,72,184, - 237,237,102,72,15,110,208,252,242,15,194,196,1,102,15,84,194,252,242,15,92, - 224,15,40,197,252,242,15,89,204,252,242,15,92,193,195,248,1,252,242,15,89, - 200,15,40,197,252,242,15,92,193,195,255,217,193,216,252,241,217,124,36,4, - 102,184,0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108, - 36,6,217,252,252,217,108,36,4,222,201,222,252,233,195,255,248,88,217,252, - 234,222,201,248,148,217,84,36,8,129,124,36,8,0,0,128,127,15,132,244,247,129, - 124,36,8,0,0,128,252,255,15,132,244,248,248,149,217,192,217,252,252,220,252, - 233,217,201,217,252,240,217,232,222,193,217,252,253,221,217,248,1,195,248, - 2,221,216,217,252,238,195,255,248,107,255,248,150,252,242,15,45,193,252,242, - 15,42,208,102,15,46,202,15,133,244,254,15,138,244,255,248,151,131,252,248, - 1,15,142,244,252,248,1,169,1,0,0,0,15,133,244,248,252,242,15,89,192,209,232, - 252,233,244,1,248,2,209,232,15,132,244,251,15,40,200,248,3,252,242,15,89, - 192,209,232,15,132,244,250,15,131,244,3,255,252,242,15,89,200,252,233,244, - 3,248,4,252,242,15,89,193,248,5,195,248,6,15,132,244,5,15,130,244,253,80, - 72,184,237,237,102,72,15,110,200,252,242,15,94,200,88,15,40,193,252,247,216, - 131,252,248,1,15,132,244,5,252,233,244,1,248,7,72,184,237,237,102,72,15,110, - 192,195,248,8,102,72,15,126,200,72,209,224,72,193,192,12,72,61,252,254,15, - 0,0,15,132,244,248,255,102,72,15,126,192,72,209,224,15,132,244,250,72,193, - 192,12,72,61,252,254,15,0,0,15,132,244,251,252,242,15,17,76,36,16,252,242, - 15,17,68,36,8,221,68,36,16,221,68,36,8,217,252,241,217,192,217,252,252,220, - 252,233,217,201,217,252,240,217,232,222,193,217,252,253,221,217,221,92,36, - 8,252,242,15,16,68,36,8,195,248,9,72,184,237,237,102,72,15,110,208,102,15, - 46,194,15,132,244,247,15,40,193,248,1,195,248,2,72,184,237,237,102,72,15, - 110,208,102,15,84,194,72,184,237,237,102,72,15,110,208,102,15,46,194,15,132, - 244,1,102,15,80,193,15,87,192,136,196,15,146,208,48,224,15,133,244,1,248, - 3,72,184,237,237,255,102,72,15,110,192,195,248,4,102,15,80,193,133,192,15, - 133,244,3,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192, - 195,248,152,255,131,252,250,1,15,130,244,82,15,132,244,84,131,252,250,3,15, - 130,244,104,15,135,244,248,252,242,15,81,192,195,248,2,252,242,15,17,68,36, - 8,221,68,36,8,131,252,250,5,15,135,244,248,88,15,132,244,247,232,244,88,80, - 252,233,244,253,248,1,232,244,148,255,80,252,233,244,253,248,2,131,252,250, - 7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,252,233,244, + 15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252, + 242,15,92,203,102,15,86,202,72,184,237,237,102,72,15,110,208,252,242,15,194, + 193,6,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195,248,104,255,217, + 124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102,137,68,36,6,217,108, + 36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,147,72,184,237,237, + 102,72,15,110,208,72,184,237,237,102,72,15,110,216,15,40,200,102,15,84,202, + 102,15,46,217,15,134,244,247,102,15,85,208,15,40,193,252,242,15,88,203,252, + 242,15,92,203,72,184,237,237,102,72,15,110,216,252,242,15,194,193,1,102,15, + 84,195,252,242,15,92,200,102,15,86,202,15,40,193,248,1,195,248,148,255,15, + 40,232,252,242,15,94,193,72,184,237,237,102,72,15,110,208,72,184,237,237, + 102,72,15,110,216,15,40,224,102,15,84,226,102,15,46,220,15,134,244,247,102, + 15,85,208,252,242,15,88,227,252,242,15,92,227,102,15,86,226,72,184,237,237, + 102,72,15,110,208,252,242,15,194,196,1,102,15,84,194,252,242,15,92,224,15, + 40,197,252,242,15,89,204,252,242,15,92,193,195,248,1,252,242,15,89,200,15, + 40,197,252,242,15,92,193,195,255,217,193,216,252,241,217,124,36,4,102,184, + 0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217, + 252,252,217,108,36,4,222,201,222,252,233,195,255,248,88,217,252,234,222,201, + 248,149,217,84,36,8,129,124,36,8,0,0,128,127,15,132,244,247,129,124,36,8, + 0,0,128,252,255,15,132,244,248,248,150,217,192,217,252,252,220,252,233,217, + 201,217,252,240,217,232,222,193,217,252,253,221,217,248,1,195,248,2,221,216, + 217,252,238,195,255,248,107,255,248,151,252,242,15,45,193,252,242,15,42,208, + 102,15,46,202,15,133,244,254,15,138,244,255,248,152,131,252,248,1,15,142, + 244,252,248,1,169,1,0,0,0,15,133,244,248,252,242,15,89,192,209,232,252,233, + 244,1,248,2,209,232,15,132,244,251,15,40,200,248,3,252,242,15,89,192,209, + 232,15,132,244,250,15,131,244,3,255,252,242,15,89,200,252,233,244,3,248,4, + 252,242,15,89,193,248,5,195,248,6,15,132,244,5,15,130,244,253,80,72,184,237, + 237,102,72,15,110,200,252,242,15,94,200,88,15,40,193,252,247,216,131,252, + 248,1,15,132,244,5,252,233,244,1,248,7,72,184,237,237,102,72,15,110,192,195, + 248,8,102,72,15,126,200,72,209,224,72,193,192,12,72,61,252,254,15,0,0,15, + 132,244,248,255,102,72,15,126,192,72,209,224,15,132,244,250,72,193,192,12, + 72,61,252,254,15,0,0,15,132,244,251,252,242,15,17,76,36,16,252,242,15,17, + 68,36,8,221,68,36,16,221,68,36,8,217,252,241,217,192,217,252,252,220,252, + 233,217,201,217,252,240,217,232,222,193,217,252,253,221,217,221,92,36,8,252, + 242,15,16,68,36,8,195,248,9,72,184,237,237,102,72,15,110,208,102,15,46,194, + 15,132,244,247,15,40,193,248,1,195,248,2,72,184,237,237,102,72,15,110,208, + 102,15,84,194,72,184,237,237,102,72,15,110,208,102,15,46,194,15,132,244,1, + 102,15,80,193,15,87,192,136,196,15,146,208,48,224,15,133,244,1,248,3,72,184, + 237,237,255,102,72,15,110,192,195,248,4,102,15,80,193,133,192,15,133,244, + 3,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192,195,248, + 153,255,131,252,250,1,15,130,244,82,15,132,244,84,131,252,250,3,15,130,244, + 104,15,135,244,248,252,242,15,81,192,195,248,2,252,242,15,17,68,36,8,221, + 68,36,8,131,252,250,5,15,135,244,248,88,15,132,244,247,232,244,88,80,252, + 233,244,253,248,1,232,244,149,255,80,252,233,244,253,248,2,131,252,250,7, + 15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,252,233,244, 253,248,1,217,232,217,201,217,252,241,252,233,244,253,248,2,131,252,250,9, 15,132,244,247,15,135,244,248,217,252,236,217,201,217,252,241,252,233,244, 253,248,1,255,217,252,254,252,233,244,253,248,2,131,252,250,11,15,132,244, @@ -426,14 +427,14 @@ static const unsigned char build_actionlist[13478] = { 248,7,221,92,36,8,252,242,15,16,68,36,8,195,255,139,84,36,12,221,68,36,4, 131,252,250,1,15,130,244,82,15,132,244,84,131,252,250,3,15,130,244,104,15, 135,244,248,217,252,250,195,248,2,131,252,250,5,15,130,244,88,15,132,244, - 148,131,252,250,7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252, + 149,131,252,250,7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252, 241,195,248,1,217,232,217,201,217,252,241,195,248,2,131,252,250,9,15,132, 244,247,255,15,135,244,248,217,252,236,217,201,217,252,241,195,248,1,217, 252,254,195,248,2,131,252,250,11,15,132,244,247,15,135,244,255,217,252,255, - 195,248,1,217,252,242,221,216,195,255,248,9,204,248,153,255,65,131,252,248, + 195,248,1,217,252,242,221,216,195,255,248,9,204,248,154,255,65,131,252,248, 1,15,132,244,247,15,135,244,248,252,242,15,88,193,195,248,1,252,242,15,92, 193,195,248,2,65,131,252,248,3,15,132,244,247,15,135,244,248,252,242,15,89, - 193,195,248,1,252,242,15,94,193,195,248,2,65,131,252,248,5,15,130,244,147, + 193,195,248,1,252,242,15,94,193,195,248,2,65,131,252,248,5,15,130,244,148, 15,132,244,107,65,131,252,248,7,15,132,244,247,15,135,244,248,72,184,237, 237,255,102,72,15,110,200,15,87,193,195,248,1,72,184,237,237,102,72,15,110, 200,15,84,193,195,248,2,65,131,252,248,9,15,135,244,248,252,242,15,17,68, @@ -443,14 +444,14 @@ static const unsigned char build_actionlist[13478] = { 252,242,15,93,193,195,248,1,252,242,15,95,193,195,248,9,204,255,139,68,36, 20,221,68,36,4,221,68,36,12,131,252,248,1,15,132,244,247,15,135,244,248,222, 193,195,248,1,222,252,233,195,248,2,131,252,248,3,15,132,244,247,15,135,244, - 248,222,201,195,248,1,222,252,249,195,248,2,131,252,248,5,15,130,244,147, + 248,222,201,195,248,1,222,252,249,195,248,2,131,252,248,5,15,130,244,148, 15,132,244,107,131,252,248,7,15,132,244,247,15,135,244,248,255,221,216,217, 224,195,248,1,221,216,217,225,195,248,2,131,252,248,9,15,132,244,247,15,135, 244,248,217,252,243,195,248,1,217,201,217,252,253,221,217,195,248,2,131,252, 248,11,15,132,244,247,15,135,244,255,255,219,252,233,219,209,221,217,195, 248,1,219,252,233,218,209,221,217,195,255,221,225,223,224,252,246,196,1,15, 132,244,248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1, - 15,133,244,248,217,201,248,2,221,216,195,255,248,154,137,200,86,72,137,214, + 15,133,244,248,217,201,248,2,221,216,195,255,248,155,137,200,86,72,137,214, 83,15,162,137,6,137,94,4,137,78,8,137,86,12,91,94,195,255,249,255,129,124, 253,202,4,239,15,135,244,41,129,124,253,194,4,239,15,135,244,41,255,252,242, 15,16,4,194,131,198,4,102,15,46,4,202,255,221,4,202,221,4,194,131,198,4,255, @@ -499,8 +500,8 @@ static const unsigned char build_actionlist[13478] = { 234,252,242,15,94,4,194,255,221,4,252,234,220,52,194,255,252,242,15,16,4, 252,234,252,242,15,16,12,199,255,221,4,252,234,221,4,199,255,252,242,15,16, 4,199,252,242,15,16,12,252,234,255,221,4,199,221,4,252,234,255,252,242,15, - 16,4,252,234,252,242,15,16,12,194,255,221,4,252,234,221,4,194,255,248,155, - 232,244,147,255,252,233,244,155,255,232,244,107,255,15,182,252,236,15,182, + 16,4,252,234,252,242,15,16,12,194,255,221,4,252,234,221,4,194,255,248,156, + 232,244,148,255,252,233,244,156,255,232,244,107,255,15,182,252,236,15,182, 192,139,76,36,96,137,145,233,141,20,194,65,137,192,65,41,232,248,33,137,205, 137,116,36,100,232,251,1,22,139,149,233,133,192,15,133,244,42,15,182,110, 252,255,15,182,78,252,253,139,68,252,234,4,139,44,252,234,137,68,202,4,137, @@ -544,8 +545,8 @@ static const unsigned char build_actionlist[13478] = { 28,139,149,233,15,182,78,252,253,137,4,202,199,68,202,4,237,139,6,15,182, 204,15,182,232,131,198,4,193,232,16,252,255,36,252,235,248,3,137,252,233, 232,251,1,27,15,183,70,252,254,72,252,247,208,252,233,244,2,255,72,252,247, - 208,139,106,252,248,139,173,233,139,4,135,252,233,244,156,255,72,252,247, - 208,139,106,252,248,139,173,233,139,4,135,252,233,244,157,255,15,182,252, + 208,139,106,252,248,139,173,233,139,4,135,252,233,244,157,255,72,252,247, + 208,139,106,252,248,139,173,233,139,4,135,252,233,244,158,255,15,182,252, 236,15,182,192,129,124,253,252,234,4,239,15,133,244,36,139,44,252,234,129, 124,253,194,4,239,15,135,244,251,255,252,242,15,16,4,194,252,242,15,45,192, 252,242,15,42,200,102,15,46,193,255,15,133,244,36,59,133,233,15,131,244,36, @@ -553,9 +554,9 @@ static const unsigned char build_actionlist[13478] = { 4,137,44,202,137,68,202,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16, 252,255,36,252,235,248,2,131,189,233,0,15,132,244,1,139,141,233,252,246,129, 233,235,15,132,244,36,15,182,78,252,253,252,233,244,1,248,5,255,129,124,253, - 194,4,239,15,133,244,36,139,4,194,252,233,244,156,255,15,182,252,236,15,182, + 194,4,239,15,133,244,36,139,4,194,252,233,244,157,255,15,182,252,236,15,182, 192,72,252,247,208,139,4,135,129,124,253,252,234,4,239,15,133,244,34,139, - 44,252,234,248,156,139,141,233,35,136,233,105,201,239,3,141,233,248,1,129, + 44,252,234,248,157,139,141,233,35,136,233,105,201,239,3,141,233,248,1,129, 185,233,239,15,133,244,250,57,129,233,15,133,244,250,129,121,253,4,239,15, 132,244,251,15,182,70,252,253,139,41,139,73,4,137,44,194,248,2,255,137,76, 194,4,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,252,235, @@ -573,10 +574,10 @@ static const unsigned char build_actionlist[13478] = { 137,104,4,137,8,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, 36,252,235,248,3,131,189,233,0,15,132,244,1,139,141,233,255,252,246,129,233, 235,15,132,244,39,15,182,78,252,253,252,233,244,1,248,5,129,124,253,194,4, - 239,15,133,244,39,139,4,194,252,233,244,157,248,7,128,165,233,235,139,139, + 239,15,133,244,39,139,4,194,252,233,244,158,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,15,182,252, 236,15,182,192,72,252,247,208,139,4,135,129,124,253,252,234,4,239,15,133, - 244,37,139,44,252,234,248,157,139,141,233,35,136,233,105,201,239,198,133, + 244,37,139,44,252,234,248,158,139,141,233,35,136,233,105,201,239,198,133, 233,0,3,141,233,248,1,129,185,233,239,15,133,244,251,57,129,233,15,133,244, 251,129,121,253,4,239,15,132,244,250,248,2,255,252,246,133,233,235,15,133, 244,253,248,3,15,182,70,252,253,139,108,194,4,139,4,194,137,105,4,137,1,139, @@ -639,7 +640,7 @@ static const unsigned char build_actionlist[13478] = { 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,139,255,141,12,202,255,129,121, + 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, @@ -797,7 +798,8 @@ enum { GLOB_ff_bit_rol, GLOB_ff_bit_ror, GLOB_vm_record, - GLOB_vm_hook, + GLOB_vm_rethook, + GLOB_vm_inshook, GLOB_cont_hook, GLOB_vm_hotloop, GLOB_vm_callhook, @@ -948,7 +950,8 @@ static const char *const globnames[] = { "ff_bit_rol", "ff_bit_ror", "vm_record", - "vm_hook", + "vm_rethook", + "vm_inshook", "cont_hook", "vm_hotloop", "vm_callhook", @@ -1315,84 +1318,84 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #if LJ_HASJIT dasm_put(Dst, 6968, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); #endif - dasm_put(Dst, 6999, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base)); - dasm_put(Dst, 7065, GG_DISP2STATIC); + dasm_put(Dst, 6999, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); + dasm_put(Dst, 7050, Dt1(->base), Dt1(->base), GG_DISP2STATIC); #if LJ_HASJIT - dasm_put(Dst, 7101); -#endif - dasm_put(Dst, 7103); -#if LJ_HASJIT - dasm_put(Dst, 7106, DISPATCH_J(L)); + dasm_put(Dst, 7117); #endif dasm_put(Dst, 7119); #if LJ_HASJIT dasm_put(Dst, 7122, DISPATCH_J(L)); #endif - dasm_put(Dst, 7129, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 7135); #if LJ_HASJIT - dasm_put(Dst, 7101); + dasm_put(Dst, 7138, DISPATCH_J(L)); #endif - dasm_put(Dst, 7197); + dasm_put(Dst, 7145, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 7200, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); + dasm_put(Dst, 7117); #endif - dasm_put(Dst, 7241); + dasm_put(Dst, 7213); +#if LJ_HASJIT + dasm_put(Dst, 7216, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); +#endif + dasm_put(Dst, 7257); if (!sse) { - dasm_put(Dst, 7244); + dasm_put(Dst, 7260); } - dasm_put(Dst, 7289, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7305, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7375); + dasm_put(Dst, 7391); } - dasm_put(Dst, 7420, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); + dasm_put(Dst, 7436, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(bff00000,00000000)), (unsigned int)((U64x(bff00000,00000000))>>32)); if (!sse) { - dasm_put(Dst, 7506); + dasm_put(Dst, 7522); } - dasm_put(Dst, 7545, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7561, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); if (sse) { - dasm_put(Dst, 7634, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 7650, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(43300000,00000000)), (unsigned int)((U64x(43300000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); } else { - dasm_put(Dst, 7748); + dasm_put(Dst, 7764); } - dasm_put(Dst, 7795); + dasm_put(Dst, 7811); if (!sse) { } else { - dasm_put(Dst, 7869); + dasm_put(Dst, 7885); } - dasm_put(Dst, 7872); - dasm_put(Dst, 7957, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); - dasm_put(Dst, 8058, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); - dasm_put(Dst, 8226); + dasm_put(Dst, 7888); + dasm_put(Dst, 7973, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32)); + dasm_put(Dst, 8074, (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32), (unsigned int)(U64x(3ff00000,00000000)), (unsigned int)((U64x(3ff00000,00000000))>>32), (unsigned int)(U64x(7ff00000,00000000)), (unsigned int)((U64x(7ff00000,00000000))>>32)); + dasm_put(Dst, 8242); if (sse) { - dasm_put(Dst, 8267); - dasm_put(Dst, 8337); - dasm_put(Dst, 8410); + dasm_put(Dst, 8283); + dasm_put(Dst, 8353); + dasm_put(Dst, 8426); } else { - dasm_put(Dst, 8460); - dasm_put(Dst, 8552); + dasm_put(Dst, 8476); + dasm_put(Dst, 8568); } - dasm_put(Dst, 8598); + dasm_put(Dst, 8614); if (sse) { - dasm_put(Dst, 8604, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); - dasm_put(Dst, 8693, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); + dasm_put(Dst, 8620, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); + dasm_put(Dst, 8709, (unsigned int)(U64x(7fffffff,ffffffff)), (unsigned int)((U64x(7fffffff,ffffffff))>>32)); } else { - dasm_put(Dst, 8817); - dasm_put(Dst, 8900); + dasm_put(Dst, 8833); + dasm_put(Dst, 8916); if (cmov) { - dasm_put(Dst, 8955); + dasm_put(Dst, 8971); } else { - dasm_put(Dst, 8974); + dasm_put(Dst, 8990); } - dasm_put(Dst, 8813); + dasm_put(Dst, 8829); } - dasm_put(Dst, 9015); + dasm_put(Dst, 9031); } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) { int vk = 0; - dasm_put(Dst, 9041, defop); + dasm_put(Dst, 9057, defop); switch (op) { @@ -1401,600 +1404,600 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - dasm_put(Dst, 9043, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9059, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9064); + dasm_put(Dst, 9080); } else { - dasm_put(Dst, 9079); + dasm_put(Dst, 9095); if (cmov) { - dasm_put(Dst, 9089); + dasm_put(Dst, 9105); } else { - dasm_put(Dst, 9095); + dasm_put(Dst, 9111); } } switch (op) { case BC_ISLT: - dasm_put(Dst, 9102); + dasm_put(Dst, 9118); break; case BC_ISGE: - dasm_put(Dst, 8895); + dasm_put(Dst, 8911); break; case BC_ISLE: dasm_put(Dst, 5872); break; case BC_ISGT: - dasm_put(Dst, 9107); + dasm_put(Dst, 9123); break; default: break; /* Shut up GCC. */ } - dasm_put(Dst, 9112, -BCBIAS_J*4); + dasm_put(Dst, 9128, -BCBIAS_J*4); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 9146, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9162, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9172); + dasm_put(Dst, 9188); } else { - dasm_put(Dst, 9184); + dasm_put(Dst, 9200); if (cmov) { - dasm_put(Dst, 9089); + dasm_put(Dst, 9105); } else { - dasm_put(Dst, 9095); + dasm_put(Dst, 9111); } } iseqne_fp: if (vk) { - dasm_put(Dst, 9191); + dasm_put(Dst, 9207); } else { - dasm_put(Dst, 9200); + dasm_put(Dst, 9216); } iseqne_end: if (vk) { - dasm_put(Dst, 9209, -BCBIAS_J*4); + dasm_put(Dst, 9225, -BCBIAS_J*4); } else { - dasm_put(Dst, 9224, -BCBIAS_J*4); + dasm_put(Dst, 9240, -BCBIAS_J*4); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); if (op == BC_ISEQV || op == BC_ISNEV) { - dasm_put(Dst, 9239, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<>32)); + dasm_put(Dst, 9543, (unsigned int)(U64x(80000000,00000000)), (unsigned int)((U64x(80000000,00000000))>>32)); } else { - dasm_put(Dst, 9552); + dasm_put(Dst, 9568); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_LEN: - dasm_put(Dst, 9561, LJ_TSTR); + dasm_put(Dst, 9577, LJ_TSTR); if (sse) { - dasm_put(Dst, 9575, Dt5(->len)); + dasm_put(Dst, 9591, Dt5(->len)); } else { - dasm_put(Dst, 9593, Dt5(->len)); + dasm_put(Dst, 9609, Dt5(->len)); } - dasm_put(Dst, 9602, LJ_TTAB); + dasm_put(Dst, 9618, LJ_TTAB); if (sse) { - dasm_put(Dst, 9643); + dasm_put(Dst, 9659); } else { } - dasm_put(Dst, 9652); + dasm_put(Dst, 9668); break; /* -- Binary ops -------------------------------------------------------- */ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9682); + dasm_put(Dst, 9698); } else { - dasm_put(Dst, 9696); + dasm_put(Dst, 9712); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9716); + dasm_put(Dst, 9732); } else { - dasm_put(Dst, 9730); + dasm_put(Dst, 9746); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9760); + dasm_put(Dst, 9776); } else { - dasm_put(Dst, 9774); + dasm_put(Dst, 9790); } break; } if (sse) { - dasm_put(Dst, 9545); + dasm_put(Dst, 9561); } else { - dasm_put(Dst, 9557); + dasm_put(Dst, 9573); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9782); + dasm_put(Dst, 9798); } else { - dasm_put(Dst, 9796); + dasm_put(Dst, 9812); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9804); + dasm_put(Dst, 9820); } else { - dasm_put(Dst, 9818); + dasm_put(Dst, 9834); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9826); + dasm_put(Dst, 9842); } else { - dasm_put(Dst, 9840); + dasm_put(Dst, 9856); } break; } if (sse) { - dasm_put(Dst, 9545); + dasm_put(Dst, 9561); } else { - dasm_put(Dst, 9557); + dasm_put(Dst, 9573); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9848); + dasm_put(Dst, 9864); } else { - dasm_put(Dst, 9862); + dasm_put(Dst, 9878); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9870); + dasm_put(Dst, 9886); } else { - dasm_put(Dst, 9884); + dasm_put(Dst, 9900); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9892); + dasm_put(Dst, 9908); } else { - dasm_put(Dst, 9906); + dasm_put(Dst, 9922); } break; } if (sse) { - dasm_put(Dst, 9545); + dasm_put(Dst, 9561); } else { - dasm_put(Dst, 9557); + dasm_put(Dst, 9573); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9914); + dasm_put(Dst, 9930); } else { - dasm_put(Dst, 9928); + dasm_put(Dst, 9944); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9936); + dasm_put(Dst, 9952); } else { - dasm_put(Dst, 9950); + dasm_put(Dst, 9966); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9958); + dasm_put(Dst, 9974); } else { - dasm_put(Dst, 9972); + dasm_put(Dst, 9988); } break; } if (sse) { - dasm_put(Dst, 9545); + dasm_put(Dst, 9561); } else { - dasm_put(Dst, 9557); + dasm_put(Dst, 9573); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_MODVN: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9980); + dasm_put(Dst, 9996); } else { - dasm_put(Dst, 9994); + dasm_put(Dst, 10010); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10002); + dasm_put(Dst, 10018); } else { - dasm_put(Dst, 10016); + dasm_put(Dst, 10032); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10024); + dasm_put(Dst, 10040); } else { - dasm_put(Dst, 10038); + dasm_put(Dst, 10054); } break; } - dasm_put(Dst, 10046); + dasm_put(Dst, 10062); if (sse) { - dasm_put(Dst, 9545); + dasm_put(Dst, 9561); } else { - dasm_put(Dst, 9557); + dasm_put(Dst, 9573); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_MODNV: case BC_MODVV: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9980); + dasm_put(Dst, 9996); } else { - dasm_put(Dst, 9994); + dasm_put(Dst, 10010); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10002); + dasm_put(Dst, 10018); } else { - dasm_put(Dst, 10016); + dasm_put(Dst, 10032); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10024); + dasm_put(Dst, 10040); } else { - dasm_put(Dst, 10038); + dasm_put(Dst, 10054); } break; } - dasm_put(Dst, 10052); + dasm_put(Dst, 10068); break; case BC_POW: - dasm_put(Dst, 9662); + dasm_put(Dst, 9678); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 9670, LJ_TISNUM); + dasm_put(Dst, 9686, LJ_TISNUM); if (sse) { - dasm_put(Dst, 9980); + dasm_put(Dst, 9996); } else { - dasm_put(Dst, 9994); + dasm_put(Dst, 10010); } break; case 1: - dasm_put(Dst, 9704, LJ_TISNUM); + dasm_put(Dst, 9720, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10002); + dasm_put(Dst, 10018); } else { - dasm_put(Dst, 10016); + dasm_put(Dst, 10032); } break; default: - dasm_put(Dst, 9738, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 9754, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10024); + dasm_put(Dst, 10040); } else { - dasm_put(Dst, 10038); + dasm_put(Dst, 10054); } break; } - dasm_put(Dst, 10057); + dasm_put(Dst, 10073); if (sse) { - dasm_put(Dst, 9545); + dasm_put(Dst, 9561); } else { - dasm_put(Dst, 9557); + dasm_put(Dst, 9573); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_CAT: - dasm_put(Dst, 10061, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10077, Dt1(->base), Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 10151, LJ_TSTR); + dasm_put(Dst, 10167, LJ_TSTR); break; case BC_KSHORT: if (sse) { - dasm_put(Dst, 10186); + dasm_put(Dst, 10202); } else { - dasm_put(Dst, 10201); + dasm_put(Dst, 10217); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_KNUM: if (sse) { - dasm_put(Dst, 10209); + dasm_put(Dst, 10225); } else { - dasm_put(Dst, 10222); + dasm_put(Dst, 10238); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_KPRI: - dasm_put(Dst, 10229); + dasm_put(Dst, 10245); break; case BC_KNIL: - dasm_put(Dst, 10257, LJ_TNIL); + dasm_put(Dst, 10273, LJ_TNIL); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 10304, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10320, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) - dasm_put(Dst, 10349, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); - dasm_put(Dst, 10440); + dasm_put(Dst, 10365, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 10456); break; #undef TV2MARKOFS case BC_USETS: - dasm_put(Dst, 10452, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); + dasm_put(Dst, 10468, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 10545); + dasm_put(Dst, 10561); if (sse) { - dasm_put(Dst, 10550); + dasm_put(Dst, 10566); } else { - dasm_put(Dst, 9365); + dasm_put(Dst, 9381); } - dasm_put(Dst, 10557, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10573, offsetof(GCfuncL, uvptr), DtA(->v)); if (sse) { - dasm_put(Dst, 10566); + dasm_put(Dst, 10582); } else { - dasm_put(Dst, 10572); + dasm_put(Dst, 10588); } - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_USETP: - dasm_put(Dst, 10575, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 10591, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 10614, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 10630, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 10669, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 10685, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: - dasm_put(Dst, 10735, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10751, Dt1(->base), DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), LJ_TTAB); break; case BC_TDUP: - dasm_put(Dst, 10856, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 10872, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_GGET: - dasm_put(Dst, 10951, Dt7(->env)); + dasm_put(Dst, 10967, Dt7(->env)); break; case BC_GSET: - dasm_put(Dst, 10970, Dt7(->env)); + dasm_put(Dst, 10986, Dt7(->env)); break; case BC_TGETV: - dasm_put(Dst, 10989, LJ_TTAB, LJ_TISNUM); + dasm_put(Dst, 11005, LJ_TTAB, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11022); + dasm_put(Dst, 11038); } else { } - dasm_put(Dst, 11043, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11239, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11255, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); - dasm_put(Dst, 11528, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11460, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); + dasm_put(Dst, 11544, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 11590, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 11666, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); - dasm_put(Dst, 11759, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11606, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 11682, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); + dasm_put(Dst, 11775, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 11850, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); - dasm_put(Dst, 11949, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 11866, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); + dasm_put(Dst, 11965, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 11995); + dasm_put(Dst, 12011); if (sse) { - dasm_put(Dst, 10550); + dasm_put(Dst, 10566); } else { } - dasm_put(Dst, 12000, Dt6(->marked), LJ_GC_BLACK); + dasm_put(Dst, 12016, Dt6(->marked), LJ_GC_BLACK); if (sse) { - dasm_put(Dst, 12025); + dasm_put(Dst, 12041); } else { } - dasm_put(Dst, 12032, 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, 12158, Dt6(->gclist)); + dasm_put(Dst, 12048, 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, 12174, Dt6(->gclist)); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: - dasm_put(Dst, 9666); + dasm_put(Dst, 9682); if (op == BC_CALLM) { - dasm_put(Dst, 12166); + dasm_put(Dst, 12182); } - dasm_put(Dst, 12171, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 12187, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 12166); + dasm_put(Dst, 12182); break; case BC_CALLT: - dasm_put(Dst, 12213, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); - dasm_put(Dst, 12332, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 12229, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); + dasm_put(Dst, 12348, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); break; case BC_ITERC: - dasm_put(Dst, 12390, LJ_TFUNC, 2+1, Dt7(->pc)); + dasm_put(Dst, 12406, LJ_TFUNC, 2+1, Dt7(->pc)); break; case BC_VARG: - dasm_put(Dst, 12471, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); - dasm_put(Dst, 12616, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 12487, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); + dasm_put(Dst, 12632, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 12166); + dasm_put(Dst, 12182); break; case BC_RET: case BC_RET0: case BC_RET1: if (op != BC_RET0) { - dasm_put(Dst, 12715); + dasm_put(Dst, 12731); } - dasm_put(Dst, 12719, FRAME_TYPE); + dasm_put(Dst, 12735, FRAME_TYPE); switch (op) { case BC_RET: - dasm_put(Dst, 12738); + dasm_put(Dst, 12754); break; case BC_RET1: - dasm_put(Dst, 12796); + dasm_put(Dst, 12812); /* fallthrough */ case BC_RET0: - dasm_put(Dst, 12812); + dasm_put(Dst, 12828); default: break; } - dasm_put(Dst, 12823, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 12839, Dt7(->pc), PC2PROTO(k)); if (op == BC_RET) { - dasm_put(Dst, 12867, LJ_TNIL); + dasm_put(Dst, 12883, LJ_TNIL); } else { - dasm_put(Dst, 12876, LJ_TNIL); + dasm_put(Dst, 12892, LJ_TNIL); } - dasm_put(Dst, 12883); + dasm_put(Dst, 12899); if (op != BC_RET0) { - dasm_put(Dst, 12904); + dasm_put(Dst, 12920); } dasm_put(Dst, 4542); break; @@ -2004,7 +2007,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 12908, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 12924, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2016,57 +2019,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, 12929); + dasm_put(Dst, 12945); if (!vk) { - dasm_put(Dst, 12933, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 12949, LJ_TISNUM, LJ_TISNUM); } - dasm_put(Dst, 12952); + dasm_put(Dst, 12968); if (!vk) { - dasm_put(Dst, 12956, LJ_TISNUM); + dasm_put(Dst, 12972, LJ_TISNUM); } if (sse) { - dasm_put(Dst, 12965); + dasm_put(Dst, 12981); if (vk) { - dasm_put(Dst, 12977); + dasm_put(Dst, 12993); } else { - dasm_put(Dst, 12996); + dasm_put(Dst, 13012); } - dasm_put(Dst, 13001); + dasm_put(Dst, 13017); } else { - dasm_put(Dst, 13014); + dasm_put(Dst, 13030); if (vk) { - dasm_put(Dst, 13020); - } else { dasm_put(Dst, 13036); + } else { + dasm_put(Dst, 13052); } - dasm_put(Dst, 13044); + dasm_put(Dst, 13060); if (cmov) { - dasm_put(Dst, 9089); + dasm_put(Dst, 9105); } else { - dasm_put(Dst, 9095); + dasm_put(Dst, 9111); } if (!cmov) { - dasm_put(Dst, 13049); + dasm_put(Dst, 13065); } } if (op == BC_FORI) { - dasm_put(Dst, 13055, -BCBIAS_J*4); + dasm_put(Dst, 13071, -BCBIAS_J*4); } else if (op == BC_JFORI) { - dasm_put(Dst, 13065, -BCBIAS_J*4, BC_JLOOP); + dasm_put(Dst, 13081, -BCBIAS_J*4, BC_JLOOP); } else if (op == BC_IFORL) { - dasm_put(Dst, 13079, -BCBIAS_J*4); + dasm_put(Dst, 13095, -BCBIAS_J*4); } else { - dasm_put(Dst, 13075, BC_JLOOP); + dasm_put(Dst, 13091, BC_JLOOP); } - dasm_put(Dst, 9124); + dasm_put(Dst, 9140); if (sse) { - dasm_put(Dst, 13089); + dasm_put(Dst, 13105); } break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 12908, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 12924, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2075,33 +2078,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IITERL: - dasm_put(Dst, 13100, LJ_TNIL); + dasm_put(Dst, 13116, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 13115, BC_JLOOP); + dasm_put(Dst, 13131, BC_JLOOP); } else { - dasm_put(Dst, 13129, -BCBIAS_J*4); + dasm_put(Dst, 13145, -BCBIAS_J*4); } - dasm_put(Dst, 9424); + dasm_put(Dst, 9440); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 12908, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 12924, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; case BC_ILOOP: - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 13145, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); + dasm_put(Dst, 13161, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); #endif break; case BC_JMP: - dasm_put(Dst, 13169, -BCBIAS_J*4); + dasm_put(Dst, 13185, -BCBIAS_J*4); break; /* -- Function headers -------------------------------------------------- */ @@ -2124,47 +2127,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IFUNCF: - dasm_put(Dst, 13194, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); + dasm_put(Dst, 13210, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); if (op == BC_JFUNCF) { - dasm_put(Dst, 13224, BC_JLOOP); + dasm_put(Dst, 13240, BC_JLOOP); } else { - dasm_put(Dst, 7221); + dasm_put(Dst, 7237); } - dasm_put(Dst, 13233, LJ_TNIL); + dasm_put(Dst, 13249, LJ_TNIL); break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif - dasm_put(Dst, 7101); + dasm_put(Dst, 7117); break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 13255, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 13271, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); if (op == BC_JFUNCV) { - dasm_put(Dst, 13224, BC_JLOOP); + dasm_put(Dst, 13240, BC_JLOOP); } else { - dasm_put(Dst, 13346, -4+PC2PROTO(k)); + dasm_put(Dst, 13362, -4+PC2PROTO(k)); } - dasm_put(Dst, 13369, LJ_TNIL); + dasm_put(Dst, 13385, LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: - dasm_put(Dst, 13391, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); + dasm_put(Dst, 13407, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); if (op == BC_FUNCC) { - dasm_put(Dst, 13421); + dasm_put(Dst, 13437); } else { - dasm_put(Dst, 13425); + dasm_put(Dst, 13441); } - dasm_put(Dst, 13433, DISPATCH_GL(vmstate), ~LJ_VMST_C); + dasm_put(Dst, 13449, DISPATCH_GL(vmstate), ~LJ_VMST_C); if (op == BC_FUNCC) { - dasm_put(Dst, 13442); + dasm_put(Dst, 13458); } else { - dasm_put(Dst, 13446, DISPATCH_GL(wrapf)); + dasm_put(Dst, 13462, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 13451, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); + dasm_put(Dst, 13467, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); break; /* ---------------------------------------------------------------------- */ @@ -2192,7 +2195,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx, cmov, sse); - dasm_put(Dst, 13476); + dasm_put(Dst, 13492); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op, cmov, sse); diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index b9036273..9d201f91 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc @@ -2453,7 +2453,13 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) | jmp >1 #endif | - |->vm_hook: // Dispatch target with enabled hooks. + |->vm_rethook: // Dispatch target for return hooks. + | movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] + | test RDL, HOOK_ACTIVE // Hook already active? + | jnz >5 + | jmp >1 + | + |->vm_inshook: // Dispatch target for instr/line hooks. | movzx RD, byte [DISPATCH+DISPATCH_GL(hookmask)] | test RDL, HOOK_ACTIVE // Hook already active? | jnz >5 diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index dc7e64c6..cc1ac38d 100644 --- a/src/buildvm_x86.h +++ b/src/buildvm_x86.h @@ -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[15151] = { +static const unsigned char build_actionlist[15167] = { 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, @@ -399,187 +399,188 @@ static const unsigned char build_actionlist[15151] = { 139,133,233,41,208,193,232,3,131,192,1,139,108,36,16,85,195,248,136,255,15, 182,131,233,168,235,15,133,244,251,168,235,15,133,244,247,168,235,15,132, 244,247,252,255,139,233,252,233,244,247,255,248,137,15,182,131,233,168,235, - 15,133,244,251,168,235,15,132,244,251,252,255,139,233,15,132,244,247,168, - 235,15,132,244,251,248,1,139,108,36,48,137,149,233,137,252,242,137,252,233, - 232,251,1,20,248,3,139,149,233,248,4,15,182,78,252,253,248,5,255,15,182,110, - 252,252,15,183,70,252,254,252,255,164,253,171,233,248,138,131,198,4,139,77, - 232,137,76,36,20,252,233,244,4,248,139,255,139,106,252,248,139,173,233,15, - 182,133,233,141,4,194,139,108,36,48,137,149,233,137,133,233,137,252,242,141, - 139,233,137,171,233,137,116,36,24,232,251,1,21,252,233,244,3,255,248,140, - 255,199,131,233,0,0,0,0,252,233,244,247,255,248,141,255,137,171,233,248,1, - 255,141,68,194,252,248,139,108,36,48,137,149,233,137,133,233,137,252,242, - 137,252,233,137,116,36,24,232,251,1,22,199,68,36,24,0,0,0,0,139,149,233,137, - 193,139,133,233,41,208,137,205,15,182,78,252,253,193,232,3,131,192,1,252, - 255,229,248,142,255,85,141,108,36,12,85,83,82,81,80,15,182,69,252,252,138, - 101,252,248,137,125,252,252,137,117,252,248,139,93,0,139,139,233,199,131, - 233,237,137,131,233,137,139,233,129,252,236,239,252,247,131,233,237,15,132, - 244,247,252,242,15,17,125,216,252,242,15,17,117,208,252,242,15,17,109,200, - 252,242,15,17,101,192,252,242,15,17,93,184,252,242,15,17,85,176,252,242,15, - 17,77,168,252,242,15,17,69,160,248,1,139,171,233,139,147,233,137,171,233, - 137,149,233,141,84,36,16,141,139,233,232,251,1,23,137,196,139,149,233,139, - 116,36,24,137,108,36,48,255,248,143,255,139,122,252,248,139,191,233,139,191, - 233,199,131,233,0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198, - 4,193,232,16,252,255,36,171,255,248,82,255,217,124,36,4,137,68,36,8,102,184, - 0,4,102,11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217, - 252,252,217,108,36,4,139,68,36,8,195,255,248,144,102,15,252,239,210,102,15, - 118,210,102,15,115,210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15, - 40,200,102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15, - 88,203,252,242,15,92,203,102,15,86,202,184,0,0,252,240,63,102,15,110,208, - 102,15,112,210,81,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15, - 40,193,248,1,195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68, - 36,4,102,37,252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217, - 108,36,4,139,68,36,8,195,255,248,145,102,15,252,239,210,102,15,118,210,102, - 15,115,210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,200,102, - 15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252, - 242,15,92,203,102,15,86,202,184,0,0,252,240,191,102,15,110,208,102,15,112, - 210,81,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40,193,248, - 1,195,248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102, - 137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248, - 146,102,15,252,239,210,102,15,118,210,102,15,115,210,1,184,0,0,48,67,102, - 15,110,216,102,15,112,219,81,15,40,200,102,15,84,202,102,15,46,217,15,134, - 244,247,102,15,85,208,15,40,193,252,242,15,88,203,252,242,15,92,203,184,0, - 0,252,240,63,102,15,110,216,102,15,112,219,81,252,242,15,194,193,1,102,15, - 84,195,252,242,15,92,200,102,15,86,202,15,40,193,248,1,195,248,147,255,15, - 40,232,252,242,15,94,193,102,15,252,239,210,102,15,118,210,102,15,115,210, - 1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,224,102,15,84,226, - 102,15,46,220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92, - 227,102,15,86,226,184,0,0,252,240,63,102,15,110,208,102,15,112,210,81,252, - 242,15,194,196,1,102,15,84,194,252,242,15,92,224,15,40,197,252,242,15,89, - 204,252,242,15,92,193,195,248,1,252,242,15,89,200,15,40,197,252,242,15,92, - 193,195,255,217,193,216,252,241,217,124,36,4,102,184,0,4,102,11,68,36,4,102, - 37,252,255,252,247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4, - 222,201,222,252,233,195,255,248,88,217,252,234,222,201,248,148,217,84,36, - 4,129,124,36,4,0,0,128,127,15,132,244,247,129,124,36,4,0,0,128,252,255,15, - 132,244,248,248,149,217,192,217,252,252,220,252,233,217,201,217,252,240,217, - 232,222,193,217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255, - 248,107,219,84,36,4,219,68,36,4,255,223,252,233,255,221,252,233,223,224,158, - 255,15,133,244,254,15,138,244,255,221,216,139,68,36,4,131,252,248,1,15,142, - 244,252,248,1,169,1,0,0,0,15,133,244,248,216,200,209,232,252,233,244,1,248, - 2,209,232,15,132,244,251,217,192,248,3,216,200,209,232,15,132,244,250,15, - 131,244,3,220,201,252,233,244,3,248,4,255,222,201,248,5,195,248,6,15,132, - 244,5,15,130,244,253,217,232,222,252,241,252,247,216,131,252,248,1,15,132, - 244,5,252,233,244,1,248,7,221,216,217,232,195,248,8,217,84,36,4,217,201,217, - 84,36,8,139,68,36,4,209,224,61,0,0,0,252,255,15,132,244,248,139,68,36,8,209, - 224,15,132,244,250,61,0,0,0,252,255,15,132,244,250,217,252,241,252,233,244, - 149,248,9,255,217,232,255,223,252,234,255,221,252,234,223,224,158,255,15, - 132,244,247,217,201,248,1,221,216,195,248,2,217,225,217,232,255,15,132,244, - 249,221,216,217,225,217,252,238,184,0,0,0,0,15,146,208,209,200,51,68,36,4, - 15,137,244,249,217,201,248,3,221,217,217,225,195,248,4,131,124,36,4,0,15, - 141,244,3,221,216,221,216,133,192,15,132,244,251,217,252,238,195,248,5,199, - 68,36,4,0,0,128,127,217,68,36,4,195,255,248,107,255,248,150,252,242,15,45, - 193,252,242,15,42,208,102,15,46,202,15,133,244,254,15,138,244,255,248,151, - 131,252,248,1,15,142,244,252,248,1,169,1,0,0,0,15,133,244,248,252,242,15, - 89,192,209,232,252,233,244,1,248,2,209,232,15,132,244,251,15,40,200,248,3, - 252,242,15,89,192,209,232,15,132,244,250,15,131,244,3,255,252,242,15,89,200, - 252,233,244,3,248,4,252,242,15,89,193,248,5,195,248,6,15,132,244,5,15,130, - 244,253,80,184,0,0,252,240,63,102,15,110,200,102,15,112,201,81,252,242,15, - 94,200,88,15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244,1, - 248,7,184,0,0,252,240,63,102,15,110,192,102,15,112,192,81,195,248,8,252,242, - 15,17,76,36,12,252,242,15,17,68,36,4,131,124,36,12,0,15,133,244,247,139,68, - 36,16,209,224,61,0,0,224,252,255,15,132,244,248,248,1,255,131,124,36,4,0, - 15,133,244,247,139,68,36,8,209,224,15,132,244,250,61,0,0,224,252,255,15,132, - 244,251,248,1,221,68,36,12,221,68,36,4,217,252,241,217,192,217,252,252,220, - 252,233,217,201,217,252,240,217,232,222,193,217,252,253,221,217,221,92,36, - 4,252,242,15,16,68,36,4,195,248,9,184,0,0,252,240,63,102,15,110,208,102,15, - 112,210,81,102,15,46,194,15,132,244,247,15,40,193,248,1,195,248,2,102,15, - 252,239,210,102,15,118,210,102,15,115,210,1,102,15,84,194,184,0,0,252,240, - 63,102,15,110,208,102,15,112,210,81,102,15,46,194,15,132,244,1,102,15,80, - 193,15,87,192,136,196,15,146,208,48,224,15,133,244,1,248,3,184,0,0,252,240, - 127,102,15,110,192,102,15,112,192,81,195,248,4,102,15,80,193,133,192,15,133, - 244,3,255,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192, - 195,248,152,255,139,68,36,12,252,242,15,16,68,36,4,131,252,248,1,15,132,244, - 247,15,135,244,248,232,244,82,252,233,244,253,248,1,232,244,84,252,233,244, - 253,248,2,131,252,248,3,15,132,244,247,15,135,244,248,232,244,104,255,252, - 233,244,253,248,1,252,242,15,81,192,248,7,252,242,15,17,68,36,4,221,68,36, - 4,195,248,2,221,68,36,4,131,252,248,5,15,130,244,88,15,132,244,148,248,2, - 131,252,248,7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241, - 195,248,1,217,232,217,201,217,252,241,195,248,2,131,252,248,9,15,132,244, - 247,15,135,244,248,255,217,252,236,217,201,217,252,241,195,248,1,217,252, - 254,195,248,2,131,252,248,11,15,132,244,247,15,135,244,255,217,252,255,195, - 248,1,217,252,242,221,216,195,255,139,68,36,12,221,68,36,4,131,252,248,1, - 15,130,244,82,15,132,244,84,131,252,248,3,15,130,244,104,15,135,244,248,217, - 252,250,195,248,2,131,252,248,5,15,130,244,88,15,132,244,148,131,252,248, - 7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,195,248,1, - 217,232,217,201,217,252,241,195,248,2,131,252,248,9,15,132,244,247,255,15, - 135,244,248,217,252,236,217,201,217,252,241,195,248,1,217,252,254,195,248, + 15,133,244,251,252,233,244,247,248,138,15,182,131,233,168,235,15,133,244, + 251,168,235,15,132,244,251,252,255,139,233,15,132,244,247,168,235,15,132, + 244,251,248,1,255,139,108,36,48,137,149,233,137,252,242,137,252,233,232,251, + 1,20,248,3,139,149,233,248,4,15,182,78,252,253,248,5,15,182,110,252,252,15, + 183,70,252,254,252,255,164,253,171,233,248,139,131,198,4,139,77,232,137,76, + 36,20,252,233,244,4,248,140,255,139,106,252,248,139,173,233,15,182,133,233, + 141,4,194,139,108,36,48,137,149,233,137,133,233,137,252,242,141,139,233,137, + 171,233,137,116,36,24,232,251,1,21,252,233,244,3,255,248,141,255,199,131, + 233,0,0,0,0,252,233,244,247,255,248,142,255,137,171,233,248,1,255,141,68, + 194,252,248,139,108,36,48,137,149,233,137,133,233,137,252,242,137,252,233, + 137,116,36,24,232,251,1,22,199,68,36,24,0,0,0,0,139,149,233,137,193,139,133, + 233,41,208,137,205,15,182,78,252,253,193,232,3,131,192,1,252,255,229,248, + 143,255,85,141,108,36,12,85,83,82,81,80,15,182,69,252,252,138,101,252,248, + 137,125,252,252,137,117,252,248,139,93,0,139,139,233,199,131,233,237,137, + 131,233,137,139,233,129,252,236,239,252,247,131,233,237,15,132,244,247,252, + 242,15,17,125,216,252,242,15,17,117,208,252,242,15,17,109,200,252,242,15, + 17,101,192,252,242,15,17,93,184,252,242,15,17,85,176,252,242,15,17,77,168, + 252,242,15,17,69,160,248,1,139,171,233,139,147,233,137,171,233,137,149,233, + 141,84,36,16,141,139,233,232,251,1,23,137,196,139,149,233,139,116,36,24,137, + 108,36,48,255,248,144,255,139,122,252,248,139,191,233,139,191,233,199,131, + 233,0,0,0,0,199,131,233,237,139,6,15,182,204,15,182,232,131,198,4,193,232, + 16,252,255,36,171,255,248,82,255,217,124,36,4,137,68,36,8,102,184,0,4,102, + 11,68,36,4,102,37,252,255,252,247,102,137,68,36,6,217,108,36,6,217,252,252, + 217,108,36,4,139,68,36,8,195,255,248,145,102,15,252,239,210,102,15,118,210, + 102,15,115,210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,200, + 102,15,84,202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203, + 252,242,15,92,203,102,15,86,202,184,0,0,252,240,63,102,15,110,208,102,15, + 112,210,81,252,242,15,194,193,1,102,15,84,194,252,242,15,92,200,15,40,193, + 248,1,195,248,84,255,217,124,36,4,137,68,36,8,102,184,0,8,102,11,68,36,4, + 102,37,252,255,252,251,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36, + 4,139,68,36,8,195,255,248,146,102,15,252,239,210,102,15,118,210,102,15,115, + 210,1,184,0,0,48,67,102,15,110,216,102,15,112,219,81,15,40,200,102,15,84, + 202,102,15,46,217,15,134,244,247,102,15,85,208,252,242,15,88,203,252,242, + 15,92,203,102,15,86,202,184,0,0,252,240,191,102,15,110,208,102,15,112,210, + 81,252,242,15,194,193,6,102,15,84,194,252,242,15,92,200,15,40,193,248,1,195, + 248,104,255,217,124,36,4,137,68,36,8,102,184,0,12,102,11,68,36,4,102,137, + 68,36,6,217,108,36,6,217,252,252,217,108,36,4,139,68,36,8,195,255,248,147, + 102,15,252,239,210,102,15,118,210,102,15,115,210,1,184,0,0,48,67,102,15,110, + 216,102,15,112,219,81,15,40,200,102,15,84,202,102,15,46,217,15,134,244,247, + 102,15,85,208,15,40,193,252,242,15,88,203,252,242,15,92,203,184,0,0,252,240, + 63,102,15,110,216,102,15,112,219,81,252,242,15,194,193,1,102,15,84,195,252, + 242,15,92,200,102,15,86,202,15,40,193,248,1,195,248,148,255,15,40,232,252, + 242,15,94,193,102,15,252,239,210,102,15,118,210,102,15,115,210,1,184,0,0, + 48,67,102,15,110,216,102,15,112,219,81,15,40,224,102,15,84,226,102,15,46, + 220,15,134,244,247,102,15,85,208,252,242,15,88,227,252,242,15,92,227,102, + 15,86,226,184,0,0,252,240,63,102,15,110,208,102,15,112,210,81,252,242,15, + 194,196,1,102,15,84,194,252,242,15,92,224,15,40,197,252,242,15,89,204,252, + 242,15,92,193,195,248,1,252,242,15,89,200,15,40,197,252,242,15,92,193,195, + 255,217,193,216,252,241,217,124,36,4,102,184,0,4,102,11,68,36,4,102,37,252, + 255,252,247,102,137,68,36,6,217,108,36,6,217,252,252,217,108,36,4,222,201, + 222,252,233,195,255,248,88,217,252,234,222,201,248,149,217,84,36,4,129,124, + 36,4,0,0,128,127,15,132,244,247,129,124,36,4,0,0,128,252,255,15,132,244,248, + 248,150,217,192,217,252,252,220,252,233,217,201,217,252,240,217,232,222,193, + 217,252,253,221,217,248,1,195,248,2,221,216,217,252,238,195,255,248,107,219, + 84,36,4,219,68,36,4,255,223,252,233,255,221,252,233,223,224,158,255,15,133, + 244,254,15,138,244,255,221,216,139,68,36,4,131,252,248,1,15,142,244,252,248, + 1,169,1,0,0,0,15,133,244,248,216,200,209,232,252,233,244,1,248,2,209,232, + 15,132,244,251,217,192,248,3,216,200,209,232,15,132,244,250,15,131,244,3, + 220,201,252,233,244,3,248,4,255,222,201,248,5,195,248,6,15,132,244,5,15,130, + 244,253,217,232,222,252,241,252,247,216,131,252,248,1,15,132,244,5,252,233, + 244,1,248,7,221,216,217,232,195,248,8,217,84,36,4,217,201,217,84,36,8,139, + 68,36,4,209,224,61,0,0,0,252,255,15,132,244,248,139,68,36,8,209,224,15,132, + 244,250,61,0,0,0,252,255,15,132,244,250,217,252,241,252,233,244,150,248,9, + 255,217,232,255,223,252,234,255,221,252,234,223,224,158,255,15,132,244,247, + 217,201,248,1,221,216,195,248,2,217,225,217,232,255,15,132,244,249,221,216, + 217,225,217,252,238,184,0,0,0,0,15,146,208,209,200,51,68,36,4,15,137,244, + 249,217,201,248,3,221,217,217,225,195,248,4,131,124,36,4,0,15,141,244,3,221, + 216,221,216,133,192,15,132,244,251,217,252,238,195,248,5,199,68,36,4,0,0, + 128,127,217,68,36,4,195,255,248,107,255,248,151,252,242,15,45,193,252,242, + 15,42,208,102,15,46,202,15,133,244,254,15,138,244,255,248,152,131,252,248, + 1,15,142,244,252,248,1,169,1,0,0,0,15,133,244,248,252,242,15,89,192,209,232, + 252,233,244,1,248,2,209,232,15,132,244,251,15,40,200,248,3,252,242,15,89, + 192,209,232,15,132,244,250,15,131,244,3,255,252,242,15,89,200,252,233,244, + 3,248,4,252,242,15,89,193,248,5,195,248,6,15,132,244,5,15,130,244,253,80, + 184,0,0,252,240,63,102,15,110,200,102,15,112,201,81,252,242,15,94,200,88, + 15,40,193,252,247,216,131,252,248,1,15,132,244,5,252,233,244,1,248,7,184, + 0,0,252,240,63,102,15,110,192,102,15,112,192,81,195,248,8,252,242,15,17,76, + 36,12,252,242,15,17,68,36,4,131,124,36,12,0,15,133,244,247,139,68,36,16,209, + 224,61,0,0,224,252,255,15,132,244,248,248,1,255,131,124,36,4,0,15,133,244, + 247,139,68,36,8,209,224,15,132,244,250,61,0,0,224,252,255,15,132,244,251, + 248,1,221,68,36,12,221,68,36,4,217,252,241,217,192,217,252,252,220,252,233, + 217,201,217,252,240,217,232,222,193,217,252,253,221,217,221,92,36,4,252,242, + 15,16,68,36,4,195,248,9,184,0,0,252,240,63,102,15,110,208,102,15,112,210, + 81,102,15,46,194,15,132,244,247,15,40,193,248,1,195,248,2,102,15,252,239, + 210,102,15,118,210,102,15,115,210,1,102,15,84,194,184,0,0,252,240,63,102, + 15,110,208,102,15,112,210,81,102,15,46,194,15,132,244,1,102,15,80,193,15, + 87,192,136,196,15,146,208,48,224,15,133,244,1,248,3,184,0,0,252,240,127,102, + 15,110,192,102,15,112,192,81,195,248,4,102,15,80,193,133,192,15,133,244,3, + 255,15,87,192,195,248,5,102,15,80,193,133,192,15,132,244,3,15,87,192,195, + 248,153,255,139,68,36,12,252,242,15,16,68,36,4,131,252,248,1,15,132,244,247, + 15,135,244,248,232,244,82,252,233,244,253,248,1,232,244,84,252,233,244,253, + 248,2,131,252,248,3,15,132,244,247,15,135,244,248,232,244,104,255,252,233, + 244,253,248,1,252,242,15,81,192,248,7,252,242,15,17,68,36,4,221,68,36,4,195, + 248,2,221,68,36,4,131,252,248,5,15,130,244,88,15,132,244,149,248,2,131,252, + 248,7,15,132,244,247,15,135,244,248,217,252,237,217,201,217,252,241,195,248, + 1,217,232,217,201,217,252,241,195,248,2,131,252,248,9,15,132,244,247,15,135, + 244,248,255,217,252,236,217,201,217,252,241,195,248,1,217,252,254,195,248, 2,131,252,248,11,15,132,244,247,15,135,244,255,217,252,255,195,248,1,217, - 252,242,221,216,195,255,248,9,204,248,153,255,139,68,36,20,252,242,15,16, - 68,36,4,252,242,15,16,76,36,12,131,252,248,1,15,132,244,247,15,135,244,248, - 252,242,15,88,193,248,7,252,242,15,17,68,36,4,221,68,36,4,195,248,1,252,242, - 15,92,193,252,233,244,7,248,2,131,252,248,3,15,132,244,247,15,135,244,248, - 252,242,15,89,193,252,233,244,7,248,1,252,242,15,94,193,252,233,244,7,248, - 2,131,252,248,5,15,132,244,247,255,15,135,244,248,232,244,147,252,233,244, - 7,248,1,90,232,244,107,82,252,233,244,7,248,2,131,252,248,7,15,132,244,247, - 15,135,244,248,184,0,0,0,128,102,15,110,200,102,15,112,201,81,15,87,193,252, - 233,244,7,248,1,102,15,252,239,201,102,15,118,201,102,15,115,209,1,15,84, - 193,252,233,244,7,248,2,255,131,252,248,9,15,135,244,248,221,68,36,4,221, - 68,36,12,15,132,244,247,217,252,243,195,248,1,217,201,217,252,253,221,217, - 195,248,2,131,252,248,11,15,132,244,247,15,135,244,255,252,242,15,93,193, - 252,233,244,7,248,1,252,242,15,95,193,252,233,244,7,248,9,204,255,139,68, - 36,20,221,68,36,4,221,68,36,12,131,252,248,1,15,132,244,247,15,135,244,248, - 222,193,195,248,1,222,252,233,195,248,2,131,252,248,3,15,132,244,247,15,135, - 244,248,222,201,195,248,1,222,252,249,195,248,2,131,252,248,5,15,130,244, - 147,15,132,244,107,131,252,248,7,15,132,244,247,15,135,244,248,255,221,216, - 217,224,195,248,1,221,216,217,225,195,248,2,131,252,248,9,15,132,244,247, - 15,135,244,248,217,252,243,195,248,1,217,201,217,252,253,221,217,195,248, - 2,131,252,248,11,15,132,244,247,15,135,244,255,255,219,252,233,219,209,221, - 217,195,248,1,219,252,233,218,209,221,217,195,255,221,225,223,224,252,246, - 196,1,15,132,244,248,217,201,248,2,221,216,195,248,1,221,225,223,224,252, - 246,196,1,15,133,244,248,217,201,248,2,221,216,195,255,248,154,156,90,137, - 209,129,252,242,0,0,32,0,82,157,156,90,49,192,57,209,15,132,244,247,139,68, - 36,4,87,83,15,162,139,124,36,16,137,7,137,95,4,137,79,8,137,87,12,91,95,248, - 1,195,255,249,255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239, - 15,135,244,41,255,252,242,15,16,4,194,131,198,4,102,15,46,4,202,255,221,4, - 202,221,4,194,131,198,4,255,223,252,233,221,216,255,218,252,233,223,224,158, - 255,15,134,244,248,255,15,131,244,248,255,248,1,15,183,70,252,254,141,180, - 253,134,233,248,2,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255, - 36,171,255,139,108,194,4,131,198,4,129,252,253,239,15,135,244,251,129,124, - 253,202,4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4,202,255, - 221,4,202,221,4,194,255,15,138,244,248,15,133,244,248,255,15,138,244,248, - 15,132,244,247,255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,255, - 248,2,15,183,70,252,254,141,180,253,134,233,248,1,255,248,5,57,108,202,4, - 15,133,244,2,129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193,15, - 132,244,1,129,252,253,239,15,135,244,2,139,169,233,133,252,237,15,132,244, - 2,252,246,133,233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255,252, - 233,244,45,255,252,247,208,131,198,4,129,124,253,202,4,239,15,133,244,248, - 139,12,202,59,12,135,255,131,198,4,129,124,253,202,4,239,15,135,244,248,255, - 252,242,15,16,4,199,102,15,46,4,202,255,221,4,202,221,4,199,255,252,247,208, - 131,198,4,57,68,202,4,255,139,108,194,4,131,198,4,129,252,253,239,255,15, - 131,244,247,255,15,130,244,247,255,137,108,202,4,139,44,194,137,44,202,255, - 15,183,70,252,254,141,180,253,134,233,248,1,139,6,15,182,204,15,182,232,131, - 198,4,193,232,16,252,255,36,171,255,139,108,194,4,139,4,194,137,108,202,4, - 137,4,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171, - 255,49,252,237,129,124,253,194,4,239,129,213,239,137,108,202,4,139,6,15,182, - 204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,129,124,253,194,4, - 239,15,135,244,48,255,252,242,15,16,4,194,184,0,0,0,128,102,15,110,200,102, - 15,112,201,81,15,87,193,252,242,15,17,4,202,255,221,4,194,217,224,221,28, - 202,255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,15,87,192,252, - 242,15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,248,1,221,28, - 202,255,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248, - 2,129,124,253,194,4,239,15,133,244,50,139,12,194,137,213,232,251,1,18,255, - 252,242,15,42,192,137,252,234,255,137,4,36,137,252,234,219,4,36,255,15,182, - 78,252,253,252,233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252, - 234,4,239,15,135,244,46,255,252,242,15,16,4,252,234,252,242,15,88,4,199,255, - 221,4,252,234,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252, - 242,15,16,4,199,252,242,15,88,4,252,234,255,221,4,199,220,4,252,234,255,129, - 124,253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,244,49,255, - 252,242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,220,4,194,255, - 252,242,15,16,4,252,234,252,242,15,92,4,199,255,221,4,252,234,220,36,199, - 255,252,242,15,16,4,199,252,242,15,92,4,252,234,255,221,4,199,220,36,252, - 234,255,252,242,15,16,4,252,234,252,242,15,92,4,194,255,221,4,252,234,220, - 36,194,255,252,242,15,16,4,252,234,252,242,15,89,4,199,255,221,4,252,234, - 220,12,199,255,252,242,15,16,4,199,252,242,15,89,4,252,234,255,221,4,199, - 220,12,252,234,255,252,242,15,16,4,252,234,252,242,15,89,4,194,255,221,4, - 252,234,220,12,194,255,252,242,15,16,4,252,234,252,242,15,94,4,199,255,221, - 4,252,234,220,52,199,255,252,242,15,16,4,199,252,242,15,94,4,252,234,255, - 221,4,199,220,52,252,234,255,252,242,15,16,4,252,234,252,242,15,94,4,194, - 255,221,4,252,234,220,52,194,255,252,242,15,16,4,252,234,252,242,15,16,12, - 199,255,221,4,252,234,221,4,199,255,252,242,15,16,4,199,252,242,15,16,12, - 252,234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15, - 16,12,194,255,221,4,252,234,221,4,194,255,248,155,232,244,147,255,252,233, - 244,155,255,232,244,107,255,15,182,252,236,15,182,192,141,12,194,41,232,137, - 76,36,4,137,68,36,8,248,33,139,108,36,48,137,44,36,137,149,233,137,116,36, - 24,232,251,1,24,139,149,233,133,192,15,133,244,42,15,182,110,252,255,15,182, + 252,242,221,216,195,255,139,68,36,12,221,68,36,4,131,252,248,1,15,130,244, + 82,15,132,244,84,131,252,248,3,15,130,244,104,15,135,244,248,217,252,250, + 195,248,2,131,252,248,5,15,130,244,88,15,132,244,149,131,252,248,7,15,132, + 244,247,15,135,244,248,217,252,237,217,201,217,252,241,195,248,1,217,232, + 217,201,217,252,241,195,248,2,131,252,248,9,15,132,244,247,255,15,135,244, + 248,217,252,236,217,201,217,252,241,195,248,1,217,252,254,195,248,2,131,252, + 248,11,15,132,244,247,15,135,244,255,217,252,255,195,248,1,217,252,242,221, + 216,195,255,248,9,204,248,154,255,139,68,36,20,252,242,15,16,68,36,4,252, + 242,15,16,76,36,12,131,252,248,1,15,132,244,247,15,135,244,248,252,242,15, + 88,193,248,7,252,242,15,17,68,36,4,221,68,36,4,195,248,1,252,242,15,92,193, + 252,233,244,7,248,2,131,252,248,3,15,132,244,247,15,135,244,248,252,242,15, + 89,193,252,233,244,7,248,1,252,242,15,94,193,252,233,244,7,248,2,131,252, + 248,5,15,132,244,247,255,15,135,244,248,232,244,148,252,233,244,7,248,1,90, + 232,244,107,82,252,233,244,7,248,2,131,252,248,7,15,132,244,247,15,135,244, + 248,184,0,0,0,128,102,15,110,200,102,15,112,201,81,15,87,193,252,233,244, + 7,248,1,102,15,252,239,201,102,15,118,201,102,15,115,209,1,15,84,193,252, + 233,244,7,248,2,255,131,252,248,9,15,135,244,248,221,68,36,4,221,68,36,12, + 15,132,244,247,217,252,243,195,248,1,217,201,217,252,253,221,217,195,248, + 2,131,252,248,11,15,132,244,247,15,135,244,255,252,242,15,93,193,252,233, + 244,7,248,1,252,242,15,95,193,252,233,244,7,248,9,204,255,139,68,36,20,221, + 68,36,4,221,68,36,12,131,252,248,1,15,132,244,247,15,135,244,248,222,193, + 195,248,1,222,252,233,195,248,2,131,252,248,3,15,132,244,247,15,135,244,248, + 222,201,195,248,1,222,252,249,195,248,2,131,252,248,5,15,130,244,148,15,132, + 244,107,131,252,248,7,15,132,244,247,15,135,244,248,255,221,216,217,224,195, + 248,1,221,216,217,225,195,248,2,131,252,248,9,15,132,244,247,15,135,244,248, + 217,252,243,195,248,1,217,201,217,252,253,221,217,195,248,2,131,252,248,11, + 15,132,244,247,15,135,244,255,255,219,252,233,219,209,221,217,195,248,1,219, + 252,233,218,209,221,217,195,255,221,225,223,224,252,246,196,1,15,132,244, + 248,217,201,248,2,221,216,195,248,1,221,225,223,224,252,246,196,1,15,133, + 244,248,217,201,248,2,221,216,195,255,248,155,156,90,137,209,129,252,242, + 0,0,32,0,82,157,156,90,49,192,57,209,15,132,244,247,139,68,36,4,87,83,15, + 162,139,124,36,16,137,7,137,95,4,137,79,8,137,87,12,91,95,248,1,195,255,249, + 255,129,124,253,202,4,239,15,135,244,41,129,124,253,194,4,239,15,135,244, + 41,255,252,242,15,16,4,194,131,198,4,102,15,46,4,202,255,221,4,202,221,4, + 194,131,198,4,255,223,252,233,221,216,255,218,252,233,223,224,158,255,15, + 134,244,248,255,15,131,244,248,255,248,1,15,183,70,252,254,141,180,253,134, + 233,248,2,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171, + 255,139,108,194,4,131,198,4,129,252,253,239,15,135,244,251,129,124,253,202, + 4,239,15,135,244,251,255,252,242,15,16,4,194,102,15,46,4,202,255,221,4,202, + 221,4,194,255,15,138,244,248,15,133,244,248,255,15,138,244,248,15,132,244, + 247,255,248,1,15,183,70,252,254,141,180,253,134,233,248,2,255,248,2,15,183, + 70,252,254,141,180,253,134,233,248,1,255,248,5,57,108,202,4,15,133,244,2, + 129,252,253,239,15,131,244,1,139,12,202,139,4,194,57,193,15,132,244,1,129, + 252,253,239,15,135,244,2,139,169,233,133,252,237,15,132,244,2,252,246,133, + 233,235,15,133,244,2,255,49,252,237,255,189,1,0,0,0,255,252,233,244,45,255, + 252,247,208,131,198,4,129,124,253,202,4,239,15,133,244,248,139,12,202,59, + 12,135,255,131,198,4,129,124,253,202,4,239,15,135,244,248,255,252,242,15, + 16,4,199,102,15,46,4,202,255,221,4,202,221,4,199,255,252,247,208,131,198, + 4,57,68,202,4,255,139,108,194,4,131,198,4,129,252,253,239,255,15,131,244, + 247,255,15,130,244,247,255,137,108,202,4,139,44,194,137,44,202,255,15,183, + 70,252,254,141,180,253,134,233,248,1,139,6,15,182,204,15,182,232,131,198, + 4,193,232,16,252,255,36,171,255,139,108,194,4,139,4,194,137,108,202,4,137, + 4,202,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255, + 49,252,237,129,124,253,194,4,239,129,213,239,137,108,202,4,139,6,15,182,204, + 15,182,232,131,198,4,193,232,16,252,255,36,171,255,129,124,253,194,4,239, + 15,135,244,48,255,252,242,15,16,4,194,184,0,0,0,128,102,15,110,200,102,15, + 112,201,81,15,87,193,252,242,15,17,4,202,255,221,4,194,217,224,221,28,202, + 255,129,124,253,194,4,239,15,133,244,248,139,4,194,255,15,87,192,252,242, + 15,42,128,233,248,1,252,242,15,17,4,202,255,219,128,233,248,1,221,28,202, + 255,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,2, + 129,124,253,194,4,239,15,133,244,50,139,12,194,137,213,232,251,1,18,255,252, + 242,15,42,192,137,252,234,255,137,4,36,137,252,234,219,4,36,255,15,182,78, + 252,253,252,233,244,1,255,15,182,252,236,15,182,192,255,129,124,253,252,234, + 4,239,15,135,244,46,255,252,242,15,16,4,252,234,252,242,15,88,4,199,255,221, + 4,252,234,220,4,199,255,129,124,253,252,234,4,239,15,135,244,47,255,252,242, + 15,16,4,199,252,242,15,88,4,252,234,255,221,4,199,220,4,252,234,255,129,124, + 253,252,234,4,239,15,135,244,49,129,124,253,194,4,239,15,135,244,49,255,252, + 242,15,16,4,252,234,252,242,15,88,4,194,255,221,4,252,234,220,4,194,255,252, + 242,15,16,4,252,234,252,242,15,92,4,199,255,221,4,252,234,220,36,199,255, + 252,242,15,16,4,199,252,242,15,92,4,252,234,255,221,4,199,220,36,252,234, + 255,252,242,15,16,4,252,234,252,242,15,92,4,194,255,221,4,252,234,220,36, + 194,255,252,242,15,16,4,252,234,252,242,15,89,4,199,255,221,4,252,234,220, + 12,199,255,252,242,15,16,4,199,252,242,15,89,4,252,234,255,221,4,199,220, + 12,252,234,255,252,242,15,16,4,252,234,252,242,15,89,4,194,255,221,4,252, + 234,220,12,194,255,252,242,15,16,4,252,234,252,242,15,94,4,199,255,221,4, + 252,234,220,52,199,255,252,242,15,16,4,199,252,242,15,94,4,252,234,255,221, + 4,199,220,52,252,234,255,252,242,15,16,4,252,234,252,242,15,94,4,194,255, + 221,4,252,234,220,52,194,255,252,242,15,16,4,252,234,252,242,15,16,12,199, + 255,221,4,252,234,221,4,199,255,252,242,15,16,4,199,252,242,15,16,12,252, + 234,255,221,4,199,221,4,252,234,255,252,242,15,16,4,252,234,252,242,15,16, + 12,194,255,221,4,252,234,221,4,194,255,248,156,232,244,148,255,252,233,244, + 156,255,232,244,107,255,15,182,252,236,15,182,192,141,12,194,41,232,137,76, + 36,4,137,68,36,8,248,33,139,108,36,48,137,44,36,137,149,233,137,116,36,24, + 232,251,1,24,139,149,233,133,192,15,133,244,42,15,182,110,252,255,15,182, 78,252,253,139,68,252,234,4,139,44,252,234,137,68,202,4,137,44,202,139,6, 15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,255,252,247,208, 139,4,135,199,68,202,4,237,137,4,202,139,6,15,182,204,15,182,232,131,198, @@ -620,8 +621,8 @@ static const unsigned char build_actionlist[15151] = { 252,233,232,251,1,30,139,149,233,15,182,78,252,253,137,4,202,199,68,202,4, 237,139,6,15,182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,3, 137,252,233,232,251,1,29,15,183,70,252,254,252,247,208,252,233,244,2,255, - 252,247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,156,255,252, - 247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,157,255,15,182, + 252,247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,157,255,252, + 247,208,139,106,252,248,139,173,233,139,4,135,252,233,244,158,255,15,182, 252,236,15,182,192,129,124,253,252,234,4,239,15,133,244,36,139,44,252,234, 129,124,253,194,4,239,15,135,244,251,255,252,242,15,16,4,194,252,242,15,45, 192,252,242,15,42,200,102,15,46,193,255,221,4,194,219,20,36,219,4,36,255, @@ -630,8 +631,8 @@ static const unsigned char build_actionlist[15151] = { 182,204,15,182,232,131,198,4,193,232,16,252,255,36,171,248,2,131,189,233, 0,15,132,244,1,139,141,233,252,246,129,233,235,15,132,244,36,15,182,78,252, 253,252,233,244,1,248,5,255,129,124,253,194,4,239,15,133,244,36,139,4,194, - 252,233,244,156,255,15,182,252,236,15,182,192,252,247,208,139,4,135,129,124, - 253,252,234,4,239,15,133,244,34,139,44,252,234,248,156,139,141,233,35,136, + 252,233,244,157,255,15,182,252,236,15,182,192,252,247,208,139,4,135,129,124, + 253,252,234,4,239,15,133,244,34,139,44,252,234,248,157,139,141,233,35,136, 233,105,201,239,3,141,233,248,1,129,185,233,239,15,133,244,250,57,129,233, 15,133,244,250,129,121,253,4,239,15,132,244,251,15,182,70,252,253,139,41, 139,73,4,137,44,194,248,2,255,137,76,194,4,139,6,15,182,204,15,182,232,131, @@ -649,10 +650,10 @@ static const unsigned char build_actionlist[15151] = { 2,139,108,202,4,139,12,202,137,104,4,137,8,139,6,15,182,204,15,182,232,131, 198,4,193,232,16,252,255,36,171,248,3,131,189,233,0,15,132,244,1,139,141, 233,255,252,246,129,233,235,15,132,244,39,15,182,78,252,253,252,233,244,1, - 248,5,129,124,253,194,4,239,15,133,244,39,139,4,194,252,233,244,157,248,7, + 248,5,129,124,253,194,4,239,15,133,244,39,139,4,194,252,233,244,158,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,15,182,252,236,15,182,192,252,247,208,139,4,135,129,124,253, - 252,234,4,239,15,133,244,37,139,44,252,234,248,157,139,141,233,35,136,233, + 252,234,4,239,15,133,244,37,139,44,252,234,248,158,139,141,233,35,136,233, 105,201,239,198,133,233,0,3,141,233,248,1,129,185,233,239,15,133,244,251, 57,129,233,15,133,244,251,129,121,253,4,239,15,132,244,250,248,2,255,252, 246,133,233,235,15,133,244,253,248,3,15,182,70,252,253,139,108,194,4,139, @@ -716,7 +717,7 @@ static const unsigned char build_actionlist[15151] = { 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,139,255,141,12,202,255,129,121,253,4,239,15,135,244,53,129,121, + 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, @@ -874,7 +875,8 @@ enum { GLOB_ff_bit_rol, GLOB_ff_bit_ror, GLOB_vm_record, - GLOB_vm_hook, + GLOB_vm_rethook, + GLOB_vm_inshook, GLOB_cont_hook, GLOB_vm_hotloop, GLOB_vm_callhook, @@ -1025,7 +1027,8 @@ static const char *const globnames[] = { "ff_bit_rol", "ff_bit_ror", "vm_record", - "vm_hook", + "vm_rethook", + "vm_inshook", "cont_hook", "vm_hotloop", "vm_callhook", @@ -1431,106 +1434,106 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse) #if LJ_HASJIT dasm_put(Dst, 7963, DISPATCH_GL(hookmask), HOOK_VMEVENT, HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount)); #endif - dasm_put(Dst, 7994, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE, Dt1(->base), Dt1(->base)); - dasm_put(Dst, 8060, GG_DISP2STATIC); + dasm_put(Dst, 7994, DISPATCH_GL(hookmask), HOOK_ACTIVE, DISPATCH_GL(hookmask), HOOK_ACTIVE, LUA_MASKLINE|LUA_MASKCOUNT, DISPATCH_GL(hookcount), LUA_MASKLINE); + dasm_put(Dst, 8045, Dt1(->base), Dt1(->base), GG_DISP2STATIC); #if LJ_HASJIT - dasm_put(Dst, 8095, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); + dasm_put(Dst, 8111, Dt7(->pc), PC2PROTO(framesize), Dt1(->base), Dt1(->top), GG_DISP2J, DISPATCH_J(L)); #endif - dasm_put(Dst, 8141); + dasm_put(Dst, 8157); #if LJ_HASJIT - dasm_put(Dst, 8144, DISPATCH_J(L)); + dasm_put(Dst, 8160, DISPATCH_J(L)); #endif - dasm_put(Dst, 8156); + dasm_put(Dst, 8172); #if LJ_HASJIT - dasm_put(Dst, 8159, DISPATCH_J(L)); + dasm_put(Dst, 8175, DISPATCH_J(L)); #endif - dasm_put(Dst, 8165, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 8181, Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); #if LJ_HASJIT - dasm_put(Dst, 8231, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_J(flags), JIT_F_SSE2, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), Dt1(->base), GG_DISP2J, Dt1(->base)); + dasm_put(Dst, 8247, DISPATCH_GL(vmstate), DISPATCH_GL(vmstate), ~LJ_VMST_EXIT, DISPATCH_J(exitno), DISPATCH_J(parent), 8*8+16, DISPATCH_J(flags), JIT_F_SSE2, DISPATCH_GL(jit_L), DISPATCH_GL(jit_base), DISPATCH_J(L), Dt1(->base), GG_DISP2J, Dt1(->base)); #endif - dasm_put(Dst, 8374); + dasm_put(Dst, 8390); #if LJ_HASJIT - dasm_put(Dst, 8377, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); + dasm_put(Dst, 8393, Dt7(->pc), PC2PROTO(k), DISPATCH_GL(jit_L), DISPATCH_GL(vmstate), ~LJ_VMST_INTERP); #endif - dasm_put(Dst, 8417); + dasm_put(Dst, 8433); if (!sse) { - dasm_put(Dst, 8420); + dasm_put(Dst, 8436); } - dasm_put(Dst, 8465); + dasm_put(Dst, 8481); if (!sse) { - dasm_put(Dst, 8567); + dasm_put(Dst, 8583); } - dasm_put(Dst, 8612); + dasm_put(Dst, 8628); if (!sse) { - dasm_put(Dst, 8714); + dasm_put(Dst, 8730); } - dasm_put(Dst, 8753); + dasm_put(Dst, 8769); if (sse) { - dasm_put(Dst, 8858); + dasm_put(Dst, 8874); } else { - dasm_put(Dst, 8988); + dasm_put(Dst, 9004); } - dasm_put(Dst, 9035); + dasm_put(Dst, 9051); if (!sse) { - dasm_put(Dst, 9109); + dasm_put(Dst, 9125); if (cmov) { - dasm_put(Dst, 9120); + dasm_put(Dst, 9136); } else { - dasm_put(Dst, 9124); + dasm_put(Dst, 9140); } - dasm_put(Dst, 9131); - dasm_put(Dst, 9205); - dasm_put(Dst, 9305); + dasm_put(Dst, 9147); + dasm_put(Dst, 9221); + dasm_put(Dst, 9321); if (cmov) { - dasm_put(Dst, 9308); + dasm_put(Dst, 9324); } else { - dasm_put(Dst, 9312); + dasm_put(Dst, 9328); } - dasm_put(Dst, 9319); + dasm_put(Dst, 9335); if (cmov) { - dasm_put(Dst, 9120); + dasm_put(Dst, 9136); } else { - dasm_put(Dst, 9124); + dasm_put(Dst, 9140); } - dasm_put(Dst, 9337); + dasm_put(Dst, 9353); } else { - dasm_put(Dst, 9416); + dasm_put(Dst, 9432); } - dasm_put(Dst, 9419); - dasm_put(Dst, 9504); - dasm_put(Dst, 9635); - dasm_put(Dst, 9834); + dasm_put(Dst, 9435); + dasm_put(Dst, 9520); + dasm_put(Dst, 9651); + dasm_put(Dst, 9850); if (sse) { - dasm_put(Dst, 9857); - dasm_put(Dst, 9914); - dasm_put(Dst, 10005); + dasm_put(Dst, 9873); + dasm_put(Dst, 9930); + dasm_put(Dst, 10021); } else { - dasm_put(Dst, 10047); - dasm_put(Dst, 10139); + dasm_put(Dst, 10063); + dasm_put(Dst, 10155); } - dasm_put(Dst, 10185); + dasm_put(Dst, 10201); if (sse) { - dasm_put(Dst, 10191); - dasm_put(Dst, 10296); - dasm_put(Dst, 10379); + dasm_put(Dst, 10207); + dasm_put(Dst, 10312); + dasm_put(Dst, 10395); } else { - dasm_put(Dst, 10451); - dasm_put(Dst, 10534); + dasm_put(Dst, 10467); + dasm_put(Dst, 10550); if (cmov) { - dasm_put(Dst, 10589); + dasm_put(Dst, 10605); } else { - dasm_put(Dst, 10608); + dasm_put(Dst, 10624); } - dasm_put(Dst, 10447); + dasm_put(Dst, 10463); } - dasm_put(Dst, 10649); + dasm_put(Dst, 10665); } /* Generate the code for a single instruction. */ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) { int vk = 0; - dasm_put(Dst, 10703, defop); + dasm_put(Dst, 10719, defop); switch (op) { @@ -1539,617 +1542,617 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) /* Remember: all ops branch for a true comparison, fall through otherwise. */ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: - dasm_put(Dst, 10705, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 10721, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10726); + dasm_put(Dst, 10742); } else { - dasm_put(Dst, 10741); + dasm_put(Dst, 10757); if (cmov) { - dasm_put(Dst, 10751); + dasm_put(Dst, 10767); } else { - dasm_put(Dst, 10757); + dasm_put(Dst, 10773); } } switch (op) { case BC_ISLT: - dasm_put(Dst, 10764); + dasm_put(Dst, 10780); break; case BC_ISGE: - dasm_put(Dst, 10000); + dasm_put(Dst, 10016); break; case BC_ISLE: dasm_put(Dst, 6179); break; case BC_ISGT: - dasm_put(Dst, 10769); + dasm_put(Dst, 10785); break; default: break; /* Shut up GCC. */ } - dasm_put(Dst, 10774, -BCBIAS_J*4); + dasm_put(Dst, 10790, -BCBIAS_J*4); break; case BC_ISEQV: case BC_ISNEV: vk = op == BC_ISEQV; - dasm_put(Dst, 10807, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 10823, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 10833); + dasm_put(Dst, 10849); } else { - dasm_put(Dst, 10845); + dasm_put(Dst, 10861); if (cmov) { - dasm_put(Dst, 10751); + dasm_put(Dst, 10767); } else { - dasm_put(Dst, 10757); + dasm_put(Dst, 10773); } } iseqne_fp: if (vk) { - dasm_put(Dst, 10852); + dasm_put(Dst, 10868); } else { - dasm_put(Dst, 10861); + dasm_put(Dst, 10877); } iseqne_end: if (vk) { - dasm_put(Dst, 10870, -BCBIAS_J*4); + dasm_put(Dst, 10886, -BCBIAS_J*4); } else { - dasm_put(Dst, 10885, -BCBIAS_J*4); + dasm_put(Dst, 10901, -BCBIAS_J*4); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); if (op == BC_ISEQV || op == BC_ISNEV) { - dasm_put(Dst, 10900, LJ_TISPRI, LJ_TISTABUD, Dt6(->metatable), Dt6(->nomm), 1<metatable), Dt6(->nomm), 1<len)); + dasm_put(Dst, 11252, Dt5(->len)); } else { - dasm_put(Dst, 11254, Dt5(->len)); + dasm_put(Dst, 11270, Dt5(->len)); } - dasm_put(Dst, 11263, LJ_TTAB); + dasm_put(Dst, 11279, LJ_TTAB); if (sse) { - dasm_put(Dst, 11303); + dasm_put(Dst, 11319); } else { - dasm_put(Dst, 11312); + dasm_put(Dst, 11328); } - dasm_put(Dst, 11322); + dasm_put(Dst, 11338); break; /* -- Binary ops -------------------------------------------------------- */ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11352); + dasm_put(Dst, 11368); } else { - dasm_put(Dst, 11366); + dasm_put(Dst, 11382); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11386); + dasm_put(Dst, 11402); } else { - dasm_put(Dst, 11400); + dasm_put(Dst, 11416); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11430); + dasm_put(Dst, 11446); } else { - dasm_put(Dst, 11444); + dasm_put(Dst, 11460); } break; } if (sse) { - dasm_put(Dst, 11206); + dasm_put(Dst, 11222); } else { - dasm_put(Dst, 11218); + dasm_put(Dst, 11234); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11452); + dasm_put(Dst, 11468); } else { - dasm_put(Dst, 11466); + dasm_put(Dst, 11482); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11474); + dasm_put(Dst, 11490); } else { - dasm_put(Dst, 11488); + dasm_put(Dst, 11504); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11496); + dasm_put(Dst, 11512); } else { - dasm_put(Dst, 11510); + dasm_put(Dst, 11526); } break; } if (sse) { - dasm_put(Dst, 11206); + dasm_put(Dst, 11222); } else { - dasm_put(Dst, 11218); + dasm_put(Dst, 11234); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_MULVN: case BC_MULNV: case BC_MULVV: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11518); + dasm_put(Dst, 11534); } else { - dasm_put(Dst, 11532); + dasm_put(Dst, 11548); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11540); + dasm_put(Dst, 11556); } else { - dasm_put(Dst, 11554); + dasm_put(Dst, 11570); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11562); + dasm_put(Dst, 11578); } else { - dasm_put(Dst, 11576); + dasm_put(Dst, 11592); } break; } if (sse) { - dasm_put(Dst, 11206); + dasm_put(Dst, 11222); } else { - dasm_put(Dst, 11218); + dasm_put(Dst, 11234); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11584); + dasm_put(Dst, 11600); } else { - dasm_put(Dst, 11598); + dasm_put(Dst, 11614); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11606); + dasm_put(Dst, 11622); } else { - dasm_put(Dst, 11620); + dasm_put(Dst, 11636); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11628); + dasm_put(Dst, 11644); } else { - dasm_put(Dst, 11642); + dasm_put(Dst, 11658); } break; } if (sse) { - dasm_put(Dst, 11206); + dasm_put(Dst, 11222); } else { - dasm_put(Dst, 11218); + dasm_put(Dst, 11234); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_MODVN: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11650); + dasm_put(Dst, 11666); } else { - dasm_put(Dst, 11664); + dasm_put(Dst, 11680); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11672); + dasm_put(Dst, 11688); } else { - dasm_put(Dst, 11686); + dasm_put(Dst, 11702); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11694); + dasm_put(Dst, 11710); } else { - dasm_put(Dst, 11708); + dasm_put(Dst, 11724); } break; } - dasm_put(Dst, 11716); + dasm_put(Dst, 11732); if (sse) { - dasm_put(Dst, 11206); + dasm_put(Dst, 11222); } else { - dasm_put(Dst, 11218); + dasm_put(Dst, 11234); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_MODNV: case BC_MODVV: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11650); + dasm_put(Dst, 11666); } else { - dasm_put(Dst, 11664); + dasm_put(Dst, 11680); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11672); + dasm_put(Dst, 11688); } else { - dasm_put(Dst, 11686); + dasm_put(Dst, 11702); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11694); + dasm_put(Dst, 11710); } else { - dasm_put(Dst, 11708); + dasm_put(Dst, 11724); } break; } - dasm_put(Dst, 11722); + dasm_put(Dst, 11738); break; case BC_POW: - dasm_put(Dst, 11332); + dasm_put(Dst, 11348); vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); switch (vk) { case 0: - dasm_put(Dst, 11340, LJ_TISNUM); + dasm_put(Dst, 11356, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11650); + dasm_put(Dst, 11666); } else { - dasm_put(Dst, 11664); + dasm_put(Dst, 11680); } break; case 1: - dasm_put(Dst, 11374, LJ_TISNUM); + dasm_put(Dst, 11390, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11672); + dasm_put(Dst, 11688); } else { - dasm_put(Dst, 11686); + dasm_put(Dst, 11702); } break; default: - dasm_put(Dst, 11408, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 11424, LJ_TISNUM, LJ_TISNUM); if (sse) { - dasm_put(Dst, 11694); + dasm_put(Dst, 11710); } else { - dasm_put(Dst, 11708); + dasm_put(Dst, 11724); } break; } - dasm_put(Dst, 11727); + dasm_put(Dst, 11743); if (sse) { - dasm_put(Dst, 11206); + dasm_put(Dst, 11222); } else { - dasm_put(Dst, 11218); + dasm_put(Dst, 11234); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_CAT: - dasm_put(Dst, 11731, Dt1(->base), Dt1(->base)); + dasm_put(Dst, 11747, Dt1(->base), Dt1(->base)); break; /* -- Constant ops ------------------------------------------------------ */ case BC_KSTR: - dasm_put(Dst, 11825, LJ_TSTR); + dasm_put(Dst, 11841, LJ_TSTR); break; case BC_KSHORT: if (sse) { - dasm_put(Dst, 11858); + dasm_put(Dst, 11874); } else { - dasm_put(Dst, 11873); + dasm_put(Dst, 11889); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_KNUM: if (sse) { - dasm_put(Dst, 11881); + dasm_put(Dst, 11897); } else { - dasm_put(Dst, 11894); + dasm_put(Dst, 11910); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_KPRI: - dasm_put(Dst, 11901); + dasm_put(Dst, 11917); break; case BC_KNIL: - dasm_put(Dst, 11927, LJ_TNIL); + dasm_put(Dst, 11943, LJ_TNIL); break; /* -- Upvalue and function ops ------------------------------------------ */ case BC_UGET: - dasm_put(Dst, 11973, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 11989, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_USETV: #define TV2MARKOFS \ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv)) - dasm_put(Dst, 12017, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); - dasm_put(Dst, 12107); + dasm_put(Dst, 12033, offsetof(GCfuncL, uvptr), DtA(->closed), DtA(->v), TV2MARKOFS, LJ_GC_BLACK, LJ_TISGCV, LJ_TISNUM - LJ_TISGCV, Dt4(->gch.marked), LJ_GC_WHITES, GG_DISP2G); + dasm_put(Dst, 12123); break; #undef TV2MARKOFS case BC_USETS: - dasm_put(Dst, 12119, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); + dasm_put(Dst, 12135, offsetof(GCfuncL, uvptr), DtA(->v), LJ_TSTR, DtA(->marked), LJ_GC_BLACK, Dt4(->gch.marked), LJ_GC_WHITES, DtA(->closed), GG_DISP2G); break; case BC_USETN: - dasm_put(Dst, 12210); + dasm_put(Dst, 12226); if (sse) { - dasm_put(Dst, 12215); + dasm_put(Dst, 12231); } else { - dasm_put(Dst, 11025); + dasm_put(Dst, 11041); } - dasm_put(Dst, 12222, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 12238, offsetof(GCfuncL, uvptr), DtA(->v)); if (sse) { - dasm_put(Dst, 12231); + dasm_put(Dst, 12247); } else { - dasm_put(Dst, 12237); + dasm_put(Dst, 12253); } - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_USETP: - dasm_put(Dst, 12240, offsetof(GCfuncL, uvptr), DtA(->v)); + dasm_put(Dst, 12256, offsetof(GCfuncL, uvptr), DtA(->v)); break; case BC_UCLO: - dasm_put(Dst, 12277, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); + dasm_put(Dst, 12293, -BCBIAS_J*4, Dt1(->openupval), Dt1(->base), Dt1(->base)); break; case BC_FNEW: - dasm_put(Dst, 12331, Dt1(->base), Dt1(->base), LJ_TFUNC); + dasm_put(Dst, 12347, Dt1(->base), Dt1(->base), LJ_TFUNC); break; /* -- Table ops --------------------------------------------------------- */ case BC_TNEW: - dasm_put(Dst, 12402, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 12418, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_TDUP: - dasm_put(Dst, 12523, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); + dasm_put(Dst, 12539, DISPATCH_GL(gc.total), DISPATCH_GL(gc.threshold), Dt1(->base), Dt1(->base), LJ_TTAB); break; case BC_GGET: - dasm_put(Dst, 12615, Dt7(->env)); + dasm_put(Dst, 12631, Dt7(->env)); break; case BC_GSET: - dasm_put(Dst, 12633, Dt7(->env)); + dasm_put(Dst, 12649, Dt7(->env)); break; case BC_TGETV: - dasm_put(Dst, 12651, LJ_TTAB, LJ_TISNUM); + dasm_put(Dst, 12667, LJ_TTAB, LJ_TISNUM); if (sse) { - dasm_put(Dst, 12684); + dasm_put(Dst, 12700); } else { - dasm_put(Dst, 12705); + dasm_put(Dst, 12721); if (cmov) { - dasm_put(Dst, 10751); + dasm_put(Dst, 10767); } else { - dasm_put(Dst, 10757); + dasm_put(Dst, 10773); } dasm_put(Dst, 2522); } - dasm_put(Dst, 12715, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 12909, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<hmask), Dt5(->hash), sizeof(Node), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 12925, LJ_TNIL, DtB(->next), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); - dasm_put(Dst, 13195, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 13128, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable)); + dasm_put(Dst, 13211, Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETS: - dasm_put(Dst, 13257, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); - dasm_put(Dst, 13332, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); - dasm_put(Dst, 13424, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 13273, LJ_TTAB, Dt6(->hmask), Dt5(->hash), sizeof(Node), Dt6(->nomm), Dt6(->node), DtB(->key.it), LJ_TSTR, DtB(->key.gcr), LJ_TNIL); + dasm_put(Dst, 13348, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable), Dt6(->metatable), Dt6(->nomm), 1<next)); + dasm_put(Dst, 13440, Dt6(->metatable), Dt6(->nomm), 1<base), Dt1(->base), Dt6(->marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETB: - dasm_put(Dst, 13520, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); - dasm_put(Dst, 13618, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); + dasm_put(Dst, 13536, LJ_TTAB, Dt6(->asize), Dt6(->array), LJ_TNIL, Dt6(->marked), LJ_GC_BLACK, Dt6(->metatable)); + dasm_put(Dst, 13634, Dt6(->metatable), Dt6(->nomm), 1<marked), cast_byte(~LJ_GC_BLACK), DISPATCH_GL(gc.grayagain), DISPATCH_GL(gc.grayagain), Dt6(->gclist)); break; case BC_TSETM: - dasm_put(Dst, 13664); + dasm_put(Dst, 13680); if (sse) { - dasm_put(Dst, 12215); + dasm_put(Dst, 12231); } else { - dasm_put(Dst, 13669); + dasm_put(Dst, 13685); } - dasm_put(Dst, 13677, Dt6(->marked), LJ_GC_BLACK); + dasm_put(Dst, 13693, Dt6(->marked), LJ_GC_BLACK); if (sse) { - dasm_put(Dst, 13702); + dasm_put(Dst, 13718); } else { - dasm_put(Dst, 13709); + dasm_put(Dst, 13725); } - dasm_put(Dst, 13714, 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, 13842, Dt6(->gclist)); + dasm_put(Dst, 13730, 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, 13858, Dt6(->gclist)); break; /* -- Calls and vararg handling ----------------------------------------- */ case BC_CALL: case BC_CALLM: - dasm_put(Dst, 11336); + dasm_put(Dst, 11352); if (op == BC_CALLM) { - dasm_put(Dst, 13850); + dasm_put(Dst, 13866); } - dasm_put(Dst, 13855, LJ_TFUNC, Dt7(->pc)); + dasm_put(Dst, 13871, LJ_TFUNC, Dt7(->pc)); break; case BC_CALLMT: - dasm_put(Dst, 13850); + dasm_put(Dst, 13866); break; case BC_CALLT: - dasm_put(Dst, 13896, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); - dasm_put(Dst, 14014, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 13912, LJ_TFUNC, FRAME_TYPE, Dt7(->ffid), Dt7(->pc)); + dasm_put(Dst, 14030, FRAME_TYPE, Dt7(->pc), PC2PROTO(k)); break; case BC_ITERC: - dasm_put(Dst, 14071, LJ_TFUNC, 2+1, Dt7(->pc)); + dasm_put(Dst, 14087, LJ_TFUNC, 2+1, Dt7(->pc)); break; case BC_VARG: - dasm_put(Dst, 14151, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); - dasm_put(Dst, 14295, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); + dasm_put(Dst, 14167, Dt7(->pc), PC2PROTO(numparams), (8+FRAME_VARG), LJ_TNIL); + dasm_put(Dst, 14311, Dt1(->maxstack), Dt1(->base), Dt1(->top), Dt1(->base), Dt1(->top)); break; /* -- Returns ----------------------------------------------------------- */ case BC_RETM: - dasm_put(Dst, 13850); + dasm_put(Dst, 13866); break; case BC_RET: case BC_RET0: case BC_RET1: if (op != BC_RET0) { - dasm_put(Dst, 14394); + dasm_put(Dst, 14410); } - dasm_put(Dst, 14398, FRAME_TYPE); + dasm_put(Dst, 14414, FRAME_TYPE); switch (op) { case BC_RET: - dasm_put(Dst, 14417); + dasm_put(Dst, 14433); break; case BC_RET1: - dasm_put(Dst, 14475); + dasm_put(Dst, 14491); /* fallthrough */ case BC_RET0: - dasm_put(Dst, 14491); + dasm_put(Dst, 14507); default: break; } - dasm_put(Dst, 14502, Dt7(->pc), PC2PROTO(k)); + dasm_put(Dst, 14518, Dt7(->pc), PC2PROTO(k)); if (op == BC_RET) { - dasm_put(Dst, 14544, LJ_TNIL); + dasm_put(Dst, 14560, LJ_TNIL); } else { - dasm_put(Dst, 14553, LJ_TNIL); + dasm_put(Dst, 14569, LJ_TNIL); } - dasm_put(Dst, 14560); + dasm_put(Dst, 14576); if (op != BC_RET0) { - dasm_put(Dst, 14581); + dasm_put(Dst, 14597); } dasm_put(Dst, 4678); break; @@ -2159,7 +2162,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) case BC_FORL: #if LJ_HASJIT - dasm_put(Dst, 14585, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 14601, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2171,57 +2174,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, 14606); + dasm_put(Dst, 14622); if (!vk) { - dasm_put(Dst, 14610, LJ_TISNUM, LJ_TISNUM); + dasm_put(Dst, 14626, LJ_TISNUM, LJ_TISNUM); } - dasm_put(Dst, 14629); + dasm_put(Dst, 14645); if (!vk) { - dasm_put(Dst, 14633, LJ_TISNUM); + dasm_put(Dst, 14649, LJ_TISNUM); } if (sse) { - dasm_put(Dst, 14642); + dasm_put(Dst, 14658); if (vk) { - dasm_put(Dst, 14654); + dasm_put(Dst, 14670); } else { - dasm_put(Dst, 14673); + dasm_put(Dst, 14689); } - dasm_put(Dst, 14678); + dasm_put(Dst, 14694); } else { - dasm_put(Dst, 14691); + dasm_put(Dst, 14707); if (vk) { - dasm_put(Dst, 14697); - } else { dasm_put(Dst, 14713); + } else { + dasm_put(Dst, 14729); } - dasm_put(Dst, 14721); + dasm_put(Dst, 14737); if (cmov) { - dasm_put(Dst, 10751); + dasm_put(Dst, 10767); } else { - dasm_put(Dst, 10757); + dasm_put(Dst, 10773); } if (!cmov) { - dasm_put(Dst, 14726); + dasm_put(Dst, 14742); } } if (op == BC_FORI) { - dasm_put(Dst, 14732, -BCBIAS_J*4); + dasm_put(Dst, 14748, -BCBIAS_J*4); } else if (op == BC_JFORI) { - dasm_put(Dst, 14742, -BCBIAS_J*4, BC_JLOOP); + dasm_put(Dst, 14758, -BCBIAS_J*4, BC_JLOOP); } else if (op == BC_IFORL) { - dasm_put(Dst, 14756, -BCBIAS_J*4); + dasm_put(Dst, 14772, -BCBIAS_J*4); } else { - dasm_put(Dst, 14752, BC_JLOOP); + dasm_put(Dst, 14768, BC_JLOOP); } - dasm_put(Dst, 10786); + dasm_put(Dst, 10802); if (sse) { - dasm_put(Dst, 14766); + dasm_put(Dst, 14782); } break; case BC_ITERL: #if LJ_HASJIT - dasm_put(Dst, 14585, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 14601, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; @@ -2230,33 +2233,33 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IITERL: - dasm_put(Dst, 14777, LJ_TNIL); + dasm_put(Dst, 14793, LJ_TNIL); if (op == BC_JITERL) { - dasm_put(Dst, 14792, BC_JLOOP); + dasm_put(Dst, 14808, BC_JLOOP); } else { - dasm_put(Dst, 14806, -BCBIAS_J*4); + dasm_put(Dst, 14822, -BCBIAS_J*4); } - dasm_put(Dst, 11083); + dasm_put(Dst, 11099); break; case BC_LOOP: #if LJ_HASJIT - dasm_put(Dst, 14585, HOTCOUNT_PCMASK, GG_DISP2HOT); + dasm_put(Dst, 14601, HOTCOUNT_PCMASK, GG_DISP2HOT); #endif break; case BC_ILOOP: - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); break; case BC_JLOOP: #if LJ_HASJIT - dasm_put(Dst, 14822, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); + dasm_put(Dst, 14838, DISPATCH_J(trace), DtD(->mcode), DISPATCH_GL(jit_base), DISPATCH_GL(jit_L)); #endif break; case BC_JMP: - dasm_put(Dst, 14845, -BCBIAS_J*4); + dasm_put(Dst, 14861, -BCBIAS_J*4); break; /* -- Function headers -------------------------------------------------- */ @@ -2279,47 +2282,47 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) break; #endif case BC_IFUNCF: - dasm_put(Dst, 14869, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); + dasm_put(Dst, 14885, -4+PC2PROTO(k), Dt1(->maxstack), -4+PC2PROTO(numparams)); if (op == BC_JFUNCF) { - dasm_put(Dst, 14899, BC_JLOOP); + dasm_put(Dst, 14915, BC_JLOOP); } else { - dasm_put(Dst, 8398); + dasm_put(Dst, 8414); } - dasm_put(Dst, 14908, LJ_TNIL); + dasm_put(Dst, 14924, LJ_TNIL); break; case BC_JFUNCV: #if !LJ_HASJIT break; #endif - dasm_put(Dst, 10449); + dasm_put(Dst, 10465); break; /* NYI: compiled vararg functions. */ case BC_IFUNCV: - dasm_put(Dst, 14930, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); + dasm_put(Dst, 14946, FRAME_VARG, Dt1(->maxstack), -4+PC2PROTO(numparams), LJ_TNIL); if (op == BC_JFUNCV) { - dasm_put(Dst, 14899, BC_JLOOP); + dasm_put(Dst, 14915, BC_JLOOP); } else { - dasm_put(Dst, 15021, -4+PC2PROTO(k)); + dasm_put(Dst, 15037, -4+PC2PROTO(k)); } - dasm_put(Dst, 15043, LJ_TNIL); + dasm_put(Dst, 15059, LJ_TNIL); break; case BC_FUNCC: case BC_FUNCCW: - dasm_put(Dst, 15065, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); + dasm_put(Dst, 15081, Dt8(->f), Dt1(->base), 8*LUA_MINSTACK, Dt1(->maxstack), Dt1(->top)); if (op == BC_FUNCC) { - dasm_put(Dst, 15094); + dasm_put(Dst, 15110); } else { - dasm_put(Dst, 15098); + dasm_put(Dst, 15114); } - dasm_put(Dst, 15106, DISPATCH_GL(vmstate), ~LJ_VMST_C); + dasm_put(Dst, 15122, DISPATCH_GL(vmstate), ~LJ_VMST_C); if (op == BC_FUNCC) { - dasm_put(Dst, 15115); + dasm_put(Dst, 15131); } else { - dasm_put(Dst, 15119, DISPATCH_GL(wrapf)); + dasm_put(Dst, 15135, DISPATCH_GL(wrapf)); } - dasm_put(Dst, 15124, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); + dasm_put(Dst, 15140, DISPATCH_GL(vmstate), ~LJ_VMST_INTERP, Dt1(->base), Dt1(->top)); break; /* ---------------------------------------------------------------------- */ @@ -2347,7 +2350,7 @@ static int build_backend(BuildCtx *ctx) build_subroutines(ctx, cmov, sse); - dasm_put(Dst, 15149); + dasm_put(Dst, 15165); for (op = 0; op < BC__MAX; op++) build_ins(ctx, (BCOp)op, op, cmov, sse); diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index 42ffd2b8..b83912c5 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c @@ -62,6 +62,7 @@ void lj_dispatch_init_hotcount(global_State *g) #define DISPMODE_REC 0x02 /* Recording active. */ #define DISPMODE_INS 0x04 /* Override instruction dispatch. */ #define DISPMODE_CALL 0x08 /* Override call dispatch. */ +#define DISPMODE_RET 0x08 /* Override return dispatch. */ /* Update dispatch table depending on various flags. */ void lj_dispatch_update(global_State *g) @@ -74,6 +75,7 @@ void lj_dispatch_update(global_State *g) #endif mode |= (g->hookmask & (LUA_MASKLINE|LUA_MASKCOUNT)) ? DISPMODE_INS : 0; mode |= (g->hookmask & LUA_MASKCALL) ? DISPMODE_CALL : 0; + mode |= (g->hookmask & LUA_MASKRET) ? DISPMODE_RET : 0; if (oldmode != mode) { /* Mode changed? */ ASMFunction *disp = G2GG(g)->dispatch; ASMFunction f_forl, f_iterl, f_loop, f_funcf, f_funcv; @@ -104,18 +106,37 @@ void lj_dispatch_update(global_State *g) if (!(mode & (DISPMODE_REC|DISPMODE_INS))) { /* No ins dispatch? */ /* Copy static dispatch table to dynamic dispatch table. */ memcpy(&disp[0], &disp[GG_LEN_DDISP], GG_LEN_SDISP*sizeof(ASMFunction)); + /* Overwrite with dynamic return dispatch. */ + if ((mode & DISPMODE_RET)) { + disp[BC_RETM] = lj_vm_rethook; + disp[BC_RET] = lj_vm_rethook; + disp[BC_RET0] = lj_vm_rethook; + disp[BC_RET1] = lj_vm_rethook; + } } else { /* The recording dispatch also checks for hooks. */ - ASMFunction f = (mode & DISPMODE_REC) ? lj_vm_record : lj_vm_hook; + ASMFunction f = (mode & DISPMODE_REC) ? lj_vm_record : lj_vm_inshook; uint32_t i; for (i = 0; i < GG_LEN_SDISP; i++) disp[i] = f; } } else if (!(mode & (DISPMODE_REC|DISPMODE_INS))) { - /* Otherwise only set dynamic counting ins. */ + /* Otherwise set dynamic counting ins. */ disp[BC_FORL] = f_forl; disp[BC_ITERL] = f_iterl; disp[BC_LOOP] = f_loop; + /* Set dynamic return dispatch. */ + if ((mode & DISPMODE_RET)) { + disp[BC_RETM] = lj_vm_rethook; + disp[BC_RET] = lj_vm_rethook; + disp[BC_RET0] = lj_vm_rethook; + disp[BC_RET1] = lj_vm_rethook; + } else { + disp[BC_RETM] = disp[GG_LEN_DDISP+BC_RETM]; + disp[BC_RET] = disp[GG_LEN_DDISP+BC_RET]; + disp[BC_RET0] = disp[GG_LEN_DDISP+BC_RET0]; + disp[BC_RET1] = disp[GG_LEN_DDISP+BC_RET1]; + } } /* Set dynamic call dispatch. */ @@ -321,7 +342,7 @@ static BCReg cur_topslot(GCproto *pt, const BCIns *pc, uint32_t nres) } } -/* Instruction dispatch. Used by instr/line hooks or when recording. */ +/* Instruction dispatch. Used by instr/line/return hooks or when recording. */ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) { GCfunc *fn = curr_func(L); @@ -348,17 +369,22 @@ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) if ((g->hookmask & LUA_MASKCOUNT) && g->hookcount == 0) { g->hookcount = g->hookcstart; callhook(L, LUA_HOOKCOUNT, -1); + L->top = L->base + slots; /* Fix top again. */ } if ((g->hookmask & LUA_MASKLINE)) { BCPos npc = proto_bcpos(pt, pc) - 1; BCPos opc = proto_bcpos(pt, oldpc) - 1; BCLine line = proto_line(pt, npc); - if (npc == 0 || pc <= oldpc || - opc >= pt->sizebc || line != proto_line(pt, opc)) { - L->top = L->base + slots; /* Fix top again after instruction hook. */ + if (pc <= oldpc || opc >= pt->sizebc || line != proto_line(pt, opc)) { callhook(L, LUA_HOOKLINE, line); + L->top = L->base + slots; /* Fix top again. */ } } + if ((g->hookmask & LUA_MASKRET)) { + BCOp op = bc_op(pc[-1]); + if (op == BC_RETM || op == BC_RET || op == BC_RET0 || op == BC_RET1) + callhook(L, LUA_HOOKRET, -1); + } } /* Initialize call. Ensure stack space and clear missing parameters. */ diff --git a/src/lj_dispatch.h b/src/lj_dispatch.h index 935fa821..1aa7dae0 100644 --- a/src/lj_dispatch.h +++ b/src/lj_dispatch.h @@ -66,6 +66,7 @@ LJ_FUNC void lj_dispatch_update(global_State *g); /* Instruction dispatch callback for hooks or when recording. */ LJ_FUNCA void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc); -LJ_FUNCA ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc); +LJ_FUNCA ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns*pc); +LJ_FUNCA void LJ_FASTCALL lj_dispatch_return(lua_State *L, const BCIns *pc); #endif diff --git a/src/lj_vm.h b/src/lj_vm.h index f6ae498f..01667711 100644 --- a/src/lj_vm.h +++ b/src/lj_vm.h @@ -29,7 +29,8 @@ LJ_ASMF double lj_vm_foldfpm(double x, int op); /* Dispatch targets for recording and hooks. */ LJ_ASMF void lj_vm_record(void); -LJ_ASMF void lj_vm_hook(void); +LJ_ASMF void lj_vm_inshook(void); +LJ_ASMF void lj_vm_rethook(void); LJ_ASMF void lj_vm_callhook(void); /* Trace exit handling. */ -- cgit v1.2.3-55-g6feb