.plugin/ndisasm: upgraded to latest version

git-svn-id: svn://ultimatepp.org/upp/trunk@2525 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-07-12 10:27:34 +00:00
parent 2021b448a9
commit 0d2b0a3a58
36 changed files with 26481 additions and 7445 deletions

View file

@ -106,7 +106,7 @@ void ResolveTParam(Vector<String>& type, const Vector<String>& tparam)
void AssistScanError(int line, const String& text) void AssistScanError(int line, const String& text)
{ {
#ifdef _DEBUG #ifdef _DEBUG_X_0
PutVerbose(String().Cat() << "(" << line << "): " << text); PutVerbose(String().Cat() << "(" << line << "): " << text);
#endif #endif
} }
@ -120,7 +120,7 @@ void AssistEditor::Context(Parser& parser, int pos)
parser.Do(ss, IgnoreList(), CodeBase(), Null, callback(AssistScanError)); parser.Do(ss, IgnoreList(), CodeBase(), Null, callback(AssistScanError));
QualifyTypes(CodeBase(), parser.current_scope, parser.current); QualifyTypes(CodeBase(), parser.current_scope, parser.current);
inbody = parser.IsInBody(); inbody = parser.IsInBody();
#ifdef _DEBUG #ifdef _DEBUG_X_0
PutVerbose("body: " + AsString(inbody)); PutVerbose("body: " + AsString(inbody));
PutVerbose("scope: " + AsString(parser.current_scope)); PutVerbose("scope: " + AsString(parser.current_scope));
#endif #endif

View file

@ -103,10 +103,11 @@ bool Pdb::Create(One<Host> local, const String& exefile, const String& cmdline)
Buffer<char> env(local->GetEnvironment().GetCount() + 1); Buffer<char> env(local->GetEnvironment().GetCount() + 1);
memcpy(env, ~local->GetEnvironment(), local->GetEnvironment().GetCount() + 1); memcpy(env, ~local->GetEnvironment(), local->GetEnvironment().GetCount() + 1);
bool h = CreateProcess(exefile, cmd, NULL, NULL, TRUE, bool h = CreateProcess(exefile, cmd, NULL, NULL, TRUE,
NORMAL_PRIORITY_CLASS|CREATE_NEW_CONSOLE|DEBUG_ONLY_THIS_PROCESS, NORMAL_PRIORITY_CLASS|CREATE_NEW_CONSOLE|DEBUG_ONLY_THIS_PROCESS|DEBUG_PROCESS,
~env, NULL, &si, &pi); ~env, NULL, &si, &pi);
if(!h) { if(!h) {
Exclamation("Error creating process&[* " + DeQtf(exefile) + "]"); Exclamation("Error creating process&[* " + DeQtf(exefile) + "]&" +
"Windows error: " + DeQtf(GetLastErrorMessage()));
return false; return false;
} }
hProcess = pi.hProcess; hProcess = pi.hProcess;

View file

@ -85,10 +85,10 @@ JPEG Group]]
::^ [s0; [+75 ndisasm]] ::^ [s0; [+75 ndisasm]]
::= [s0; [+75 Julian Hall, Simon Tatham, Nelson Rush, Frank Kotler, Stephen ::= [s0; [+75 Julian Hall, Simon Tatham, Nelson Rush, Frank Kotler, Stephen
Silver, John Coffman, Yuri Zaporogets, H. Peter Anvin, John Fine, Silver, John Coffman, Yuri Zaporogets, H. Peter Anvin, John Fine,
Kendall Bennet, Gary Clark, Andrew Crabtree, Rafael R. Sevilla,, Kendall Bennet, Gary Clark, Andrew Crabtree, Rafael R. Sevilla,
Jaime Tejedor Gómez, James Seter, Edward J. Beroset, Stanislav Jaime Tejedor, James Seter, Edward J. Beroset, Stanislav Karchebny,
Karchebny, Debbie Wiles, Trevor Woerner, Michael K. Ter Louw, Debbie Wiles, Trevor Woerner, Michael K. Ter Louw, Martin Wawro,
Martin Wawro, Alexei Frounze]] Alexei Frounze]]
::^ [s0; [+75 PNG]] ::^ [s0; [+75 PNG]]
::= [s0; [+75 Glenn Randers`-Pehrson, Andreas Dilger, Guy Eric Schalnat]] ::= [s0; [+75 Glenn Randers`-Pehrson, Andreas Dilger, Guy Eric Schalnat]]
::^ [s0; [+75 Sqlite]] ::^ [s0; [+75 Sqlite]]

View file

@ -1,61 +1,61 @@
TITLE("Copyright © 1999-2009 Ultimate++ team") TITLE("Copyright © 1999-2009 Ultimate++ team")
COMPRESSED COMPRESSED
120,156,205,125,77,115,27,73,150,216,95,201,144,119,119,200,110,16,18,217,45,117,75,154,157,24,144,132,40,116,83,36,7,0,165,209,116,168,137,2,144,32,170,89,168,66,215,7,41,104,122,14,27,62,56,236,179,47,62,142,79,118,132,29,225,136,61,250,224,8,183,247,159,216,14,239,191,240,251,200,204,202,204,170,2,73,129,135,85,204,180,4,160,42,243,229,203,247,253,94,190,252,65,252,205,223,60,105,61,249,87,79,110,249,243,226,80,206,130,34,202,63,252,240,231,139,191,252,109,247,100,231,124,32,126,200,158,188,252,162,119,36,243,227,100,18,68,135,97,250,242,203,221,221,111,196,223,125,192,31,196,15,95,208,167,131,100,185,74,195,203,121,46,254,231,127,22,187,207,159,63,31,237,236,61,121,242,173,56,143,242,112,17,228,114,244,229,232,75,145,203,96,241,129,223,11,191,121,242,245,203,211,231,47,69,167,200,231,73,154,189,248,129,134,217,249,229,131,26,240,77,152,202,171,139,87,191,254,215,105,36,211,214,7,254,89,232,95,135,201,226,215,191,254,211,95, 120,156,205,125,77,115,27,73,150,216,95,201,144,119,183,201,110,16,18,217,45,117,75,154,157,24,144,132,40,116,83,36,7,0,165,209,116,168,137,2,144,0,171,89,168,66,215,7,41,104,122,14,27,62,108,172,207,190,248,56,62,217,17,118,132,35,124,244,193,17,30,239,63,177,29,222,127,225,247,145,153,149,153,85,5,146,2,15,86,204,180,4,160,42,243,229,203,247,253,94,190,252,81,252,205,223,60,105,61,249,87,79,110,249,243,226,80,206,130,34,202,63,252,248,167,139,63,255,109,247,100,231,124,32,126,204,158,188,252,178,119,36,243,227,100,18,68,135,97,250,242,171,221,221,111,197,223,125,192,31,196,143,95,210,167,131,100,185,74,195,249,101,46,254,199,127,20,187,207,159,63,31,237,236,61,121,242,157,56,143,242,112,17,228,114,244,213,232,43,145,203,96,241,129,223,11,191,125,242,205,203,211,231,47,69,167,200,47,147,52,123,241,35,13,179,243,235,7,53,224,155,48,149,87,23,175,254,250,159,167,145,76,91,31,248,103,161,127,29,38,139,191,254,229,159,255,
47,250,171,72,94,181,240,235,31,231,121,190,28,189,24,61,30,61,190,185,185,25,181,167,225,101,152,7,81,150,204,242,155,32,149,163,246,50,250,145,94,61,12,226,80,70,23,223,39,153,15,202,65,18,231,105,56,46,114,15,30,49,8,226,105,146,94,188,78,126,202,179,85,75,252,41,75,162,252,226,80,142,83,217,18,71,69,56,77,46,6,147,121,184,88,200,40,107,193,130,46,139,44,79,46,250,201,34,136,225,99,26,254,84,100,98,95,166,113,146,7,240,251,155,112,50,15,0,128,78,52,150,105,46,224,139,32,157,20,217,197,155,160,152,7,105,238,47,38,46,162,104,153,167,163,118,28,141,30,255,40,190,11,226,139,119,97,4,67,103,8,25,204,159,6,114,33,47,206,82,25,231,225,4,0,122,27,78,96,1,23,48,225,100,46,97,184,222,117,56,9,46,206,138,232,167,112,130,147,229,243,48,200,178,139,65,17,79,1,186,120,154,202,155,139,253,32,13,163,40,80,192,69,23,111,66,153,126,146,63,201,155,236,42,108,1,198,22,161,140,47,206,146,244,231,2, 114,209,95,69,242,170,133,95,255,116,153,231,203,209,139,209,227,209,227,155,155,155,81,123,26,206,195,60,136,178,100,150,223,4,169,28,181,151,209,79,244,234,97,16,135,50,186,248,33,201,124,80,14,146,56,79,195,113,145,123,240,136,65,16,79,147,244,226,117,242,115,158,173,90,226,143,89,18,229,23,135,114,156,202,150,56,42,194,105,114,49,152,92,134,139,133,140,178,22,44,104,94,100,121,114,209,79,22,65,12,31,211,240,231,34,19,251,50,141,147,60,128,223,223,132,147,203,0,0,232,68,99,153,230,2,190,8,210,73,145,93,188,9,138,203,32,205,253,197,196,69,20,45,243,116,212,142,163,209,227,159,196,247,65,124,241,46,140,96,232,12,33,131,249,211,64,46,228,197,89,42,227,60,156,0,64,111,195,9,44,224,2,38,156,92,74,24,174,119,29,78,130,139,179,34,250,57,156,224,100,249,101,24,100,217,197,160,136,167,0,93,60,77,229,205,197,126,144,134,81,20,40,224,162,139,55,161,76,63,201,159,229,77,118,21,182,0,99,139,80,198,23,103,73,250,75,
71,124,7,107,145,233,197,59,25,127,146,17,194,251,183,59,21,244,207,130,40,10,227,203,105,145,79,230,176,25,18,97,223,15,50,120,233,114,206,128,191,10,198,97,114,177,95,100,50,207,19,51,243,153,188,10,254,233,63,224,156,105,26,198,128,215,36,207,171,16,124,23,44,100,38,134,115,64,113,230,35,108,254,245,199,79,163,246,56,74,46,179,101,146,143,218,147,100,241,163,24,164,97,14,216,13,98,49,8,175,131,203,34,45,90,8,5,236,78,94,164,0,216,255,250,55,45,209,15,162,153,128,141,140,101,56,5,146,19,103,193,181,140,196,105,150,7,75,25,95,37,248,64,17,137,94,18,135,121,18,22,45,113,146,164,180,131,175,147,25,62,62,68,96,62,193,91,63,5,64,145,251,50,78,194,28,72,170,200,178,4,200,96,152,202,149,120,11,243,247,195,37,13,46,115,153,34,85,92,226,167,1,254,189,18,39,225,85,152,135,49,238,82,150,133,139,68,28,2,0,175,228,84,70,176,175,189,20,161,184,22,157,72,126,4,122,196,215,142,130,113,10,180,140,64,47, 129,35,190,131,181,200,244,226,157,140,63,201,8,225,253,219,157,10,250,103,65,20,133,241,124,90,228,147,75,216,12,137,176,239,7,25,188,52,191,100,192,95,5,227,48,185,216,47,50,153,231,137,153,249,76,94,5,255,252,239,112,206,52,13,99,192,107,146,231,85,8,190,15,22,50,19,195,75,64,113,230,35,236,242,155,143,159,70,237,113,148,204,179,101,146,143,218,147,100,241,147,24,164,97,14,216,13,98,49,8,175,131,121,145,22,45,132,2,118,39,47,82,0,236,127,254,99,75,244,131,104,38,96,35,99,25,78,129,228,196,89,112,45,35,113,154,229,193,82,198,87,9,62,80,68,162,151,196,97,158,132,69,75,156,36,41,237,224,235,100,134,143,15,17,152,79,240,214,207,1,80,228,190,140,147,48,7,146,42,178,44,1,50,24,166,114,37,222,194,252,253,112,73,131,203,92,166,72,21,115,252,52,192,191,87,226,36,188,10,243,48,198,93,202,178,112,145,136,67,0,224,149,156,202,8,246,181,151,34,20,215,162,19,201,143,64,143,248,218,81,48,78,129,150,17,232,
146,252,19,126,117,152,44,0,237,9,60,117,13,84,255,73,28,22,64,83,82,109,116,8,240,100,11,216,230,239,147,104,154,192,122,22,192,100,159,8,116,113,26,253,250,87,24,81,38,0,137,216,7,220,195,34,254,52,14,47,129,89,110,196,193,167,96,25,94,210,139,49,224,3,40,45,22,175,97,224,27,216,52,152,51,156,2,189,136,63,20,176,230,2,232,72,166,52,33,240,117,188,2,124,20,17,190,119,29,68,242,90,45,148,104,30,199,0,192,11,36,209,36,22,199,197,50,200,38,128,214,87,176,75,87,176,114,177,4,32,42,60,58,132,95,179,40,32,22,221,249,5,182,16,216,38,5,50,2,50,9,63,125,34,58,186,138,126,253,71,160,239,100,145,92,174,66,100,192,8,72,135,185,205,231,134,62,18,93,58,189,56,2,168,43,116,93,98,197,223,30,15,125,53,219,160,209,29,128,8,106,218,80,96,101,216,46,248,249,215,191,166,74,168,8,37,84,0,121,128,18,216,233,108,126,37,175,9,201,199,97,18,35,57,166,41,160,79,252,243,127,255,215,255,251,127, 69,146,127,194,175,14,147,5,160,61,129,167,174,129,234,63,137,195,2,104,74,170,141,14,1,158,108,1,219,252,67,18,77,19,88,207,2,152,236,19,129,46,78,163,191,254,5,70,148,9,64,34,246,1,247,176,136,63,142,195,57,48,203,141,56,248,20,44,195,57,189,24,3,62,128,210,98,241,26,6,190,129,77,131,57,195,41,208,139,248,125,1,107,46,128,142,100,74,19,2,95,199,43,192,71,17,225,123,215,65,36,175,213,66,137,230,113,12,0,188,64,18,77,98,113,92,44,131,108,2,104,125,5,187,116,5,43,23,75,0,162,194,163,67,248,53,139,2,98,209,157,95,97,11,129,109,82,32,35,32,147,240,211,39,162,163,171,232,175,255,21,232,59,89,36,243,85,136,12,24,1,233,48,183,249,220,208,71,162,75,167,23,71,0,117,133,174,75,172,248,219,227,161,175,102,27,52,186,3,16,65,77,27,10,172,12,219,5,63,255,245,47,169,18,42,66,9,21,64,30,160,4,118,58,187,188,146,215,132,228,227,48,137,145,28,211,20,208,39,254,229,191,253,235,255,245,
252,187,127,254,135,127,47,182,190,15,178,100,33,183,91,98,57,15,211,228,163,222,142,150,248,127,255,237,63,254,159,255,244,15,255,247,223,254,23,177,181,159,196,0,236,118,219,199,230,89,95,140,254,78,12,186,167,140,75,162,248,139,65,158,6,121,24,249,207,158,147,8,63,78,46,19,71,54,122,92,242,161,5,26,65,244,19,196,246,197,219,52,145,139,48,203,96,69,106,180,47,119,65,39,192,63,197,159,255,252,21,252,121,241,236,217,179,111,72,193,84,21,133,144,139,0,160,120,241,130,127,255,225,71,252,152,39,163,23,197,114,57,250,125,156,131,124,25,143,218,64,174,63,10,235,27,252,226,131,121,201,25,20,164,5,16,85,112,41,173,49,61,169,133,98,80,78,88,104,140,30,227,176,143,103,73,90,128,0,193,7,95,60,126,252,193,126,5,127,111,103,51,16,205,50,255,81,192,0,237,66,205,183,92,174,129,131,70,108,134,161,28,131,86,231,67,80,157,134,31,248,240,225,47,127,113,113,236,254,83,252,64,31,92,140,4,160,152,6,135,34,2,197,17,103,242, 223,255,205,191,252,195,191,21,91,63,4,89,178,144,219,45,177,188,12,211,228,163,222,142,150,248,191,255,229,223,255,239,255,240,15,255,231,159,254,147,216,218,79,98,0,118,187,237,99,243,172,47,70,127,39,6,221,83,198,37,81,252,197,32,79,131,60,140,252,103,207,73,132,31,39,243,196,145,141,30,151,124,104,129,70,16,253,4,177,125,241,54,77,228,34,204,50,88,145,26,237,171,93,208,9,240,79,241,167,63,125,13,127,94,60,123,246,236,91,82,48,85,69,33,228,34,0,40,94,188,224,223,127,252,9,63,230,201,232,69,177,92,142,126,23,231,32,95,198,163,54,144,235,79,194,250,6,191,248,96,94,114,6,5,105,1,68,21,204,165,53,166,39,181,80,12,202,9,11,141,209,99,28,246,241,44,73,11,16,32,248,224,139,199,143,63,216,175,224,239,237,108,6,162,89,230,63,9,24,160,93,168,249,150,203,53,112,208,136,205,48,148,99,208,234,124,8,170,211,240,3,31,62,252,249,207,46,142,221,127,138,31,233,131,139,145,0,20,211,224,80,68,160,56,226,76,
197,7,222,153,93,180,4,126,191,181,247,244,235,246,222,211,167,237,189,175,246,182,21,172,123,150,158,223,58,216,22,164,226,73,83,139,87,33,41,106,22,131,130,244,178,0,49,37,64,12,133,32,4,197,196,82,174,98,43,147,82,116,206,135,175,79,251,131,109,69,26,123,6,208,61,144,142,41,210,13,144,188,8,51,49,7,129,50,94,137,75,96,253,92,130,210,154,165,240,118,50,19,200,187,151,64,91,121,2,51,173,4,200,85,16,181,34,25,231,65,24,131,16,20,1,76,186,92,225,147,160,243,50,161,77,1,2,11,248,49,153,132,128,136,169,152,38,147,98,1,218,19,136,30,94,159,1,5,0,128,249,92,138,209,163,129,182,30,30,109,211,52,83,25,68,2,228,22,254,170,127,19,55,160,90,146,34,23,169,204,96,133,19,28,165,5,15,77,162,98,138,80,232,159,163,112,17,170,57,240,117,66,98,134,131,22,200,31,8,105,75,44,146,105,56,195,191,37,45,108,89,140,163,48,3,230,159,134,25,35,15,190,204,240,75,218,175,22,174,228,113,146,138,76,70,17, 190,248,192,59,179,139,150,192,239,182,246,158,126,211,222,123,250,180,189,247,245,222,182,130,117,207,210,243,91,7,219,130,84,60,105,106,241,42,36,69,205,98,80,144,94,22,32,166,4,136,161,16,132,160,152,88,202,85,108,101,82,138,206,249,240,245,105,127,176,173,72,99,207,0,186,7,210,49,69,186,1,146,23,97,38,46,65,160,140,87,98,14,172,159,75,80,90,179,20,222,78,102,2,121,119,14,180,149,39,48,211,74,128,92,5,81,43,146,113,30,132,49,8,65,17,192,164,203,21,62,9,58,47,19,218,20,32,176,128,31,147,73,8,136,152,138,105,50,41,22,160,61,129,232,225,245,25,80,0,0,152,95,74,49,122,52,208,214,195,163,109,154,102,42,131,72,128,220,194,95,245,111,226,6,84,75,82,228,34,149,25,172,112,130,163,180,224,161,73,84,76,17,10,253,115,20,46,66,53,7,190,78,72,204,112,208,2,249,3,33,109,137,69,50,13,103,248,183,164,133,45,139,113,20,102,192,252,211,48,99,228,193,151,25,126,73,251,213,194,149,60,78,82,145,201,40,
142,16,2,228,180,218,18,58,122,6,103,89,34,74,115,133,36,154,247,6,24,194,93,9,32,105,86,164,49,76,41,233,29,16,114,89,66,51,254,4,92,129,223,224,227,179,36,138,146,27,92,26,236,233,52,196,21,101,47,106,54,113,8,207,6,227,228,90,210,226,152,104,192,6,2,216,25,38,220,147,101,185,209,234,167,12,172,128,72,140,165,194,32,0,2,248,14,26,215,71,67,133,128,200,3,111,142,172,45,122,240,226,148,1,100,84,78,162,149,217,109,24,56,152,92,197,201,77,36,167,151,248,133,88,128,217,134,19,95,134,215,18,247,40,200,61,186,65,118,25,75,248,13,118,12,38,157,193,76,240,99,145,78,112,133,83,89,37,52,248,247,34,128,31,130,107,16,93,193,56,146,6,140,54,96,7,126,85,107,212,90,14,177,230,2,133,143,8,9,20,4,250,181,178,66,84,43,113,17,160,209,121,70,227,134,249,138,240,1,218,245,74,230,184,67,122,181,128,183,148,152,196,37,246,101,154,92,135,136,99,36,82,102,162,52,153,22,176,215,200,174,138,141,156,53,41, 194,17,66,128,156,86,91,66,71,207,224,44,75,68,105,174,144,68,243,222,0,67,184,43,1,36,205,138,52,134,41,37,189,3,66,46,75,104,198,159,129,43,240,27,124,124,150,68,81,114,131,75,131,61,157,134,184,162,236,69,205,38,14,225,217,96,156,92,75,90,28,19,13,216,64,0,59,195,132,123,178,44,55,90,253,148,129,21,16,137,177,84,24,4,64,0,223,65,227,250,104,168,16,16,121,224,205,145,181,69,15,94,156,50,128,140,202,73,180,50,187,13,3,7,147,171,56,185,137,228,116,142,95,136,5,152,109,56,241,60,188,150,184,71,65,238,209,13,178,203,88,194,111,176,99,48,233,12,102,130,31,139,116,130,43,156,202,42,161,193,191,23,1,252,16,92,131,232,10,198,145,52,96,180,1,59,240,171,90,163,214,114,136,53,23,40,124,68,72,160,32,208,175,149,21,162,90,137,139,0,141,206,51,26,55,204,87,132,15,208,174,87,50,199,29,210,171,5,188,165,196,36,46,177,47,211,228,58,68,28,35,145,50,19,165,201,180,128,189,70,118,85,108,228,172,73,
192,143,153,2,97,56,216,18,0,71,4,203,37,32,87,113,162,65,0,33,17,52,220,85,166,137,7,68,116,10,18,1,222,50,115,3,107,187,104,219,202,16,60,240,53,96,68,0,123,186,66,229,69,31,129,11,129,9,68,18,211,92,22,214,112,104,243,190,30,185,93,33,202,47,128,42,95,119,197,224,244,213,240,93,167,223,21,189,1,168,192,211,183,189,195,238,33,112,123,103,0,95,140,30,129,33,208,3,201,116,62,20,240,76,191,115,50,124,47,78,95,137,206,201,123,241,125,239,228,176,37,186,127,60,235,119,7,3,113,218,23,189,55,103,199,189,46,124,215,59,57,56,62,63,236,157,28,137,125,120,239,228,116,40,142,123,111,122,67,24,118,120,74,83,170,161,122,221,1,14,246,166,219,63,120,13,31,59,251,189,227,222,240,61,24,61,189,225,9,142,249,10,6,237,136,179,78,127,216,59,56,63,238,244,197,217,121,255,236,116,208,133,233,15,97,216,147,222,201,171,62,204,210,125,211,61,25,2,129,159,192,119,162,251,22,62,136,193,235,206,241,49,77,165,228,170, 1,126,204,20,8,195,193,150,0,56,34,88,46,1,185,138,19,13,2,8,137,160,225,174,50,77,60,32,162,83,144,8,240,150,153,27,88,219,69,219,86,134,224,129,175,1,35,2,216,211,21,42,47,250,8,92,8,76,32,146,152,230,178,176,134,67,155,247,245,200,237,10,81,126,9,84,249,186,43,6,167,175,134,239,58,253,174,232,13,64,5,158,190,237,29,118,15,129,219,59,3,248,98,244,8,12,129,30,72,166,243,161,128,103,250,157,147,225,123,113,250,74,116,78,222,139,31,122,39,135,45,209,253,195,89,191,59,24,136,211,190,232,189,57,59,238,117,225,187,222,201,193,241,249,97,239,228,72,236,195,123,39,167,67,113,220,123,211,27,194,176,195,83,154,82,13,213,235,14,112,176,55,221,254,193,107,248,216,217,239,29,247,134,239,193,232,233,13,79,112,204,87,48,104,71,156,117,250,195,222,193,249,113,167,47,206,206,251,103,167,131,46,76,127,8,195,158,244,78,94,245,97,150,238,155,238,201,16,8,252,4,190,19,221,183,240,65,12,94,119,142,143,105,42,37,87,
216,239,2,16,157,253,227,46,143,10,240,31,28,119,122,111,192,64,232,188,233,28,117,105,1,167,240,66,159,30,83,128,188,123,221,165,175,96,232,14,252,239,96,216,59,61,65,136,15,78,79,134,125,248,8,2,254,180,63,52,175,190,235,13,186,96,174,244,123,3,92,251,171,254,41,12,143,152,131,55,78,105,16,120,239,164,203,163,32,86,93,244,195,35,248,249,124,208,45,97,57,236,118,142,97,172,1,190,108,63,220,174,87,112,207,203,205,197,127,59,234,77,115,151,98,82,146,29,165,240,50,148,168,213,222,222,238,179,111,95,124,243,237,87,123,243,221,151,160,253,158,124,173,181,222,151,223,60,5,130,199,167,87,165,74,167,111,149,243,138,223,254,248,251,61,235,135,79,48,58,126,251,247,214,119,223,201,32,30,237,68,73,177,4,139,49,68,226,214,188,42,58,168,59,105,20,235,249,222,119,71,226,187,179,238,145,130,116,229,143,135,246,233,113,16,131,136,63,155,135,81,8,163,70,193,20,60,79,252,230,187,112,33,246,147,2,60,64,80,201,199,160,46,15,210,100, 197,126,23,128,232,236,31,119,121,84,128,255,224,184,211,123,3,6,66,231,77,231,168,75,11,56,133,23,250,244,152,2,228,221,235,46,125,5,67,119,224,127,7,195,222,233,9,66,124,112,122,50,236,195,71,16,240,167,253,161,121,245,93,111,208,5,115,165,223,27,224,218,95,245,79,97,120,196,28,188,113,74,131,192,123,39,93,30,5,177,234,162,31,30,193,207,231,131,110,9,203,97,183,115,12,99,13,240,101,251,225,118,189,130,123,94,110,46,254,219,81,111,154,187,20,147,146,236,40,133,151,161,68,173,246,246,118,159,125,247,226,219,239,190,222,187,220,125,9,218,239,201,55,90,235,125,245,237,83,32,120,124,122,85,170,116,250,86,57,175,248,237,79,191,219,179,126,248,4,163,227,183,127,111,125,247,189,12,226,209,78,148,20,75,176,24,67,36,110,205,171,162,131,186,147,70,177,158,239,125,127,36,190,63,235,30,41,72,87,254,120,104,159,30,7,49,136,248,179,203,48,10,97,212,40,152,130,231,137,223,124,31,46,196,126,82,128,7,8,42,249,24,212,229,65,154,
114,133,31,190,43,162,16,12,207,55,128,2,180,213,81,87,29,23,192,125,167,96,144,127,50,14,0,142,8,67,102,232,122,33,47,129,69,7,82,90,121,187,226,45,32,113,44,81,187,225,11,163,223,128,229,28,254,4,138,133,149,77,66,210,106,33,23,96,3,26,121,221,3,143,5,12,196,41,10,90,90,212,81,10,136,240,151,60,254,20,46,247,42,120,99,136,7,18,152,123,234,191,1,10,40,11,178,69,195,59,175,3,180,235,7,96,121,199,98,8,158,111,176,0,183,13,188,116,248,216,47,80,177,178,179,241,125,146,147,237,50,0,147,106,46,209,71,140,174,9,87,201,60,6,177,59,155,145,39,255,190,72,67,241,167,96,153,164,201,165,204,97,177,175,219,202,141,235,196,215,104,228,211,227,175,66,196,255,247,176,84,84,90,224,6,198,232,176,30,193,254,137,131,8,246,90,251,220,176,35,193,56,7,75,6,253,202,89,0,54,116,191,13,107,188,38,63,28,157,131,16,172,213,33,248,224,83,16,129,71,191,254,227,2,61,13,246,123,7,56,41,200,161,41,34,68, 76,174,240,195,247,69,20,130,225,249,6,80,128,182,58,234,170,227,2,184,239,20,12,242,79,198,1,192,17,97,200,12,93,47,228,37,176,232,64,74,43,111,87,188,5,36,142,37,106,55,124,97,244,5,88,206,225,207,160,88,88,217,36,36,173,22,114,1,54,160,145,215,61,240,88,192,64,156,162,160,165,69,29,165,128,8,127,201,227,79,225,114,175,130,55,134,120,32,129,185,167,254,27,160,128,178,32,91,52,188,243,58,64,187,126,0,150,119,44,134,224,249,6,11,112,219,192,75,135,143,253,2,21,43,59,27,63,36,57,217,46,3,48,169,46,37,250,136,209,53,225,42,185,140,65,236,206,102,228,201,191,47,210,80,252,49,88,38,105,50,151,57,44,246,117,91,185,113,157,248,26,141,124,122,252,85,136,248,255,1,150,138,74,11,220,192,24,29,214,35,216,63,113,16,193,94,107,159,27,118,36,24,231,96,201,160,95,57,11,192,134,238,183,97,141,215,236,135,127,31,132,96,172,14,193,5,159,38,169,246,119,7,56,25,200,159,41,34,66,124,223,70,247,49,201,112,
124,215,70,55,50,201,112,154,1,248,102,33,184,71,215,226,251,0,221,255,113,12,198,4,248,20,227,80,138,119,104,216,144,35,122,13,35,190,75,200,217,49,225,8,241,61,72,118,88,202,113,82,220,24,247,236,93,112,147,130,254,71,143,19,156,153,87,176,99,224,25,249,59,112,118,114,228,99,255,8,60,46,192,48,121,169,217,104,231,76,206,83,114,130,105,229,160,68,15,195,136,220,222,163,98,37,186,96,50,161,231,20,68,113,144,251,99,15,126,142,194,92,250,195,31,182,181,227,38,94,135,203,10,17,229,225,204,127,99,0,238,196,177,156,205,120,151,129,89,64,189,97,228,4,92,166,9,224,164,23,79,108,241,226,201,148,14,236,35,176,121,38,141,28,65,37,163,20,36,219,39,163,71,203,168,184,12,227,209,35,48,213,82,137,1,24,80,241,125,57,3,140,34,55,160,209,148,106,51,27,38,156,39,55,18,40,140,236,154,82,35,206,193,149,66,123,124,180,3,238,199,18,84,32,90,12,234,37,214,208,242,227,68,46,73,115,3,91,29,31,157,29,235,159,167,154, 248,1,248,100,33,184,69,215,226,135,0,221,254,113,12,70,4,248,18,227,80,138,119,104,208,144,3,122,13,194,244,93,66,78,142,9,67,136,31,64,162,195,18,142,147,226,198,184,101,239,130,155,20,244,62,122,154,224,196,188,130,157,2,143,200,199,252,217,201,145,143,245,35,240,180,0,179,228,157,102,163,157,51,121,153,146,243,75,43,6,229,121,24,70,228,238,30,21,43,209,5,83,9,61,166,32,138,131,220,31,123,240,75,20,230,210,31,254,176,173,29,54,241,58,92,86,136,39,15,103,254,27,3,112,35,142,229,108,198,187,11,76,2,106,13,35,38,224,42,77,0,39,189,120,98,139,21,79,150,116,96,255,128,189,51,105,228,7,42,23,165,24,217,46,25,61,90,70,197,60,140,71,143,192,68,75,37,6,94,64,181,247,229,12,48,138,92,128,198,82,170,205,107,152,240,50,185,145,64,89,100,207,148,154,240,18,92,40,180,195,71,59,224,118,44,65,245,161,165,160,94,98,205,44,63,78,228,146,52,54,176,211,241,209,217,177,254,121,170,25,64,235,186,114,17,234,
17,180,206,43,23,161,254,85,218,245,187,207,119,181,100,251,2,127,4,81,112,244,238,3,45,85,224,196,64,39,96,82,174,178,92,46,196,150,177,194,104,126,244,120,118,48,192,112,3,214,110,4,91,41,179,109,196,53,58,11,79,201,89,216,125,250,100,187,239,124,162,169,162,221,189,111,245,124,151,147,137,248,170,13,190,133,154,51,79,146,8,118,51,140,171,206,197,215,64,116,210,50,246,94,1,5,78,3,182,176,105,211,120,137,246,232,246,106,192,178,120,83,44,16,240,239,231,200,193,135,65,12,214,201,0,191,129,77,232,6,96,234,2,194,147,213,20,101,224,149,20,135,5,69,55,128,207,218,192,85,24,173,57,4,84,188,150,225,244,39,9,223,30,160,179,14,31,129,138,195,143,165,168,203,108,40,108,226,81,192,104,82,201,196,209,193,129,133,225,2,72,155,70,217,239,157,156,15,123,199,3,198,177,181,171,31,216,103,187,205,47,3,74,255,162,255,229,30,184,228,71,39,231,226,168,123,210,237,119,142,193,114,216,63,238,29,128,110,63,232,158,12,186,10,70,120, 95,165,61,191,251,124,87,75,180,47,241,71,16,1,71,239,62,208,82,5,78,12,116,2,166,228,42,203,229,66,108,25,235,139,230,71,79,103,7,3,11,55,96,229,70,176,149,50,219,70,92,163,147,240,148,156,132,221,167,79,182,251,206,39,154,42,218,221,251,78,207,55,159,76,196,215,109,240,41,212,156,121,146,68,176,155,97,92,117,42,190,1,162,147,150,145,247,10,40,112,26,176,101,77,155,198,75,180,71,183,87,3,22,197,155,98,129,128,255,112,137,156,123,24,196,96,149,12,240,27,216,132,110,0,38,46,32,60,89,77,81,246,93,73,113,88,80,84,3,248,172,13,92,133,81,154,67,64,197,107,25,78,127,150,240,237,1,58,233,240,17,168,56,252,88,138,184,204,134,194,38,30,5,140,38,149,76,28,29,28,88,24,46,128,180,105,148,253,222,201,249,176,119,60,96,28,91,187,250,129,125,181,219,252,49,160,244,47,251,95,237,129,43,126,116,114,46,142,186,39,221,126,231,24,44,134,253,227,222,1,232,244,131,238,201,160,171,96,132,71,31,139,183,0,51,210,
244,177,120,11,48,35,13,237,161,54,136,37,134,107,119,181,45,165,97,127,236,109,198,238,243,111,159,183,232,201,187,109,9,142,240,244,57,136,148,197,18,136,248,44,10,48,52,57,160,37,127,245,213,147,22,96,29,53,21,72,154,142,16,79,246,118,119,119,71,59,187,95,61,249,70,128,49,208,81,67,140,191,253,138,144,216,5,78,89,129,86,19,218,95,200,115,118,79,200,187,67,4,150,238,145,128,103,199,0,205,194,113,23,224,197,200,24,172,108,255,178,33,9,100,23,95,162,49,0,158,81,168,12,89,180,15,74,219,241,239,25,138,47,30,247,191,22,103,32,188,22,192,147,30,124,195,185,225,210,140,248,124,1,107,179,188,77,248,63,24,33,225,101,204,80,231,1,80,90,112,19,172,196,10,196,9,57,179,83,116,196,18,116,125,148,67,67,112,193,130,243,182,16,251,43,246,157,131,12,128,70,85,74,155,44,65,120,131,47,202,118,191,49,199,201,165,200,81,205,210,84,151,69,64,62,179,188,125,42,242,169,77,176,124,103,180,3,15,45,16,210,172,32,59,94,58, 208,30,106,129,88,98,152,118,87,219,80,26,246,199,222,102,236,62,255,238,121,139,158,188,219,150,224,8,79,159,131,72,89,44,129,136,207,162,0,67,146,3,90,242,215,95,63,105,1,214,81,67,129,164,233,8,241,100,111,119,119,119,180,179,251,245,147,111,5,24,1,29,53,196,248,187,175,9,137,93,224,148,21,104,51,161,253,132,60,103,183,132,188,58,68,96,233,22,9,120,118,12,208,44,28,55,1,94,140,140,161,202,118,47,27,144,64,118,241,28,141,0,240,136,66,101,192,162,93,80,218,140,127,207,80,124,249,184,255,141,56,3,225,181,0,158,244,224,27,94,26,46,205,136,207,23,176,54,203,203,132,255,131,241,17,206,99,134,58,15,128,210,130,155,96,37,86,32,78,200,137,157,162,3,150,160,203,163,28,25,130,11,22,156,183,133,216,95,177,207,28,100,0,52,170,80,218,100,9,194,27,124,80,182,247,141,25,78,174,68,142,234,149,166,154,23,1,249,202,242,246,169,200,151,54,65,242,157,209,14,60,180,64,72,179,130,236,119,233,120,51,244,52,46,21,5,
94,13,61,141,75,69,1,134,222,23,120,68,41,120,92,236,28,52,0,135,46,2,110,9,142,140,24,82,150,65,19,57,141,126,227,185,236,202,185,96,243,2,108,252,203,20,164,250,13,9,230,128,237,48,100,46,116,114,201,169,230,109,5,152,182,6,24,248,225,215,154,38,115,86,55,1,159,53,213,142,9,227,91,153,127,141,120,7,185,33,131,105,123,91,136,247,73,33,38,32,57,216,33,98,96,8,251,10,226,12,3,9,73,219,163,161,119,104,118,220,0,146,151,50,184,34,59,213,222,143,22,254,132,192,165,168,81,82,114,202,18,189,157,45,34,219,37,168,81,112,206,196,41,204,84,15,100,86,161,68,123,127,193,79,3,40,89,5,145,147,95,210,138,197,93,37,83,57,240,137,45,69,73,104,58,34,89,176,63,39,211,107,244,232,193,81,198,161,111,194,108,142,81,20,61,21,168,73,9,158,182,235,65,167,132,59,48,175,136,35,213,139,64,194,240,209,122,21,159,81,116,235,80,38,188,14,132,40,0,70,101,237,227,32,177,136,193,218,34,120,245,22,188,84,1,8, 24,122,93,224,9,165,224,105,177,83,208,0,28,186,6,184,37,56,50,98,72,89,4,77,228,52,250,194,115,213,149,83,193,102,5,216,246,243,20,164,250,13,9,230,128,237,47,100,46,116,110,201,153,230,109,5,152,182,6,24,240,225,215,154,38,115,86,55,1,95,53,213,14,9,227,91,153,125,141,120,7,185,33,131,105,123,91,136,247,73,33,38,32,57,216,17,98,96,8,251,10,226,12,3,8,73,219,163,161,119,104,110,220,0,146,151,50,184,34,251,212,222,143,22,254,132,192,165,168,81,82,114,198,18,189,157,45,34,219,37,168,81,112,202,196,41,204,84,15,100,86,161,68,123,127,193,63,3,40,89,5,145,115,95,210,138,197,93,37,83,57,240,137,45,69,73,104,50,34,89,176,31,39,211,107,244,228,193,65,198,161,111,194,236,18,163,39,122,42,80,147,18,60,108,215,115,78,9,119,96,86,17,71,170,23,129,132,225,163,245,42,62,163,232,214,161,76,120,29,8,81,0,140,202,202,199,65,98,17,131,149,69,240,234,45,120,169,2,15,106,56,116,180,205,184,83,
53,28,58,220,102,220,41,249,169,25,142,12,120,206,252,141,26,38,56,74,142,225,16,218,85,14,227,208,6,197,210,66,171,21,12,202,120,38,192,203,56,156,34,9,163,44,163,96,82,76,50,64,205,167,2,66,136,61,32,244,236,138,127,74,112,131,82,228,232,212,10,27,161,23,78,239,56,179,168,208,56,13,62,145,41,234,28,124,98,9,63,134,99,48,122,242,80,9,40,28,89,33,183,118,115,109,164,182,16,34,245,48,135,167,144,171,60,172,188,130,103,228,199,0,101,125,107,237,200,25,184,36,34,208,27,1,104,155,75,226,203,75,12,57,211,226,73,170,136,25,218,197,52,37,6,101,48,34,195,171,151,147,16,134,194,120,70,64,86,89,25,71,179,41,184,205,108,72,239,122,68,14,175,172,136,3,91,134,0,45,162,227,133,27,122,132,113,192,100,45,225,200,192,110,195,103,22,154,68,64,27,161,144,162,81,153,140,224,95,161,166,138,10,147,203,58,218,97,173,159,223,192,78,131,251,145,189,16,91,96,158,149,17,51,119,47,144,110,183,64,237,131,79,34,83,69, 242,79,51,28,25,240,156,249,27,53,76,112,148,28,195,32,180,171,28,190,161,13,138,165,133,86,43,8,148,241,76,128,151,113,56,69,18,70,89,70,65,164,152,100,128,154,79,5,130,16,123,64,232,217,21,255,148,224,6,165,200,209,169,21,46,66,239,155,222,113,102,81,33,113,26,124,34,83,212,57,248,196,18,126,12,199,96,244,228,161,18,80,56,178,66,110,237,230,218,72,109,33,68,234,97,14,75,33,87,121,88,121,5,207,200,143,1,202,250,214,218,145,51,112,69,68,160,55,2,208,118,41,137,47,231,24,106,166,197,147,84,17,51,180,135,105,74,12,198,96,36,134,87,47,39,33,12,133,113,140,128,172,178,50,126,102,83,112,155,217,144,222,245,136,28,94,89,17,7,182,12,1,90,68,199,11,55,244,8,227,128,201,90,194,145,129,221,134,207,44,52,137,128,54,66,33,69,163,50,25,193,191,66,77,21,21,38,151,117,180,195,90,63,191,129,157,6,183,35,123,33,182,192,60,43,35,101,238,94,32,221,110,129,218,7,95,68,166,138,120,44,237,118,3,246,236,
60,150,118,187,1,123,118,78,232,202,232,199,72,94,130,28,176,130,108,74,107,218,17,69,29,68,84,155,107,207,231,47,160,19,97,56,16,119,72,6,184,143,36,117,81,78,171,101,225,12,100,22,21,41,179,4,177,174,102,9,77,146,180,15,82,43,245,130,156,4,176,186,166,153,217,33,22,195,113,2,239,167,168,192,86,165,80,113,228,14,236,79,207,165,86,10,185,225,66,66,150,223,152,26,193,89,192,231,99,37,178,12,50,180,150,209,244,208,240,161,254,178,8,11,192,85,59,9,192,220,104,154,97,201,168,108,4,156,49,129,237,9,227,0,220,75,218,127,120,76,133,207,192,64,88,144,26,166,72,26,131,193,118,34,236,52,16,45,14,0,114,28,243,12,66,197,130,245,88,90,143,129,71,157,202,101,193,65,186,10,25,189,194,71,163,85,139,38,180,229,26,130,151,207,193,72,1,11,0,230,157,168,92,29,168,161,177,21,147,91,226,207,40,66,144,30,81,40,147,188,185,78,194,41,193,50,69,177,154,242,138,64,9,106,50,73,216,149,15,220,9,105,65,33,184,30, 37,161,43,163,31,35,57,7,57,96,5,215,148,214,180,35,137,58,120,168,54,215,158,207,95,64,39,194,48,32,238,144,12,112,31,73,234,162,156,86,203,194,25,200,44,42,82,102,9,98,93,205,18,154,36,105,31,164,86,234,5,57,9,96,117,77,51,179,67,44,134,227,4,222,79,81,129,173,74,161,226,200,29,216,159,158,75,173,20,106,195,133,132,44,191,49,37,130,179,128,175,199,74,100,25,100,104,45,163,233,161,225,67,253,101,17,22,128,171,118,18,128,185,209,52,195,146,81,217,8,56,99,2,219,19,198,1,184,149,180,255,240,152,10,155,129,129,176,32,53,76,17,52,6,131,237,68,216,105,32,90,28,0,228,56,230,23,132,138,1,235,177,180,30,3,79,58,149,203,130,131,115,21,50,122,133,143,70,171,22,77,104,203,53,4,47,191,4,35,5,44,0,152,119,162,114,116,160,134,198,86,44,110,137,63,163,8,65,122,68,161,76,242,230,58,9,167,4,203,20,197,106,202,43,2,37,168,201,36,97,23,62,112,39,164,5,133,224,122,92,135,211,130,227,116,20,
215,225,180,224,120,29,69,223,213,36,150,199,131,97,76,160,217,9,49,36,71,21,203,97,224,111,208,95,50,15,208,107,98,17,11,244,17,115,252,149,54,138,176,79,177,84,16,233,19,240,60,82,11,231,60,151,14,223,26,143,136,232,84,145,25,18,41,65,142,250,1,190,199,77,48,15,6,100,245,85,36,61,1,8,116,97,24,157,148,156,9,121,211,248,200,76,20,6,49,136,210,60,192,84,56,81,73,5,138,58,249,54,101,255,233,157,12,246,190,24,118,251,111,6,20,2,60,56,61,57,236,97,52,141,67,133,7,167,103,239,123,39,71,224,217,244,6,195,126,111,255,156,2,109,248,224,155,211,195,222,171,222,65,7,191,208,153,60,244,79,112,106,204,230,97,29,197,211,39,226,201,135,246,206,47,180,88,43,168,107,25,106,138,166,105,151,96,185,108,68,221,36,233,149,18,53,198,181,9,116,252,126,137,166,190,177,157,74,57,54,79,34,212,97,89,176,82,246,246,2,44,96,216,174,82,16,77,89,22,208,123,140,112,109,188,215,27,52,100,110,98,150,230,140,1,196, 117,87,147,88,30,15,134,47,129,102,39,196,144,28,77,44,135,129,191,65,127,201,60,64,175,137,69,44,208,71,204,113,87,218,40,194,62,197,80,65,164,79,192,243,72,45,156,243,92,58,108,107,60,34,162,83,69,102,72,164,4,57,234,7,248,30,55,193,60,24,144,213,87,145,244,4,32,208,133,97,116,82,114,38,212,77,227,35,51,81,248,195,32,74,243,0,83,225,68,37,19,40,218,228,219,148,253,167,119,50,216,251,98,216,237,191,25,80,232,239,224,244,228,176,135,81,52,14,17,30,156,158,189,239,157,28,129,103,211,27,12,251,189,253,115,10,176,225,131,111,78,15,123,175,122,7,29,252,66,103,240,208,63,193,169,49,139,135,245,19,79,159,136,39,31,218,59,191,210,98,173,96,174,101,168,41,154,166,93,130,229,178,17,117,147,164,87,74,212,24,215,38,208,113,251,37,154,250,198,118,42,229,216,101,18,161,14,203,130,149,178,183,23,96,1,195,118,149,130,104,202,178,128,222,99,132,107,227,189,222,160,33,115,19,179,51,103,12,32,70,108,199,18,240,220,98,
200,237,88,2,158,91,108,39,153,5,144,210,177,86,129,240,179,40,13,224,109,90,205,56,96,169,64,147,155,241,196,66,130,74,213,241,119,235,39,19,77,151,105,120,13,91,12,196,73,195,240,2,202,69,71,193,205,11,219,59,228,141,127,188,199,196,27,18,132,128,17,0,134,223,119,162,238,238,108,98,153,164,218,243,71,99,72,1,101,252,29,92,23,42,18,155,238,50,45,219,141,105,128,209,10,194,10,239,100,4,204,94,4,151,136,202,173,215,32,118,65,178,204,40,182,164,95,80,25,56,39,10,224,37,179,84,58,12,119,12,176,105,79,63,122,132,6,113,23,85,133,226,53,146,160,193,116,10,86,9,49,94,6,111,128,158,130,7,171,88,2,117,3,26,229,154,173,150,68,237,0,26,126,119,99,57,20,117,200,229,142,49,95,18,249,75,150,234,100,53,22,121,22,146,100,1,93,14,163,107,194,10,38,228,163,164,69,92,217,16,165,7,180,249,133,73,73,182,40,105,52,144,220,32,108,84,114,205,122,69,131,66,233,139,112,70,19,226,142,147,218,33,105,29,230,164, 59,201,44,128,148,142,181,10,132,159,69,105,0,111,211,106,198,1,75,5,154,220,140,39,22,18,84,170,142,187,91,63,153,40,186,76,195,107,216,98,32,78,26,134,23,80,46,58,10,110,94,216,222,33,111,252,227,61,38,222,144,32,4,140,0,48,252,190,19,109,119,103,19,203,36,213,158,63,26,67,10,40,227,239,224,186,80,145,216,116,151,105,217,110,76,3,140,86,16,86,120,39,35,96,246,34,152,35,42,183,94,131,216,5,201,50,163,216,146,126,65,101,222,156,40,128,151,196,82,105,48,220,49,192,166,61,253,232,17,26,196,93,84,21,138,215,72,130,6,211,41,88,37,196,120,25,188,1,122,10,30,172,98,9,212,13,104,148,107,182,90,18,181,3,104,248,221,141,229,80,212,33,151,59,198,124,73,228,47,89,170,147,213,88,228,89,72,146,5,116,57,140,174,9,43,152,144,143,146,22,113,101,67,148,30,208,230,23,38,35,217,162,164,209,64,114,131,176,81,73,53,235,21,13,10,165,45,194,25,77,136,59,78,106,135,164,117,152,147,66,22,141,52,137,1,153,
144,69,35,77,98,64,166,12,164,2,116,32,24,17,56,74,75,145,124,132,117,214,64,188,221,70,23,67,35,145,73,47,45,208,29,192,177,50,156,69,171,58,51,21,230,118,218,245,178,227,169,216,85,130,131,236,172,96,117,119,95,188,100,175,223,100,142,237,31,100,142,91,128,52,142,153,63,224,178,5,168,161,2,140,69,147,49,42,29,1,64,218,50,156,20,73,145,169,112,58,200,46,82,38,64,235,240,141,74,160,226,242,200,98,81,80,218,79,213,39,39,97,21,147,8,67,176,41,66,173,205,144,151,226,74,202,37,178,16,210,134,182,64,85,54,78,171,76,138,249,37,14,177,105,247,53,167,140,104,38,227,9,37,11,113,109,229,208,248,12,25,186,165,147,107,89,37,46,238,252,212,182,153,39,74,84,198,217,126,186,150,185,204,198,177,215,70,38,183,50,179,64,136,207,87,25,102,220,52,15,144,56,208,174,103,160,76,200,64,155,198,48,74,160,76,218,68,71,39,17,11,198,122,179,204,67,180,3,62,234,152,131,54,245,27,169,108,207,163,50,101,163,210,84,140,128, 50,128,10,208,129,96,68,224,40,29,69,242,17,214,89,3,241,118,27,93,12,141,68,38,189,180,64,119,0,199,202,112,22,173,234,204,84,152,211,105,215,203,142,167,98,87,9,14,178,179,130,213,221,125,241,146,189,190,200,28,219,63,200,28,183,0,105,28,51,126,192,101,11,80,67,5,24,139,38,83,84,58,2,128,180,101,56,41,146,34,83,97,116,144,93,164,76,128,214,225,27,149,56,197,229,145,197,162,160,180,159,170,79,74,194,42,38,17,198,94,83,132,90,155,33,47,197,149,148,75,100,33,164,13,109,129,170,44,156,86,153,20,243,75,28,98,211,238,107,78,153,208,76,198,19,74,18,226,218,202,161,241,25,50,116,75,39,215,178,74,92,220,249,41,109,51,79,148,168,76,179,253,116,45,115,153,141,99,175,141,76,110,101,102,129,16,191,92,101,152,105,211,60,64,226,64,187,158,129,50,33,3,109,26,195,40,129,50,105,19,29,157,68,44,24,235,205,50,15,209,14,248,168,99,14,218,212,111,164,178,61,143,202,148,141,74,83,49,2,210,122,226,210,2,218,19,
180,158,184,180,128,246,132,102,62,47,72,111,47,120,29,141,108,214,82,186,190,74,211,164,75,92,25,171,52,74,157,246,26,168,85,239,114,34,188,142,132,177,68,17,40,92,50,61,241,42,50,89,147,90,167,221,11,65,105,151,24,218,19,193,246,206,47,198,213,153,4,69,198,126,146,49,129,185,154,1,173,126,216,11,218,8,88,58,138,14,77,180,148,106,37,89,161,89,138,246,134,101,25,191,173,37,219,20,185,69,145,45,63,213,94,7,218,184,10,26,17,60,162,202,204,102,97,22,208,104,234,29,88,70,161,76,74,34,250,133,76,202,52,47,237,13,252,46,99,253,139,203,244,165,173,222,126,124,135,28,138,100,70,5,28,182,125,24,160,213,194,51,4,136,16,205,10,168,31,137,181,195,116,74,35,32,121,53,153,38,218,22,89,135,137,9,96,66,249,41,102,99,180,57,18,3,49,146,225,12,102,251,148,3,88,228,10,97,24,47,13,80,1,162,28,187,193,240,16,136,117,203,39,102,140,34,81,211,143,176,143,41,170,119,45,251,145,183,136,86,173,129,200,248,85,234, 154,249,101,65,122,123,193,235,104,100,179,150,210,245,85,154,38,93,226,202,88,165,81,234,180,215,64,173,122,151,19,224,117,36,140,165,137,64,225,146,233,137,87,145,201,154,148,58,237,94,8,74,187,196,208,158,8,182,119,126,53,174,206,36,40,50,246,147,140,9,204,85,12,104,245,195,94,208,70,192,210,81,116,104,162,165,20,43,201,10,205,82,180,55,44,203,248,109,45,217,166,200,45,138,108,249,169,246,58,208,198,85,208,136,224,17,85,102,54,11,179,128,70,83,231,192,50,10,101,82,18,209,47,100,82,166,121,105,111,224,119,25,235,95,92,166,47,109,245,246,227,59,228,80,36,51,42,220,176,237,195,0,173,22,158,33,64,132,104,86,64,253,72,172,29,166,83,26,1,201,171,201,52,209,182,200,58,76,76,0,19,202,79,49,27,163,205,145,24,136,145,12,103,48,219,167,28,192,34,87,8,195,120,105,128,10,16,229,216,13,134,135,64,172,91,62,49,99,20,137,154,126,132,125,76,81,189,107,217,143,188,69,180,106,13,68,198,175,82,215,28,129,75,167,160,241,
154,35,112,233,20,52,126,138,82,136,156,98,42,185,203,41,231,30,102,96,200,177,172,140,227,164,0,137,69,53,18,101,89,203,93,164,168,49,10,155,29,187,45,52,210,35,172,101,81,150,161,33,13,197,42,184,71,234,225,237,50,108,67,241,70,18,9,150,143,34,29,167,194,236,152,195,77,74,81,75,170,78,165,231,113,40,65,142,125,34,174,177,216,177,94,182,162,137,212,213,233,151,23,168,190,29,237,158,103,50,154,233,248,171,198,55,134,152,77,133,132,217,105,70,50,71,66,92,244,182,88,178,53,107,127,99,119,252,92,132,41,71,155,120,52,111,160,246,118,157,200,215,49,35,122,153,171,66,76,217,134,67,156,4,64,201,30,236,102,135,104,114,192,239,84,199,146,73,21,116,34,44,161,163,76,175,40,155,171,137,45,149,88,5,96,199,8,71,144,37,49,140,70,241,109,180,192,82,50,79,75,243,6,31,206,36,112,32,18,24,78,144,41,234,93,0,178,175,209,171,204,231,84,169,83,238,82,203,212,3,17,155,182,48,156,231,148,167,168,68,158,6,159,120,199,19, 83,148,66,228,20,83,169,93,78,185,246,48,3,67,142,101,101,28,39,5,72,44,170,141,40,203,89,238,34,69,141,81,216,236,216,109,161,145,30,97,13,139,178,12,13,105,40,86,193,61,82,15,111,151,97,27,138,55,146,72,176,124,20,233,56,21,102,199,28,110,82,138,90,82,85,42,61,143,67,9,114,236,19,113,141,69,142,245,178,21,77,164,174,78,191,188,64,245,237,104,247,60,147,209,76,199,95,53,190,49,196,108,42,35,204,78,51,146,57,18,226,162,183,197,146,173,89,251,27,187,227,151,34,76,57,218,196,163,121,3,181,183,235,68,190,142,25,209,203,92,13,98,202,53,28,226,36,0,74,246,96,55,59,68,147,3,126,167,250,149,76,170,160,19,97,9,29,101,122,69,217,92,77,108,169,196,42,0,59,70,56,130,44,137,97,52,138,111,163,5,150,146,121,90,154,55,248,112,38,129,3,145,192,112,130,76,81,239,2,144,125,141,94,101,126,73,21,58,229,46,181,76,29,16,177,105,11,195,121,78,89,138,74,228,105,240,137,119,60,65,68,1,158,32,243,166,
68,20,224,9,50,111,106,140,196,23,121,211,11,64,189,11,107,88,120,155,68,15,121,204,44,98,216,95,10,179,245,106,135,228,172,109,215,42,181,198,99,104,23,55,137,155,37,81,75,133,196,203,160,15,123,170,202,224,87,118,56,56,53,31,49,79,160,183,30,183,54,85,211,104,91,182,32,197,193,145,30,248,130,92,105,94,86,42,47,131,116,10,186,129,102,135,151,196,13,106,120,43,48,232,209,93,129,17,128,220,14,159,80,154,34,47,75,166,148,162,68,77,133,118,151,21,13,37,11,57,115,67,102,88,189,70,78,104,138,201,160,88,129,207,129,14,120,238,165,128,125,163,210,7,107,42,246,182,228,71,153,178,75,175,99,135,28,19,195,112,77,84,139,126,203,199,35,104,34,140,220,104,143,47,171,221,199,90,44,88,213,104,84,224,7,146,237,242,18,49,169,39,210,78,25,173,12,241,84,43,2,124,227,142,36,40,151,111,53,19,214,54,126,14,196,117,18,21,11,214,225,160,48,146,20,60,63,37,236,203,21,179,177,93,138,173,113,170,5,165,5,93,169,13,201,97, 198,72,124,145,55,189,0,212,187,176,134,133,183,73,244,144,199,204,34,134,253,165,48,91,175,118,72,206,218,118,173,82,107,60,134,118,113,147,184,89,18,181,84,72,188,12,250,176,167,170,12,126,101,135,131,83,243,17,243,4,122,235,113,107,83,53,141,182,101,11,82,28,28,233,129,47,200,149,230,101,165,114,30,164,83,208,13,52,59,188,36,110,80,195,91,129,65,143,238,10,140,0,228,118,248,132,210,20,121,89,42,165,20,37,106,42,180,187,172,104,40,89,200,153,27,50,195,170,53,114,66,83,76,6,197,10,124,14,116,192,115,47,5,236,27,149,60,88,83,177,183,37,63,202,148,93,122,29,59,228,152,24,134,107,162,90,244,91,62,30,65,19,97,228,70,123,124,89,237,62,214,98,193,170,66,163,194,62,144,108,243,57,98,82,79,164,157,50,90,25,226,169,86,4,248,198,29,73,80,46,219,106,38,172,109,252,28,136,235,36,42,22,172,195,65,97,36,41,120,126,74,216,151,43,102,99,187,20,91,227,84,11,74,11,186,82,27,146,195,212,164,13,43,246,220,215,
106,210,134,21,123,238,171,59,120,13,254,218,252,101,161,202,227,249,181,117,181,183,141,114,33,225,34,69,157,71,128,141,158,20,57,9,43,52,248,214,88,103,25,154,103,0,195,158,170,86,108,176,209,64,146,96,36,81,49,164,169,35,186,213,60,235,76,40,155,31,83,50,200,236,30,126,23,73,82,156,41,199,232,73,171,46,128,219,192,64,27,237,160,57,192,146,182,116,145,90,74,136,104,49,112,75,232,164,97,121,68,9,106,151,39,120,82,101,129,85,207,43,46,106,36,179,193,196,82,81,149,177,165,247,18,80,218,186,205,218,171,174,52,48,28,74,30,65,75,92,7,81,200,179,96,97,32,104,128,156,34,150,82,172,100,144,82,106,172,244,129,74,3,108,213,82,190,130,178,208,98,204,32,114,68,63,214,206,0,39,20,181,227,18,81,57,176,182,244,21,14,109,58,111,145,154,87,123,80,197,122,105,1,248,59,228,236,7,91,148,255,146,246,97,210,72,113,97,140,232,96,105,99,57,218,100,7,43,45,192,110,155,159,242,107,88,61,26,68,20,54,12,34,0,47,102, 119,240,26,252,181,249,203,66,149,199,243,107,235,106,111,27,229,66,194,197,137,58,143,0,27,61,41,114,18,86,104,240,173,177,206,50,52,207,0,134,61,85,165,216,96,163,129,36,193,72,162,98,72,83,63,116,171,121,214,153,80,54,63,166,100,144,217,61,252,46,146,164,56,83,142,209,147,86,93,0,183,129,129,54,218,65,115,128,37,109,233,34,181,148,16,209,98,224,150,208,73,195,242,136,18,212,46,79,240,132,202,2,171,157,87,92,204,72,102,131,137,165,162,42,99,75,239,37,160,180,117,155,181,87,93,105,96,56,148,60,130,150,184,14,162,144,103,193,130,64,208,0,57,69,44,165,88,201,32,165,212,88,233,3,149,6,216,170,165,124,5,101,161,197,152,65,228,136,126,172,157,1,78,40,106,199,37,162,50,96,109,233,43,28,218,116,222,34,53,175,246,160,138,245,210,2,240,119,200,217,15,182,40,255,127,218,135,73,35,197,133,49,162,131,165,141,229,104,147,29,172,180,0,187,109,126,202,175,97,245,104,16,81,216,48,136,0,188,152,37,36,125,164,4,58,71,
9,73,31,41,129,206,81,142,25,197,90,99,52,107,81,238,130,71,89,137,218,232,104,136,3,147,109,200,221,206,219,180,70,109,80,41,74,195,216,1,224,33,85,149,43,131,98,172,117,204,152,55,160,209,70,114,162,18,179,82,2,113,48,144,33,163,60,44,239,211,194,232,104,124,136,242,255,28,225,118,189,68,192,42,101,163,95,145,107,98,47,129,195,145,134,24,237,217,121,74,29,104,168,192,5,223,195,36,5,58,105,97,233,27,129,151,25,21,25,177,144,85,229,78,68,52,11,144,13,228,44,140,195,178,216,93,61,207,210,60,13,151,156,206,159,218,122,145,139,86,2,179,103,152,239,134,217,3,219,68,41,87,4,171,124,205,5,78,45,182,34,179,165,164,189,55,229,75,173,202,122,108,30,162,68,42,234,30,21,118,196,165,80,54,214,196,174,140,45,109,191,182,85,150,74,171,145,1,71,99,118,112,112,159,182,75,94,88,4,63,145,46,95,0,93,147,29,188,165,203,114,90,226,10,11,227,34,54,130,50,148,249,219,122,133,160,233,82,246,150,85,117,20,69,205,80, 57,102,20,107,141,209,172,69,185,11,30,101,37,106,163,163,33,14,76,182,33,119,59,111,211,26,181,65,165,40,13,99,7,128,135,84,85,174,12,138,177,214,49,99,222,128,70,27,201,137,74,204,74,9,196,193,64,134,140,242,176,188,79,11,163,163,241,33,202,255,115,132,219,245,18,1,171,148,141,126,69,174,137,189,4,14,71,26,98,180,103,231,41,117,160,161,2,23,124,15,147,20,232,164,133,165,111,4,94,102,84,100,196,66,86,117,59,17,209,44,64,54,144,179,48,14,203,34,119,245,60,75,243,52,92,114,58,127,106,235,69,46,90,9,204,158,97,190,27,102,15,108,19,165,92,17,172,242,53,23,56,181,216,138,204,150,146,246,222,148,47,181,42,235,177,121,136,18,169,168,123,84,216,17,151,66,217,88,19,187,50,182,180,253,218,86,89,34,173,70,6,28,141,217,193,193,125,218,46,121,97,17,252,76,186,124,1,116,77,118,240,150,46,203,105,137,43,44,140,139,216,8,202,80,230,111,235,21,130,166,75,217,91,86,213,81,20,53,67,137,236,174,31,157,176,12,
34,187,235,71,39,44,67,37,69,22,18,193,108,166,210,158,66,160,120,148,226,236,46,246,106,141,135,89,197,46,177,230,67,243,206,226,16,93,118,142,137,39,100,6,114,215,38,19,2,70,85,205,144,101,30,168,106,0,162,143,37,151,232,144,69,109,222,66,87,1,15,110,161,49,238,14,80,161,71,109,234,147,33,76,131,193,15,5,249,24,89,173,73,235,8,82,201,37,247,73,113,57,247,28,239,50,142,187,88,130,215,102,85,254,88,131,120,113,47,11,25,141,166,200,215,31,218,128,87,21,162,0,83,132,231,176,15,97,216,7,45,108,43,201,53,81,152,166,113,145,242,227,18,227,218,228,225,41,11,66,107,3,199,141,236,32,99,130,82,92,192,107,100,83,221,144,61,154,52,78,191,102,118,24,24,51,119,76,173,148,141,11,10,212,36,186,124,30,149,80,136,27,236,152,207,117,96,25,142,213,136,71,179,158,210,110,70,40,115,164,141,144,161,203,30,104,219,81,114,87,135,44,179,157,186,168,36,44,75,32,75,192,136,201,104,251,208,229,162,76,141,2,32,197,3,96, 149,20,89,72,4,179,153,74,123,10,129,226,81,138,179,187,216,171,53,30,102,21,187,196,154,15,205,59,139,67,116,185,57,38,158,144,25,200,93,155,76,8,24,85,53,67,150,121,160,170,1,136,62,150,92,162,67,22,181,121,11,93,5,60,176,133,198,184,59,64,133,30,181,169,79,134,48,13,6,63,20,228,99,100,181,38,173,35,72,37,151,218,39,197,252,210,115,188,203,56,238,98,9,94,155,85,249,99,13,226,197,189,44,100,52,154,34,223,124,104,3,94,85,136,2,76,17,158,195,62,124,97,31,176,176,173,36,215,68,97,154,198,69,202,143,75,140,107,147,135,167,44,8,173,13,28,55,178,131,140,9,74,113,1,175,145,77,117,67,246,104,210,56,253,154,217,97,96,204,220,49,181,82,54,46,40,80,147,232,178,121,84,66,33,110,176,99,62,215,129,101,56,86,35,30,205,122,74,187,25,161,204,145,54,66,134,46,123,160,109,71,201,93,29,178,204,118,234,162,146,176,44,129,44,1,35,38,163,237,67,151,139,50,53,10,128,20,15,126,81,196,112,86,68,44,131,
20,49,156,21,17,203,32,44,234,157,52,239,233,83,203,188,212,116,99,251,202,72,195,203,220,115,151,178,16,195,177,166,248,5,223,81,37,50,36,175,13,94,208,58,39,158,192,84,50,157,69,226,128,181,155,93,87,17,202,230,29,195,192,85,158,249,153,35,174,157,66,247,60,208,46,36,31,100,152,135,227,48,231,244,69,20,220,152,218,10,229,213,86,215,195,227,128,126,74,176,92,96,172,67,166,8,184,99,233,123,9,141,45,21,48,107,246,32,56,244,132,185,222,137,33,39,158,63,80,225,108,103,243,203,211,67,20,8,82,101,98,247,201,163,50,196,37,248,30,18,61,239,171,116,61,43,84,241,236,3,144,4,16,6,37,162,114,44,171,102,83,99,157,207,113,11,42,114,187,22,197,99,57,197,46,168,247,52,255,26,225,104,18,253,252,11,215,250,84,10,50,220,98,12,13,151,123,10,171,33,41,173,43,95,148,64,11,65,235,168,184,235,172,72,85,78,193,42,25,210,103,209,76,158,97,244,155,210,67,86,114,90,201,12,117,250,142,14,227,133,113,219,227,49,85,100, 176,152,119,210,188,167,79,45,243,82,211,141,237,43,35,13,47,115,207,93,202,66,12,199,154,226,23,124,71,149,200,144,188,54,120,65,235,156,120,2,83,201,116,6,137,3,214,110,118,93,69,40,155,119,12,3,87,121,230,103,142,184,118,10,221,243,64,187,144,124,128,225,50,28,135,57,167,47,162,224,198,212,86,40,175,182,186,30,30,7,244,83,130,229,2,99,29,50,69,192,29,75,223,75,104,108,169,128,89,179,7,193,161,39,204,245,78,12,57,241,252,129,10,103,59,155,95,158,26,162,64,144,42,19,187,79,30,149,33,46,193,247,144,232,121,95,165,235,89,161,138,103,31,128,36,128,48,40,17,149,99,61,53,155,26,235,124,142,91,80,145,219,181,40,30,203,41,118,65,189,167,249,215,8,71,147,232,231,95,184,214,167,82,144,225,22,99,104,184,220,211,87,13,73,105,93,249,162,4,90,8,90,71,197,93,103,69,170,114,10,86,201,144,62,131,102,242,12,163,47,74,15,89,201,105,37,51,212,169,59,58,132,23,198,109,143,199,84,145,17,27,100,224,142,195,127,
196,6,25,184,227,240,223,9,159,16,211,76,171,18,112,150,100,247,146,36,141,251,247,141,218,191,222,76,153,19,24,46,2,174,54,105,20,84,52,105,46,126,42,212,65,46,54,141,44,207,90,85,8,128,5,140,90,77,234,135,102,106,167,117,178,5,227,81,98,139,75,3,22,161,42,50,213,239,102,89,33,179,237,150,77,184,100,155,19,134,137,68,144,170,182,116,65,211,120,165,160,2,11,148,236,32,112,245,205,196,70,234,111,107,235,0,235,59,129,179,114,229,112,152,41,42,193,29,202,90,42,246,7,213,131,17,93,156,215,80,88,243,187,28,197,83,101,110,20,165,179,178,26,137,242,2,50,44,195,2,194,203,194,69,17,1,103,75,206,172,113,110,7,244,209,165,178,102,107,196,61,241,121,89,159,41,241,4,1,173,183,124,77,153,23,149,77,92,89,36,219,192,149,170,70,67,84,74,205,2,175,214,4,248,182,136,216,124,84,71,30,211,100,5,46,202,106,180,67,5,32,22,223,91,198,136,158,6,182,45,48,229,254,168,1,117,58,82,101,153,184,186,159,207,165,161, 39,124,50,76,51,173,74,192,89,146,221,75,146,52,238,223,183,106,255,122,51,101,78,96,184,8,184,218,164,81,80,209,164,185,248,185,80,7,184,216,52,178,60,107,85,33,0,22,48,106,53,169,31,154,169,157,214,201,22,140,71,137,45,46,13,88,132,170,200,84,191,155,101,133,204,182,91,54,225,146,109,78,24,38,18,65,170,218,210,5,77,227,149,130,10,44,80,178,131,192,213,55,19,27,169,191,173,173,3,172,239,4,206,202,149,195,97,166,168,4,119,40,107,169,216,31,84,15,70,116,113,94,67,97,205,239,114,20,79,149,185,81,148,206,202,106,36,202,11,200,176,12,11,8,47,11,23,69,4,156,45,57,179,198,185,29,208,71,115,101,205,214,136,123,226,243,178,62,83,226,9,2,90,111,249,154,50,47,42,155,184,178,72,182,129,43,85,141,134,168,148,154,5,94,173,9,240,109,17,177,249,168,142,58,166,201,10,92,148,213,104,135,10,64,44,190,183,140,17,61,13,108,91,96,202,253,81,3,234,116,164,202,50,113,117,63,159,71,67,89,168,62,129,15,75,166,
44,84,159,192,135,37,211,5,22,98,130,146,146,61,27,85,232,139,212,0,96,105,252,142,1,75,104,179,155,131,144,199,14,244,99,18,160,32,197,83,212,128,38,186,69,187,188,6,252,38,211,209,203,132,57,17,55,58,95,27,161,73,207,190,57,214,80,198,204,192,146,140,75,222,106,157,77,9,39,69,20,128,188,14,211,73,177,200,72,246,179,56,28,7,81,169,8,164,61,188,93,145,204,113,88,157,81,210,15,89,153,152,218,231,209,3,36,170,178,167,205,234,87,235,68,25,151,69,74,2,176,38,204,8,187,87,40,210,163,79,44,26,172,130,162,172,44,120,193,52,7,208,243,74,5,12,41,66,169,43,53,117,120,146,176,135,7,48,85,134,140,76,25,126,242,165,59,57,30,35,101,219,53,114,32,212,89,82,165,235,16,13,151,169,26,49,159,123,37,218,46,25,176,63,210,42,131,204,33,242,135,58,230,58,86,121,240,137,97,145,37,37,40,232,140,44,30,33,197,88,73,130,101,250,101,149,213,37,86,220,56,199,182,181,19,75,158,46,230,101,82,202,225,98,77,103, 11,44,196,4,37,37,123,54,170,208,23,169,1,192,210,248,29,3,150,208,102,55,7,32,143,29,232,199,36,64,65,138,167,168,1,77,116,139,118,121,13,248,77,166,163,151,9,115,34,110,116,174,54,66,147,158,125,115,172,161,140,153,129,37,25,151,188,213,58,155,18,78,138,40,0,121,29,166,147,98,145,145,236,103,113,56,14,162,82,17,72,123,120,187,34,153,227,176,58,163,164,31,178,50,49,181,207,163,7,72,84,101,79,155,213,175,214,137,50,46,139,148,4,96,77,152,17,118,175,80,164,71,159,88,52,88,5,69,89,89,240,130,105,14,160,231,149,10,24,82,132,82,87,106,234,240,36,97,15,15,94,170,12,25,153,50,252,228,75,119,114,60,62,202,182,107,228,64,168,179,164,74,215,33,26,230,169,26,49,191,244,74,180,93,50,96,127,164,85,6,153,67,228,15,117,188,117,172,242,224,19,195,34,75,74,80,208,217,88,60,58,138,177,146,4,203,244,203,42,171,57,86,220,56,199,181,181,19,75,158,46,230,101,82,202,225,98,77,103,5,36,114,224,83,101,204,
5,36,114,224,83,101,204,3,231,42,119,137,202,81,149,54,72,98,142,250,103,196,187,84,113,52,177,220,73,243,210,75,21,55,46,150,38,129,78,53,114,143,167,73,204,27,48,5,229,53,165,42,99,82,176,34,155,19,21,161,245,169,10,165,29,65,103,78,166,50,124,165,196,82,64,114,222,202,212,171,40,89,169,20,41,75,235,121,18,78,234,221,180,161,199,89,54,41,83,13,36,130,142,243,98,210,131,170,216,110,148,71,59,6,196,200,107,126,114,44,171,74,142,213,116,150,87,164,122,147,214,252,214,104,205,106,84,91,85,5,21,165,146,183,252,137,178,168,5,55,76,23,109,146,47,71,167,148,148,139,61,118,248,100,188,42,51,128,118,176,129,69,126,105,247,84,234,193,80,198,146,183,152,57,112,212,232,23,42,51,152,78,57,120,178,164,211,206,64,166,248,56,158,226,242,35,75,86,129,18,168,73,149,179,100,177,110,150,82,150,110,58,175,58,199,76,56,58,21,147,77,177,72,200,162,209,136,96,33,83,100,106,2,57,69,13,27,43,198,15,88,89,91,240,131,155, 3,231,42,119,137,202,81,149,54,72,98,142,250,103,196,187,84,113,52,177,220,73,243,210,75,21,55,46,150,38,129,78,53,114,143,167,73,204,27,48,5,229,53,165,42,99,82,176,34,187,36,42,66,235,83,21,74,59,130,206,156,72,101,248,74,137,165,128,228,188,149,169,87,81,178,82,41,82,150,214,151,73,56,169,119,211,134,30,103,217,164,76,53,144,8,58,206,139,73,15,170,98,187,81,30,237,24,16,35,175,249,201,177,172,42,57,86,211,89,94,145,234,77,90,243,59,163,53,171,81,109,85,21,84,148,74,222,242,39,202,162,22,220,48,93,180,73,190,28,157,82,82,46,246,216,225,147,241,170,204,0,218,193,6,22,249,165,221,83,169,7,67,25,75,222,98,230,192,81,163,95,168,204,96,58,229,224,201,146,78,57,3,153,226,227,120,138,203,143,44,89,5,74,160,38,85,206,146,197,186,89,74,89,186,233,188,234,28,51,225,232,84,76,54,197,34,33,139,70,35,130,133,76,145,169,9,228,20,53,108,172,24,63,96,101,109,193,15,110,70,2,188,142,25,37,94,
145,0,175,99,70,137,215,106,129,8,18,1,232,87,199,74,85,138,118,156,76,171,89,200,166,237,126,174,182,27,227,87,141,135,28,16,133,186,36,38,149,215,33,101,193,153,22,176,70,254,154,207,5,153,90,138,134,195,14,108,107,160,29,141,28,9,127,195,186,7,184,104,103,12,242,254,128,146,193,146,8,81,99,192,162,178,101,152,134,166,141,0,58,203,200,251,234,13,62,144,131,16,130,229,139,97,72,120,97,42,129,246,34,210,3,92,51,70,83,152,26,91,78,14,1,133,198,245,186,128,12,126,53,60,238,42,31,236,15,104,183,233,248,107,70,14,157,126,34,46,240,196,106,89,83,108,12,111,140,94,205,40,22,225,61,91,241,122,88,254,90,245,147,74,197,143,30,161,156,193,2,188,84,15,129,213,138,206,137,11,83,58,99,157,81,46,227,200,158,207,164,152,80,203,74,13,86,146,106,245,227,204,165,55,189,172,203,108,34,145,234,234,77,34,136,209,176,186,21,9,45,99,206,129,160,212,222,135,126,133,78,61,222,29,26,67,237,207,158,184,213,103,79,136,220,181, 171,5,34,72,4,160,95,29,43,85,41,218,113,50,173,102,33,155,182,251,185,218,110,140,95,53,30,114,64,20,234,146,152,84,94,135,148,5,103,90,192,26,249,107,62,23,100,106,41,26,14,59,176,173,129,118,52,114,36,252,13,235,30,224,162,157,49,200,251,3,74,6,75,34,68,141,1,139,202,150,97,26,154,246,1,232,44,35,239,171,55,248,64,14,66,8,150,47,134,33,225,133,169,4,218,139,72,15,112,205,24,77,97,106,108,57,57,4,20,26,215,235,2,50,248,213,240,184,171,124,160,63,160,221,166,99,175,25,57,116,250,137,184,192,147,170,101,77,177,49,188,49,122,53,163,88,132,247,108,197,235,97,249,107,213,79,42,21,63,122,132,114,6,11,240,82,61,4,86,43,58,39,46,76,233,140,117,54,185,140,35,123,62,147,98,66,45,43,53,88,73,170,213,143,51,151,222,244,178,46,179,137,68,170,171,55,137,32,70,195,234,86,36,180,140,57,7,130,82,123,31,250,21,58,245,120,119,104,12,181,63,123,226,86,159,61,33,114,215,6,173,174,98,182,88,140,
65,171,171,152,45,22,35,99,165,82,21,68,197,143,44,238,157,3,33,42,103,234,136,1,207,208,103,170,164,36,61,242,169,116,213,145,62,179,129,46,69,25,16,80,230,170,81,58,70,61,219,178,242,22,28,120,211,53,61,246,146,78,15,37,11,137,12,153,177,178,49,225,214,204,212,207,171,19,66,168,51,105,63,52,151,2,51,76,75,88,240,48,194,101,18,68,25,155,37,146,78,242,40,114,100,43,4,228,86,193,5,225,240,126,25,203,160,175,244,81,51,247,244,22,27,56,139,196,216,55,120,4,141,11,73,166,32,140,148,46,50,175,92,178,236,137,86,181,52,224,159,205,163,90,230,147,83,211,176,65,191,179,247,244,153,75,55,187,20,245,19,31,126,152,236,137,125,89,22,76,89,21,244,101,253,184,223,102,166,249,96,130,25,160,101,18,234,31,201,176,41,21,9,122,22,108,229,208,169,222,224,166,125,33,184,158,132,107,10,202,72,32,34,151,149,47,238,188,70,151,175,57,73,36,32,23,60,166,197,148,182,170,242,174,117,249,140,189,186,209,163,15,63,60,134,135, 140,149,74,85,16,21,63,178,184,119,14,132,168,156,169,35,6,60,67,159,169,146,146,244,200,167,210,85,71,250,204,6,186,20,101,64,64,153,171,70,233,24,245,108,203,202,91,112,224,77,215,244,216,75,58,61,148,44,36,50,100,198,202,198,132,91,51,83,63,175,78,8,161,206,164,253,208,92,10,204,48,45,97,193,195,8,243,36,136,50,54,75,36,157,228,81,228,200,86,8,200,173,130,11,194,225,253,50,150,65,95,233,163,102,238,233,45,54,112,22,137,177,111,240,8,26,23,146,76,65,24,41,93,100,94,153,179,236,137,86,181,52,224,159,205,163,90,230,147,83,211,168,65,191,179,247,244,153,75,55,187,20,245,19,31,126,156,236,137,125,89,22,76,89,21,244,101,253,184,223,94,166,249,96,130,25,160,101,18,234,31,201,176,41,21,9,122,22,108,229,208,169,222,224,166,125,33,184,158,132,107,10,202,72,32,34,151,149,47,238,188,70,151,175,57,73,36,32,23,60,166,197,148,182,170,242,174,117,249,140,189,186,209,163,15,63,62,134,135,81,221,100,244,218,232,145,
81,221,100,244,218,232,145,41,233,53,75,82,18,228,42,196,6,113,74,208,168,216,166,36,255,0,141,203,16,107,94,77,53,16,11,111,215,115,86,201,119,126,86,143,174,42,245,22,156,207,202,3,58,150,196,14,193,44,204,99,20,241,156,113,177,124,13,101,34,3,190,134,101,165,66,26,102,87,86,230,234,231,34,48,3,169,196,159,237,141,88,219,75,65,98,16,26,48,220,96,78,206,150,253,0,98,141,50,36,156,227,103,89,22,128,239,191,144,106,23,216,4,67,178,143,241,148,89,134,217,5,62,233,70,120,72,229,50,8,83,86,77,105,202,150,96,187,145,28,247,72,140,209,78,128,165,134,61,112,4,31,124,80,185,3,19,188,172,80,15,25,36,24,83,152,178,224,51,180,194,65,224,120,85,33,152,150,112,194,29,148,87,37,243,203,42,172,244,73,170,177,184,42,176,109,36,85,219,72,181,117,4,31,31,121,164,157,156,6,139,224,146,15,128,148,149,99,43,205,222,45,157,26,162,223,169,194,8,236,13,214,235,108,253,230,148,51,228,65,64,14,135,116,172,19,201, 41,233,53,75,82,18,228,42,196,198,112,74,208,168,216,166,36,255,0,141,203,16,107,94,77,53,16,11,111,215,115,86,201,119,126,86,143,174,42,245,22,156,207,202,3,58,150,196,14,193,44,204,99,20,241,156,113,177,124,13,101,34,3,190,134,101,165,66,26,102,87,86,230,234,151,34,48,3,169,196,159,237,141,88,219,75,65,98,16,26,48,220,224,146,156,45,251,1,196,26,101,72,56,199,207,178,44,0,223,127,33,213,46,176,9,134,100,31,227,41,179,12,179,11,124,210,141,240,144,202,101,16,166,172,154,210,148,45,193,118,35,57,238,145,24,163,157,0,75,13,123,223,8,62,248,160,114,7,38,120,89,161,30,50,72,48,166,48,101,193,103,104,133,131,192,241,170,66,48,45,225,132,59,40,175,74,230,151,85,88,233,147,84,99,113,85,96,219,72,170,182,145,106,235,8,62,62,242,72,59,57,13,22,193,156,15,128,148,149,99,43,205,222,45,157,26,162,223,169,194,8,236,13,214,235,108,253,230,148,51,228,65,64,14,135,116,172,19,201,85,237,172,58,207,1,198,
85,237,172,58,207,1,198,165,34,37,110,168,228,0,139,75,218,162,37,149,64,84,233,85,68,9,215,179,128,64,13,40,88,138,127,143,37,62,205,7,240,136,41,131,201,164,32,5,131,7,250,225,13,172,161,44,50,213,10,128,203,79,4,11,91,43,212,197,133,174,96,203,224,57,52,143,38,81,35,81,98,73,150,93,120,156,51,174,25,194,191,77,240,171,68,73,168,14,210,41,27,218,225,253,85,217,166,40,152,178,137,167,39,196,22,30,10,75,250,40,158,194,172,115,246,197,28,60,249,162,255,181,232,158,28,98,51,151,186,19,40,222,145,113,211,99,231,49,198,204,113,89,29,114,222,57,172,61,36,43,6,190,124,143,234,225,4,204,184,51,189,58,191,73,207,227,93,173,215,167,176,218,40,89,98,29,33,219,125,101,17,153,117,48,84,185,76,106,149,151,116,254,9,184,148,151,27,49,137,104,155,147,44,89,21,176,192,135,48,58,67,137,129,57,122,95,108,199,112,161,16,105,208,48,247,52,25,107,112,115,120,13,75,217,28,30,177,78,84,219,245,135,100,195,105,36, 165,34,37,110,164,228,0,139,75,218,162,37,149,64,84,233,85,68,9,215,179,128,64,13,40,88,138,127,143,37,62,205,7,240,136,41,131,201,164,32,5,131,7,250,225,13,172,161,44,50,213,10,128,203,79,4,11,91,43,212,197,133,174,96,203,224,57,52,143,38,81,35,81,98,73,150,221,119,156,51,174,25,194,191,77,240,171,68,73,168,14,210,41,27,218,225,253,85,217,158,40,152,178,137,167,39,196,214,29,10,75,250,40,158,194,172,115,246,197,28,60,249,178,255,141,232,158,28,98,19,151,186,19,40,222,145,113,211,91,231,49,198,204,113,89,29,114,222,57,172,61,36,43,6,190,124,143,234,225,4,204,184,51,189,58,191,57,207,227,93,173,215,167,176,218,40,89,98,29,33,219,125,101,17,153,117,48,84,185,76,106,149,115,58,255,4,92,202,203,141,152,68,180,205,73,150,172,10,88,224,67,24,157,161,196,192,37,122,95,108,199,112,161,16,105,208,48,247,52,25,107,112,115,120,13,75,217,28,30,177,78,84,219,245,135,100,195,105,36,195,250,172,165,14,203,64,
195,250,172,165,14,203,64,121,158,7,42,151,88,90,128,166,184,60,177,137,6,205,52,114,27,179,96,134,203,192,37,152,183,23,250,97,170,9,165,84,33,254,162,82,101,152,242,53,71,176,249,72,22,215,152,2,203,93,203,149,82,94,192,38,153,178,70,221,10,117,26,138,198,200,88,122,146,253,106,21,115,224,129,28,35,122,64,189,128,19,174,139,65,151,9,249,133,220,123,76,170,99,229,148,219,81,101,162,120,190,15,45,26,131,169,146,40,14,118,5,254,249,45,98,157,134,212,149,34,22,86,240,68,65,140,233,71,158,14,155,50,82,217,98,192,85,106,1,17,11,157,106,248,221,7,111,92,183,217,193,111,177,26,229,119,48,27,141,134,226,158,140,60,253,214,193,174,15,22,249,253,150,146,113,136,230,165,57,91,236,144,10,187,6,229,201,75,31,164,48,175,47,58,94,219,0,0,229,178,101,93,251,99,174,183,32,203,35,69,220,30,66,207,119,92,102,65,253,1,183,220,194,255,237,170,239,209,190,51,210,236,240,145,114,129,231,88,92,150,171,157,211,182,42,240,51, 121,158,7,42,151,88,90,128,166,184,60,177,137,6,205,52,114,27,179,96,134,203,192,37,152,183,23,250,97,170,9,165,84,33,254,162,82,101,152,242,53,71,176,249,72,22,215,152,2,203,93,203,149,82,94,192,38,153,178,70,221,10,117,26,138,198,200,88,122,146,253,106,21,115,224,129,28,35,122,64,189,128,19,174,139,65,151,9,249,133,220,115,76,170,99,229,148,219,81,101,162,120,190,15,45,26,131,169,146,40,14,118,5,254,249,13,98,157,134,212,149,34,22,86,240,68,65,140,233,71,158,14,155,49,82,217,98,192,85,106,1,17,11,157,106,248,237,7,111,92,183,217,193,111,176,26,229,183,48,27,141,134,226,158,140,60,253,214,193,174,15,22,249,253,150,146,113,136,230,165,57,91,236,144,10,187,6,229,201,75,31,164,48,175,47,58,94,219,0,0,229,178,101,93,251,99,174,183,32,203,35,69,220,30,66,207,119,92,102,65,253,1,183,220,194,255,237,170,239,209,190,51,210,236,240,145,114,129,47,177,184,44,87,59,167,109,85,224,103,32,154,150,15,10,74,116,
16,77,203,7,5,37,186,110,220,133,205,174,180,45,248,210,88,56,42,201,92,49,74,80,28,250,163,121,29,186,80,198,222,214,163,11,221,96,73,4,233,15,182,102,195,184,95,4,29,204,71,95,55,107,70,23,38,92,108,158,43,235,119,156,106,165,230,185,124,168,156,164,121,185,21,47,185,179,157,239,231,56,100,227,15,229,55,1,105,109,218,251,195,44,223,145,149,120,254,152,98,64,118,45,19,70,84,89,223,80,1,12,31,174,70,77,44,177,80,51,77,98,192,0,159,252,93,98,91,42,64,114,189,32,238,85,76,69,171,148,187,101,244,129,58,223,21,224,94,164,166,218,61,10,175,148,246,32,99,30,158,35,225,155,241,17,38,167,40,28,184,93,234,162,193,202,38,31,197,224,34,93,179,111,166,249,240,217,243,150,39,159,80,60,9,225,10,167,10,205,89,35,77,18,244,9,105,167,59,251,131,211,227,243,97,247,248,189,237,47,189,100,91,141,73,80,228,43,224,186,209,136,78,187,223,140,126,211,246,135,30,42,45,233,245,168,208,106,153,244,164,140,112,82,206,98, 221,176,11,155,92,105,91,240,165,177,112,84,146,185,98,148,160,56,244,71,243,58,115,161,140,189,173,55,23,186,193,146,8,210,31,108,205,134,113,191,8,58,152,143,190,110,214,140,46,76,184,216,60,87,214,239,56,213,74,205,115,249,80,57,73,243,114,43,94,114,71,59,223,207,113,200,198,31,202,111,2,210,218,180,247,135,89,190,35,43,241,252,49,197,128,236,90,38,140,168,178,190,161,2,24,62,92,141,154,88,98,161,102,154,196,128,1,62,249,187,196,118,84,128,228,122,65,220,171,152,138,86,41,119,203,232,3,117,190,43,192,189,72,77,181,123,20,94,41,237,65,198,60,60,71,194,55,227,35,76,78,81,56,112,187,212,69,131,149,77,62,138,193,69,186,102,223,76,243,225,179,231,45,79,62,161,120,18,194,21,78,21,154,179,70,154,36,232,19,210,78,119,246,7,167,199,231,195,238,241,123,219,95,122,201,182,26,147,160,200,87,192,117,163,17,157,118,191,25,125,209,246,135,30,42,45,233,245,168,208,106,153,244,164,140,112,82,206,98,56,66,207,31,76,29,153,
56,66,207,31,76,29,153,52,97,70,237,116,191,116,192,152,140,126,99,131,88,195,37,168,74,81,98,172,150,104,11,81,50,182,60,77,81,46,134,195,49,229,160,138,163,244,201,126,231,76,131,19,66,104,60,131,122,58,163,76,159,74,206,149,115,82,85,132,138,91,142,209,84,160,226,21,114,209,41,236,100,29,105,108,4,79,157,82,228,220,17,137,175,49,18,16,12,59,218,153,0,24,87,100,90,46,100,92,0,102,229,34,195,198,45,168,232,40,204,130,13,134,50,167,247,72,61,225,91,130,133,10,93,177,17,2,189,133,252,155,172,96,164,45,221,137,195,156,11,80,3,130,31,183,45,184,161,4,204,135,241,158,136,147,114,49,159,39,193,66,10,58,100,91,58,35,229,201,58,48,14,42,222,51,138,30,237,86,97,241,133,242,184,3,44,43,2,97,242,146,139,13,233,29,36,255,172,129,145,222,39,171,100,186,194,70,108,44,141,84,7,89,61,119,166,27,138,42,152,136,61,209,142,82,106,71,129,227,146,234,104,100,177,20,236,212,150,42,198,5,185,144,113,91,129,76, 52,97,70,237,116,191,116,192,152,140,190,176,65,172,225,18,84,165,40,49,86,75,180,133,40,25,91,158,166,40,23,195,225,152,114,80,197,81,250,100,191,115,166,193,9,33,52,158,65,61,157,81,166,79,37,231,202,57,169,42,66,197,45,199,104,42,80,241,10,185,232,20,118,178,142,52,54,130,167,78,41,114,238,136,196,215,24,9,8,134,29,237,76,0,140,43,50,45,23,50,46,0,179,114,145,97,227,22,84,116,20,102,193,6,67,153,211,123,164,158,240,45,193,66,133,174,216,8,129,222,66,254,77,86,48,210,150,238,196,97,206,5,168,1,193,143,219,22,220,80,2,230,195,120,79,196,73,185,152,207,147,96,33,5,29,178,45,157,145,242,100,29,24,7,21,239,25,69,143,118,171,176,248,66,121,220,1,150,21,129,48,121,201,197,134,244,14,146,127,214,192,72,239,147,85,50,93,97,3,54,150,70,170,115,172,158,59,211,141,68,21,76,196,158,104,71,41,181,163,192,113,73,117,52,178,88,10,118,106,75,21,227,130,92,200,184,173,64,38,84,165,23,22,146,101,219,
168,74,47,44,36,203,182,77,60,23,102,230,198,109,175,3,236,193,215,36,226,127,203,181,88,202,69,24,174,128,233,147,248,119,45,1,114,15,8,50,162,22,76,46,72,234,153,22,118,38,202,66,125,36,244,45,144,102,3,127,52,55,231,49,97,62,149,52,45,67,105,72,171,54,17,113,16,205,58,178,111,252,20,147,97,78,109,41,26,96,229,66,154,96,69,135,110,255,185,178,98,132,234,232,7,157,8,71,61,200,218,221,234,88,139,237,67,17,6,123,70,43,95,148,149,101,95,106,112,29,195,100,33,117,163,139,184,117,47,138,41,152,218,218,67,188,123,107,159,106,32,254,195,95,254,98,90,198,25,134,242,123,199,13,14,143,53,88,192,99,225,114,169,59,169,129,113,63,77,110,50,211,70,13,217,170,61,5,170,68,239,205,238,236,86,105,254,245,84,53,255,122,170,155,184,29,236,241,58,122,251,253,78,255,253,250,118,2,244,244,206,47,59,191,8,254,179,166,21,216,129,101,124,239,249,22,242,125,26,129,225,219,240,71,207,186,161,101,192,227,109,210,19,204,25,104, 38,158,11,51,115,227,182,215,1,246,222,107,18,241,191,225,90,44,229,34,12,87,192,244,73,252,219,150,0,185,7,4,25,81,11,38,23,36,245,76,11,59,19,101,161,62,18,250,22,72,179,129,63,154,155,243,152,48,159,74,154,150,161,52,164,85,155,136,56,136,102,29,217,55,126,138,201,48,167,182,20,13,176,114,33,77,176,162,67,183,253,92,89,49,66,117,244,131,78,132,163,30,100,237,110,117,170,197,182,161,8,131,61,163,149,47,202,202,178,47,53,184,142,97,178,144,186,209,69,220,186,23,197,20,76,109,237,33,222,189,181,79,53,16,255,225,207,127,54,45,227,12,67,249,189,227,6,135,199,26,44,224,177,112,185,212,157,212,192,184,159,38,55,153,105,163,134,108,213,158,2,85,162,247,102,119,118,171,52,255,122,170,154,127,61,213,77,220,14,246,120,29,189,253,126,167,255,126,125,59,1,122,122,231,215,157,95,5,255,89,211,10,236,192,50,190,247,124,11,249,62,141,192,240,109,248,163,103,221,208,50,224,241,54,233,9,230,12,180,105,127,48,23,75,163,31,
211,254,96,46,150,70,63,104,221,72,174,77,152,102,185,222,225,105,25,164,159,217,212,138,253,222,180,59,231,64,198,209,117,137,5,227,99,169,79,251,137,203,68,107,242,138,153,110,78,243,225,136,163,15,181,0,226,38,240,54,120,205,204,188,221,222,172,169,153,189,142,135,232,111,102,143,231,116,179,250,188,102,103,62,120,27,247,61,107,196,97,73,88,45,229,73,173,147,53,45,59,115,132,134,130,13,168,10,148,97,205,115,89,180,123,107,59,51,211,254,27,52,178,61,154,62,13,166,91,79,186,109,212,84,74,93,133,210,104,151,116,91,51,69,134,179,196,217,100,194,184,25,205,233,112,230,35,101,211,78,103,246,180,15,211,244,204,30,241,97,250,159,217,35,62,72,43,52,123,192,135,232,138,230,140,247,48,13,210,42,196,191,97,163,52,27,196,135,233,153,102,143,56,220,188,125,154,71,255,205,157,212,140,205,179,166,145,154,143,189,59,55,84,115,38,112,187,169,57,252,190,89,99,53,216,180,75,224,12,111,201,15,208,102,205,30,81,29,42,82,177,95,52,251,74,71, 181,110,36,215,38,76,179,92,239,240,180,12,210,207,108,106,197,126,111,218,157,115,32,227,232,186,196,130,241,177,212,167,253,196,60,209,154,188,98,166,155,211,124,56,226,232,67,45,128,184,9,188,13,94,51,51,111,183,55,107,106,102,175,227,33,250,155,217,227,57,221,172,62,175,217,153,15,222,198,125,207,26,113,88,18,86,75,121,82,235,100,77,203,206,28,161,161,96,3,170,2,101,88,243,92,22,237,222,218,206,204,180,253,6,141,108,143,166,79,131,233,214,147,110,27,53,149,82,87,161,52,218,37,221,214,76,145,225,44,113,54,153,48,110,70,115,58,156,249,72,217,180,211,153,61,237,195,52,61,179,71,124,152,254,103,246,136,15,210,10,205,30,240,33,186,162,57,227,61,76,131,180,10,241,111,216,40,205,6,241,97,122,166,217,35,14,55,111,159,230,209,127,115,39,53,99,243,172,105,164,230,99,239,206,13,213,156,9,220,110,106,14,191,111,214,88,13,54,109,14,156,225,45,249,1,218,172,217,35,170,67,69,42,246,139,102,95,233,104,84,140,60,107,17,42,211,
163,98,228,89,139,80,153,46,119,40,117,152,70,157,4,48,109,16,188,181,234,250,15,246,178,2,174,79,138,175,40,138,106,143,87,157,157,250,228,232,147,62,204,117,94,143,251,149,202,108,178,67,0,143,57,76,151,63,80,111,57,159,112,80,20,162,135,153,232,140,171,46,41,179,235,255,169,2,173,161,225,156,43,187,236,21,127,70,235,57,71,88,223,183,11,157,54,231,27,86,234,53,163,179,58,149,185,29,233,26,27,209,185,43,221,176,39,157,61,152,231,135,148,4,113,175,230,116,14,253,109,222,167,206,30,206,148,220,108,212,186,206,167,148,187,117,177,171,72,186,141,186,217,57,4,118,247,198,118,229,217,43,231,188,129,191,145,101,218,231,206,125,238,168,32,204,52,187,115,80,68,61,116,212,137,84,39,210,232,251,211,86,123,67,191,23,158,67,20,15,210,22,175,98,12,223,222,33,207,223,194,55,232,26,160,213,94,90,113,101,162,21,137,220,54,13,171,253,117,181,223,98,67,210,28,197,214,69,174,55,120,172,76,219,117,184,38,216,66,74,109,90,209,8,52,192, 229,14,165,14,211,168,147,0,166,13,130,183,86,93,255,193,94,86,192,245,73,241,21,69,81,237,241,170,179,83,159,28,125,210,135,185,206,235,109,191,82,153,77,118,8,224,49,135,233,242,7,234,45,231,19,14,138,66,244,48,19,157,113,213,37,101,118,253,63,85,160,53,52,156,115,101,151,189,226,207,104,61,231,8,235,251,118,161,211,230,124,195,74,189,102,116,86,167,50,183,35,93,99,35,58,119,165,27,246,164,179,7,243,252,144,146,32,238,213,156,206,161,191,205,251,212,217,195,153,146,155,141,90,215,249,148,114,183,46,118,21,73,183,81,55,59,135,192,238,222,216,174,60,123,229,156,55,240,55,178,76,251,220,185,207,29,21,132,153,102,119,14,138,168,135,142,58,145,234,68,26,125,127,218,106,111,232,247,194,115,136,226,65,218,226,85,140,225,219,59,228,249,91,248,6,93,3,180,218,75,43,174,76,180,34,145,219,166,97,181,191,174,246,91,108,72,154,163,216,186,200,245,6,143,149,105,187,14,215,4,91,72,169,77,43,26,129,6,184,203,152,150,45,126,187,239,
93,198,180,108,241,219,125,127,199,30,175,17,26,150,33,110,22,216,118,205,126,92,238,207,228,223,154,250,33,251,52,72,117,225,176,41,47,169,108,142,84,105,66,109,97,84,27,91,204,148,177,24,158,98,0,42,47,235,18,120,199,57,172,24,198,236,172,250,220,73,231,242,2,221,65,163,116,22,35,183,176,176,206,15,84,39,35,52,189,5,101,103,12,175,174,152,79,45,219,251,205,76,28,248,90,5,120,56,42,216,56,227,98,60,174,152,189,65,234,99,254,34,65,61,150,249,13,53,54,179,207,48,97,19,5,118,11,2,215,23,80,149,9,120,108,19,19,60,43,187,7,244,177,10,34,121,6,69,96,217,78,156,36,114,172,8,237,253,59,122,144,18,3,188,204,140,86,237,204,86,81,153,238,78,4,32,236,146,203,132,91,107,232,94,61,129,79,187,180,76,171,36,186,204,250,154,211,104,46,37,6,96,46,124,204,11,148,189,48,37,119,125,205,74,82,71,155,6,136,212,58,49,26,242,17,140,197,152,202,22,84,67,68,151,182,203,174,23,51,87,188,59,203,115,3,15, 239,216,227,53,66,195,50,196,205,2,219,174,217,143,203,253,133,252,91,83,63,100,159,6,169,46,28,54,229,37,149,205,145,42,77,168,45,140,106,99,139,153,50,22,195,83,12,64,229,101,93,2,239,56,135,21,195,152,157,85,159,59,233,92,94,160,59,104,148,206,98,228,22,22,214,249,129,234,100,132,166,183,160,236,140,225,213,21,243,169,101,123,191,153,137,3,95,171,0,15,71,5,27,103,92,140,199,21,179,55,72,125,204,95,36,168,199,50,191,161,198,102,246,25,38,108,162,192,110,65,224,250,2,170,50,1,143,109,98,130,103,101,247,128,62,86,65,36,207,160,8,44,219,137,147,68,142,21,161,189,127,71,15,82,98,128,151,153,209,170,157,217,42,42,211,221,137,0,132,93,50,79,184,181,134,238,213,19,248,180,75,203,180,74,162,203,172,175,57,141,230,82,98,0,230,194,199,188,64,217,11,83,114,215,215,172,36,117,180,105,128,72,173,19,163,33,31,193,88,140,169,108,65,53,68,116,105,187,236,122,49,115,197,187,179,60,55,240,112,75,222,9,133,32,200,115,
183,228,157,80,8,130,60,167,211,202,234,180,95,19,221,233,226,44,29,159,65,122,65,153,97,145,75,203,66,185,15,130,61,103,77,198,173,164,207,105,200,103,69,236,76,56,215,169,201,90,37,163,170,214,90,38,38,67,113,17,85,168,128,138,82,15,168,67,140,182,100,120,231,25,169,186,171,162,178,177,129,228,83,187,236,112,65,225,54,3,141,170,151,3,166,200,173,32,178,135,55,67,32,69,108,21,114,235,24,106,130,153,189,88,157,132,41,139,31,41,246,63,149,203,84,185,3,54,148,220,105,137,182,129,218,202,232,151,84,17,212,24,240,61,11,45,161,230,213,7,122,163,149,136,207,77,27,31,45,50,111,11,196,58,229,244,21,203,210,217,132,250,117,170,120,6,125,105,105,36,208,39,145,107,72,148,21,143,78,40,137,50,31,212,46,74,151,207,216,67,91,174,119,189,65,24,234,30,129,28,185,50,165,170,58,219,141,252,189,245,78,90,199,80,81,246,169,220,166,170,80,169,68,22,130,76,117,227,201,140,23,2,163,205,65,107,96,141,43,31,239,199,72,166,17,222, 58,173,172,78,251,53,209,157,46,206,210,241,25,164,23,148,25,22,185,180,44,148,251,32,216,115,214,100,220,74,250,156,134,124,86,196,206,132,115,157,154,172,85,50,170,106,173,101,98,50,20,23,81,133,10,168,40,245,128,58,196,104,75,134,119,158,145,170,187,42,42,27,27,72,62,181,203,14,23,20,110,51,208,168,122,57,96,138,220,10,34,123,120,51,4,82,196,86,33,183,142,161,38,152,217,139,213,73,152,178,248,145,98,255,83,185,76,149,59,96,67,201,157,150,104,27,168,173,140,126,73,21,65,141,1,223,179,208,18,106,94,125,160,55,90,137,248,220,180,241,209,34,243,182,64,172,83,78,95,177,44,157,77,168,95,167,138,103,208,151,150,70,2,125,18,185,134,68,89,241,232,132,146,40,243,65,237,162,116,249,140,61,180,229,122,215,27,132,161,238,17,200,145,43,83,170,170,179,221,200,223,91,239,164,117,12,21,101,159,202,109,170,10,149,74,100,33,200,84,55,158,204,120,33,48,218,37,104,13,172,113,229,227,253,24,201,52,194,155,199,153,42,22,84,239,86,
60,206,84,177,160,122,183,34,245,164,81,20,193,132,228,202,172,136,237,142,79,38,148,133,29,62,135,58,83,31,26,115,217,149,122,100,62,69,168,201,48,152,19,100,232,58,169,221,90,168,164,133,187,41,235,180,209,231,247,228,181,65,170,107,207,43,196,25,102,36,34,10,133,97,230,70,159,21,98,61,197,250,123,82,170,37,71,96,214,53,146,85,146,114,244,200,109,54,171,59,152,101,238,67,124,116,215,177,199,192,90,100,145,192,77,239,184,83,130,223,92,203,114,255,169,182,7,191,66,240,83,58,188,224,236,3,157,153,205,241,250,34,106,229,227,39,78,26,176,126,146,228,101,21,6,6,220,117,101,21,135,20,180,119,195,101,88,119,49,238,234,25,156,123,54,113,70,212,220,9,167,58,71,128,89,84,15,29,135,179,239,151,255,64,66,122,144,142,202,62,162,158,120,183,227,117,204,161,79,175,165,178,113,44,52,238,200,166,245,148,195,253,26,43,155,34,64,246,190,194,79,210,161,119,46,13,252,172,238,203,250,234,179,219,119,112,139,242,199,42,211,61,122,100,231,203, 164,158,52,138,34,152,144,92,153,21,177,221,241,201,132,178,176,195,231,80,103,234,67,99,46,187,82,143,204,167,8,53,25,6,115,130,12,93,39,181,91,11,149,180,112,55,101,157,54,250,252,158,188,54,72,117,237,121,133,56,195,140,68,68,161,48,204,220,232,179,66,172,167,88,127,79,74,181,228,8,204,186,70,178,74,82,142,30,185,205,102,117,7,179,204,125,136,143,238,58,246,24,88,139,44,18,184,233,29,119,74,240,155,107,89,238,63,213,246,224,87,8,126,74,135,23,156,125,160,51,179,57,94,91,68,173,124,252,196,73,3,214,79,146,188,172,194,192,128,187,174,172,226,144,130,246,110,184,12,235,46,198,93,61,131,115,207,38,206,136,154,187,224,84,231,8,48,139,234,161,227,112,246,253,242,31,72,72,15,210,81,217,71,212,19,239,86,188,142,57,244,233,181,84,54,142,133,198,29,217,180,158,114,184,95,99,101,83,4,200,222,87,248,73,58,244,206,165,129,159,213,125,89,95,121,118,251,14,110,81,254,88,101,186,71,143,236,124,217,232,209,118,187,218,11,216,
70,143,182,219,213,94,192,142,13,179,166,45,112,197,247,135,7,74,230,82,93,82,76,111,46,206,177,24,28,151,162,75,197,24,176,176,211,147,247,128,30,238,68,192,37,197,68,199,49,184,93,232,106,71,43,109,64,177,205,88,53,204,156,117,168,188,112,145,113,61,126,169,58,29,56,8,136,109,146,135,216,66,166,52,205,214,202,190,209,163,99,189,234,117,189,174,43,228,165,206,203,59,178,128,160,52,181,162,181,132,96,42,23,25,227,21,1,231,230,101,220,237,176,154,102,31,151,80,52,54,205,118,105,223,238,159,45,238,214,43,219,158,196,217,220,7,105,155,237,152,128,240,53,66,7,27,135,23,176,209,249,176,251,247,212,118,67,240,159,219,94,187,129,86,240,230,90,147,74,80,117,22,247,236,98,228,40,203,91,27,26,149,74,168,185,143,145,195,236,15,208,210,200,197,224,195,116,55,114,125,181,250,70,71,183,197,37,31,160,107,185,203,13,155,53,48,183,199,42,61,78,211,37,53,243,25,168,161,183,185,213,215,220,97,6,231,66,151,207,237,114,238,70,64,28,112, 177,97,214,180,5,174,248,254,240,64,201,92,170,75,138,233,205,197,57,22,131,227,82,116,169,24,3,22,118,122,242,30,208,195,157,8,184,164,152,232,56,6,183,11,93,237,104,165,13,40,182,25,171,134,153,179,14,149,23,46,50,174,199,47,85,167,3,7,1,177,77,242,16,91,200,148,166,217,90,217,55,122,116,172,87,189,174,215,117,133,188,212,121,121,71,22,16,148,166,86,180,150,16,76,229,34,99,188,34,224,220,188,140,187,29,86,211,236,227,18,138,198,166,217,46,237,219,253,179,197,221,122,101,219,147,56,155,251,32,109,179,29,19,16,190,70,232,96,227,240,2,54,58,31,118,255,158,218,110,8,254,115,219,107,55,208,10,222,88,107,82,9,170,206,226,158,93,140,28,101,121,107,67,163,82,9,53,247,49,114,152,253,1,90,26,185,24,124,152,238,70,174,175,86,223,232,232,182,184,228,3,116,45,119,185,97,179,6,230,246,88,165,199,105,186,164,102,62,3,53,244,54,183,250,154,59,204,224,92,232,242,185,93,206,221,8,136,3,142,223,240,60,215,69,255,51,
252,134,231,185,46,250,159,185,80,99,157,17,222,36,231,211,174,62,23,17,230,168,128,238,220,4,93,143,139,117,49,62,81,152,135,76,9,191,99,208,217,175,122,85,16,238,167,221,246,231,180,79,215,130,214,13,221,213,178,221,61,91,170,251,25,173,207,236,174,238,160,235,1,26,173,215,201,141,77,122,174,187,129,117,187,184,221,78,71,88,69,181,141,13,214,107,244,95,147,84,216,184,221,186,79,132,155,119,94,119,60,13,217,24,1,220,107,223,163,253,186,167,234,149,242,117,216,251,142,157,216,143,237,40,147,102,15,39,66,181,113,83,118,7,165,27,247,103,247,241,38,4,216,119,40,134,221,182,202,20,143,87,77,224,232,160,191,111,172,53,237,131,16,227,237,50,223,90,30,93,228,220,166,153,164,185,215,187,95,144,245,32,173,223,171,80,78,106,161,84,157,220,45,27,195,239,198,142,112,250,32,62,64,71,246,42,128,211,109,234,137,34,192,92,224,168,171,105,137,174,80,168,137,216,178,172,141,241,94,177,47,233,88,5,119,225,83,71,199,120,97,89,177,228,67,6, 23,106,172,51,194,155,228,124,218,213,231,34,194,28,21,208,157,155,160,235,113,177,46,198,39,10,243,144,41,225,119,12,58,251,85,175,10,194,253,180,219,254,156,246,233,90,208,186,161,187,90,182,187,103,75,117,63,163,245,153,221,213,29,116,61,64,163,245,58,185,177,73,207,117,55,176,110,23,183,219,233,8,171,168,182,177,193,122,141,254,107,146,10,27,183,91,247,137,112,243,206,235,142,167,33,27,35,128,123,237,123,180,95,247,84,189,82,190,14,123,223,177,19,251,177,29,101,210,236,225,68,168,54,110,202,238,160,116,227,254,236,62,222,132,0,251,14,197,176,219,86,153,226,241,170,9,28,29,244,247,141,181,166,125,16,98,188,93,230,91,203,163,139,156,219,52,147,52,247,122,247,11,178,30,164,245,123,21,202,73,45,148,170,147,187,101,99,248,221,216,17,78,31,196,7,232,200,94,5,112,186,77,61,81,4,152,11,28,117,53,45,209,21,10,53,17,91,150,181,49,222,43,246,37,29,171,224,46,124,234,232,24,47,44,43,150,124,200,96,172,111,156,240,189,134,82,
99,125,227,132,239,53,148,106,163,50,30,110,128,130,174,101,91,17,24,129,66,35,225,146,106,212,116,190,240,70,55,156,209,239,248,227,81,232,236,58,185,66,93,158,235,6,214,101,218,62,16,151,73,50,197,243,105,120,197,236,108,134,117,237,216,42,57,54,249,252,86,101,68,158,144,51,83,222,242,202,19,227,5,29,0,35,238,180,240,87,139,189,150,179,0,160,77,12,25,169,115,113,170,105,187,58,215,201,37,157,124,144,156,207,55,85,128,203,51,211,87,133,155,200,101,100,129,2,177,207,138,198,44,22,152,235,78,213,133,181,231,100,92,88,97,14,84,182,36,119,126,46,168,86,41,73,56,169,238,3,18,24,48,180,189,97,90,249,220,200,40,26,237,144,177,234,117,61,175,6,77,105,168,18,193,110,139,55,171,177,233,222,84,31,24,213,129,198,184,66,10,214,56,163,29,67,163,54,117,51,49,147,141,172,77,78,243,51,210,140,63,226,88,183,46,8,34,211,22,127,29,57,132,170,204,143,145,231,143,134,184,116,231,83,180,80,135,243,6,255,103,184,73,159,123,199, 109,84,198,195,13,80,208,181,108,43,2,35,80,104,36,204,169,70,77,231,11,111,116,195,25,253,142,63,30,133,206,174,147,43,212,229,185,110,96,93,166,237,3,49,79,146,41,158,79,195,43,102,103,51,172,107,199,86,201,177,201,231,183,42,35,242,132,156,153,242,150,87,158,24,47,232,0,24,113,167,133,191,90,236,181,156,5,0,109,98,200,72,157,139,83,77,219,213,185,78,46,233,228,131,228,124,190,169,2,92,158,153,190,42,220,68,46,35,11,20,136,125,86,52,102,177,192,92,119,170,46,172,61,39,227,194,10,115,160,178,37,185,243,75,65,181,74,73,194,73,117,31,144,192,128,161,237,13,211,202,231,70,70,209,104,135,140,85,175,235,121,53,104,74,67,149,8,118,91,188,89,141,77,247,166,250,192,168,14,52,198,21,82,176,198,25,237,24,26,181,169,155,137,153,108,100,109,114,154,159,145,102,252,17,199,186,117,65,16,153,182,248,235,200,33,84,101,126,140,60,127,52,196,165,59,159,162,133,58,156,55,248,63,195,77,250,220,59,94,197,6,45,239,181,254,242,
171,216,160,229,189,214,95,190,222,222,172,251,189,151,71,219,180,17,190,99,201,111,220,19,191,65,59,155,236,227,189,219,227,55,187,5,159,217,41,191,18,62,223,164,105,190,61,216,131,244,207,247,10,132,26,104,251,1,122,233,123,134,254,230,109,245,29,84,108,214,97,223,117,106,214,53,219,95,107,113,111,216,109,191,38,230,105,162,229,198,51,93,215,120,95,61,228,55,222,119,147,182,155,247,224,175,100,249,215,181,227,247,53,222,87,165,101,159,44,243,178,221,154,103,83,217,217,213,187,148,102,55,29,153,96,67,138,155,240,216,39,22,245,62,10,62,11,237,243,168,85,233,199,135,127,238,238,3,98,129,83,165,202,139,194,38,214,227,107,151,87,142,100,202,237,29,137,110,47,213,107,103,9,246,4,153,153,177,188,177,14,213,146,25,231,151,238,59,114,238,118,96,40,106,11,91,37,49,104,109,89,116,168,90,84,151,158,202,170,77,27,36,5,176,85,137,140,41,188,67,214,14,108,14,154,6,4,186,76,223,87,59,153,65,126,99,25,98,60,81,231,33,245,24,170,39, 245,246,102,221,239,189,60,218,166,141,240,29,75,126,227,158,248,13,218,217,100,31,239,221,30,191,217,45,248,204,78,249,149,240,249,38,77,243,237,193,30,164,127,190,87,32,212,64,219,15,208,75,223,51,244,55,111,171,239,160,98,179,14,251,174,83,179,174,217,254,90,139,123,195,110,251,53,49,79,19,45,55,158,233,186,198,251,234,33,191,241,190,155,180,221,188,7,127,37,203,191,174,29,191,175,241,190,46,45,251,100,153,151,237,214,60,155,202,206,174,222,165,52,187,233,200,4,27,82,220,132,199,62,177,168,247,81,240,89,104,159,71,173,74,63,62,252,115,119,31,16,11,156,42,85,94,20,54,177,30,95,187,188,114,36,83,110,239,72,116,123,169,94,59,75,176,39,200,204,140,229,141,117,168,150,204,56,191,116,223,145,115,183,3,67,81,91,216,42,137,65,107,203,162,67,213,162,186,244,84,86,109,218,32,41,128,173,74,100,76,225,29,178,118,96,115,208,52,32,208,101,250,190,218,201,12,242,27,203,16,227,137,58,15,169,199,80,61,169,201,148,42,105,64,139,178,
53,153,82,37,13,104,81,22,166,88,229,148,154,180,82,5,126,126,56,187,243,134,57,25,151,200,169,7,200,208,98,162,222,18,218,121,37,223,223,107,200,203,224,42,117,174,0,88,91,232,175,28,240,48,211,71,152,140,30,213,181,104,68,244,90,241,113,18,103,234,11,5,55,166,69,28,227,184,11,250,20,202,109,222,226,215,235,99,75,190,28,179,174,151,116,112,239,150,129,124,222,213,27,78,53,193,38,183,112,232,107,13,92,61,249,32,119,106,56,209,238,141,175,215,112,70,187,231,13,15,77,27,90,211,1,254,126,61,223,157,112,207,3,180,127,119,88,234,150,78,240,220,246,84,247,186,183,44,115,207,118,240,173,198,123,181,136,247,195,161,27,116,139,247,145,255,180,45,58,46,31,154,252,108,156,120,76,82,105,182,90,23,38,228,162,140,48,115,142,166,176,237,229,155,25,227,149,106,66,163,78,150,78,61,22,181,115,147,20,225,205,116,6,182,161,224,192,100,234,116,223,62,135,94,185,22,12,171,8,179,36,82,199,249,140,208,241,83,119,174,6,111,249,33,186,92, 48,197,42,167,212,164,149,42,240,243,195,217,157,55,204,201,184,68,78,61,64,134,22,19,245,150,208,206,43,249,254,94,67,94,6,87,169,115,5,192,218,66,127,229,128,135,153,62,194,100,244,168,174,69,35,162,215,138,143,147,56,83,95,40,184,49,45,226,24,199,93,208,167,80,110,243,22,191,89,31,91,242,229,152,117,189,164,131,123,183,12,228,243,174,222,112,170,9,54,185,133,67,95,107,224,234,201,7,185,83,195,137,118,111,124,189,134,51,218,61,111,120,104,218,208,154,14,240,247,235,249,238,132,123,30,160,253,187,195,82,183,116,130,231,182,167,186,215,189,101,153,123,182,131,111,53,222,171,69,188,31,14,221,160,91,188,143,252,167,109,209,113,249,208,228,103,227,196,99,146,74,179,213,186,48,33,23,101,132,153,115,52,133,109,47,223,204,24,175,84,19,26,117,178,116,234,177,168,157,155,164,8,111,166,51,176,13,5,7,38,83,167,251,246,57,244,202,181,96,88,69,152,37,145,58,206,103,132,142,159,186,115,53,120,203,15,209,229,218,77,5,199,62,194,110,98,
187,169,224,216,71,216,77,76,37,42,238,109,169,152,170,166,200,212,241,173,95,90,5,141,14,113,112,139,24,239,26,14,45,94,131,154,218,55,35,42,203,147,120,181,201,122,181,239,126,56,116,187,229,20,55,212,3,95,45,24,50,53,33,94,229,94,137,214,134,220,144,147,117,208,162,250,25,55,22,211,77,216,103,190,209,169,107,154,238,144,138,166,51,92,183,110,1,125,181,192,94,32,88,193,161,68,142,85,153,84,209,241,97,230,104,71,199,213,179,101,157,14,155,115,60,149,11,25,154,138,23,107,200,212,147,36,110,202,132,73,221,65,96,153,51,82,71,59,49,103,132,177,156,242,72,30,242,48,5,159,209,33,178,98,156,236,236,55,112,43,38,122,157,117,242,249,32,243,50,206,166,46,11,177,142,20,12,231,30,226,64,211,97,9,72,121,28,129,227,143,26,74,58,211,205,37,83,116,118,112,166,27,85,97,11,186,102,93,99,110,211,41,15,208,240,134,82,90,47,6,111,38,165,140,5,134,3,22,160,115,241,242,38,191,174,2,136,171,152,208,121,246,40,88,33,239, 42,81,113,111,75,197,84,53,69,166,142,111,253,210,42,104,116,136,131,91,196,120,215,112,104,241,26,212,212,190,25,81,89,158,196,171,77,214,171,125,247,195,161,219,45,167,184,161,30,248,106,193,144,169,9,241,42,247,74,180,54,228,134,156,172,131,22,213,207,184,177,152,110,194,62,243,141,78,93,211,116,135,84,52,157,225,186,117,11,232,171,5,246,2,193,10,14,37,114,172,202,164,138,142,15,51,71,59,58,174,158,45,235,116,216,156,227,169,92,200,208,84,188,88,67,166,158,36,113,83,38,76,234,14,2,203,156,145,58,218,137,57,35,140,229,148,71,242,144,135,41,248,140,14,145,21,227,100,103,191,129,91,49,209,235,172,147,207,7,153,151,113,54,117,89,136,117,164,96,120,233,33,14,52,29,150,128,148,199,17,56,254,168,161,164,51,221,92,50,69,103,7,103,186,81,21,182,160,107,214,53,230,54,157,242,0,13,111,40,165,245,98,240,102,82,202,88,96,56,96,1,58,23,47,111,242,235,42,128,184,138,9,157,103,143,130,21,242,62,231,144,72,147,36,169,138,
115,14,137,52,73,146,170,168,94,182,160,156,111,48,73,147,204,250,34,140,177,203,143,163,179,76,249,196,22,250,166,248,51,249,180,228,70,131,188,2,53,117,153,243,177,58,21,14,181,210,132,188,12,103,184,144,153,201,174,147,108,85,60,115,222,121,182,81,169,172,22,19,97,22,125,249,146,147,111,137,52,12,228,22,41,160,145,104,145,49,229,165,61,137,81,163,42,184,122,142,131,96,40,70,61,11,236,89,99,17,192,105,174,58,10,182,124,178,90,35,226,204,201,252,53,106,185,145,23,215,36,91,158,57,44,133,87,160,200,38,52,153,208,26,102,94,234,86,236,158,130,80,123,164,142,44,152,164,184,98,52,211,162,189,162,87,153,183,154,88,224,25,104,124,165,33,84,19,77,237,45,26,187,79,165,140,76,34,142,106,159,88,71,215,168,232,251,171,44,193,199,66,168,77,121,69,69,219,40,107,208,58,173,170,209,175,80,91,99,145,235,253,226,220,30,117,184,246,179,97,229,190,114,193,173,99,229,218,69,12,94,37,9,219,230,100,255,74,58,155,149,220,240,57,98,62, 234,101,11,202,249,6,147,52,201,172,47,194,24,187,252,56,58,203,148,79,108,161,111,138,63,147,79,75,110,52,200,43,80,83,243,156,143,213,169,112,168,149,38,228,101,56,195,133,204,76,118,157,100,171,226,153,243,206,179,141,74,101,181,152,8,179,232,203,151,156,124,75,164,97,32,183,72,1,141,68,139,140,41,47,237,73,140,26,85,193,213,115,28,4,67,49,234,89,96,207,26,139,0,78,115,213,81,176,229,147,213,26,17,103,78,230,175,81,203,141,188,184,38,217,242,204,97,41,188,2,69,54,161,201,132,214,48,243,82,183,98,247,20,132,218,35,117,100,193,36,197,21,163,153,22,237,21,189,202,188,213,196,2,207,64,227,43,13,161,154,104,106,111,209,216,125,42,101,100,18,113,84,251,196,58,186,70,69,223,95,101,9,62,22,66,109,202,43,42,218,70,89,131,214,105,85,141,126,133,218,26,139,92,239,23,231,246,168,195,181,159,13,43,247,149,11,110,29,43,215,46,98,240,42,73,216,54,39,251,87,210,217,172,228,134,207,17,243,249,56,116,251,188,88,218,28,
31,135,110,159,23,75,187,4,222,102,11,148,123,190,140,139,75,170,195,175,230,249,214,166,91,205,9,71,63,21,198,168,46,115,214,78,90,74,45,181,142,19,67,85,59,194,103,44,204,17,89,123,207,116,212,149,214,231,104,232,166,216,163,125,138,82,133,200,27,111,160,237,149,128,58,252,89,176,185,78,28,69,49,119,190,190,215,106,52,171,29,118,43,154,162,111,215,242,22,91,73,211,235,45,52,75,164,62,216,24,17,166,251,56,48,147,193,65,116,10,170,96,162,221,149,29,169,213,212,158,170,167,21,35,53,172,145,207,245,25,40,249,218,69,47,131,156,91,7,144,215,230,95,203,171,240,204,6,223,226,46,250,9,137,181,222,99,5,55,229,185,39,157,164,170,73,105,82,121,245,141,76,165,161,38,3,220,214,45,55,60,250,163,213,59,161,219,84,206,80,21,251,142,189,203,2,210,31,208,23,66,173,26,124,85,81,98,73,54,127,192,170,160,35,170,177,117,136,170,182,115,188,61,235,100,110,205,136,124,148,216,58,43,106,179,31,233,127,125,144,215,18,161,38,239,227, 120,155,45,80,238,249,50,46,230,84,135,95,205,243,173,77,183,154,19,142,126,42,140,81,93,230,172,157,180,148,90,106,29,39,134,170,118,132,207,88,152,35,178,246,158,233,168,43,173,207,209,208,77,177,71,251,20,165,10,145,55,222,64,219,43,1,117,248,179,96,115,157,56,138,98,238,124,125,175,213,104,86,59,236,86,52,69,223,174,229,45,182,146,166,215,91,104,150,72,125,176,49,34,76,247,113,96,38,131,131,232,20,84,193,68,187,43,59,82,171,169,61,85,79,43,70,106,88,35,159,235,51,80,242,181,139,94,6,57,183,14,32,175,205,191,150,87,225,153,13,190,197,93,244,19,18,107,189,199,10,110,202,115,79,58,73,85,147,210,164,242,234,27,153,74,67,77,6,184,173,91,110,120,244,71,171,119,66,183,169,156,161,42,246,29,123,151,5,164,63,160,47,132,90,53,248,170,162,196,146,108,254,128,85,65,71,84,99,235,16,85,109,231,120,123,214,201,220,154,17,249,40,177,117,86,212,102,63,210,255,250,32,175,37,66,77,222,199,31,208,66,138,87,84,232,167,
15,104,33,197,43,42,244,83,194,20,212,227,251,8,248,136,104,146,84,70,51,34,129,224,196,224,190,57,30,60,151,101,37,20,197,189,117,169,90,166,242,237,97,165,172,18,255,56,134,0,93,37,173,90,36,97,48,1,109,95,213,115,85,159,53,102,45,109,229,224,42,32,150,61,82,205,10,45,96,26,45,10,42,65,104,98,169,181,119,125,250,16,172,185,250,211,132,14,88,86,32,140,202,135,168,86,48,168,206,236,196,67,86,34,244,89,208,210,218,185,238,222,208,154,29,139,213,230,168,91,68,203,171,67,73,56,217,126,210,218,194,135,154,32,141,205,128,247,136,208,224,159,198,40,13,23,249,172,191,156,143,214,223,140,48,131,211,186,120,205,218,218,137,183,240,30,113,157,77,230,20,145,142,80,30,152,11,176,188,198,132,89,5,152,18,132,36,45,163,124,124,74,69,13,149,233,131,175,60,75,176,54,10,91,185,89,83,223,211,165,122,40,219,85,174,183,57,224,86,53,179,173,42,169,124,25,107,60,80,206,248,7,78,169,175,5,207,99,15,149,74,150,64,90,166,216, 132,41,168,199,247,17,240,17,209,36,169,140,102,68,2,193,137,193,125,115,60,248,82,150,149,80,20,247,214,165,106,153,202,183,135,149,178,74,252,227,24,2,116,149,180,106,145,132,193,4,180,125,85,207,85,125,214,152,181,180,149,131,171,128,88,246,72,53,43,180,128,105,180,40,168,4,161,137,165,214,222,245,233,67,176,230,234,79,19,58,96,89,129,48,42,31,162,90,193,160,58,179,19,15,89,137,208,103,65,75,107,231,186,123,67,107,118,44,86,155,163,110,17,45,175,14,37,225,100,251,73,107,11,31,106,130,52,54,3,222,35,66,131,127,26,163,52,92,228,179,254,114,62,90,127,51,194,12,78,235,226,53,107,107,39,222,194,123,196,117,54,153,83,68,58,66,121,96,46,192,242,26,19,102,21,96,74,16,146,180,140,242,241,41,21,53,84,166,15,190,242,44,193,218,40,108,229,102,77,125,79,151,234,161,108,87,185,222,230,128,91,213,204,182,170,164,242,101,172,241,64,57,227,31,56,165,190,22,60,143,61,84,42,89,2,105,153,98,71,71,17,245,238,45,115,13,
209,81,68,189,123,203,92,195,125,153,149,60,207,198,87,103,214,219,247,247,191,69,211,143,186,109,120,161,166,107,218,111,124,183,166,143,183,234,53,155,21,223,151,207,70,204,49,191,18,107,42,15,51,39,104,89,222,215,165,143,240,84,14,58,186,215,172,205,172,139,132,244,41,111,239,80,152,202,207,215,109,79,224,72,92,31,105,38,138,103,129,197,73,68,44,244,46,239,251,114,140,254,76,242,21,84,249,92,93,121,227,250,29,234,128,16,55,175,244,99,100,141,153,254,38,148,126,83,230,34,56,28,172,75,105,84,185,143,115,48,174,38,153,90,103,138,99,28,113,180,51,94,141,118,184,244,25,227,81,88,202,28,73,171,80,199,62,231,100,119,60,114,99,225,37,16,124,7,104,109,72,173,226,76,101,26,231,124,134,182,38,122,87,231,63,153,250,137,70,53,161,23,222,148,20,82,119,41,228,38,25,92,131,204,48,43,175,19,176,199,49,157,210,84,65,85,37,197,82,246,246,185,73,238,111,94,155,243,196,230,84,19,219,5,182,143,69,74,198,247,95,200,178,168,45,254, 247,101,86,242,60,27,95,157,89,111,223,223,255,22,77,63,234,182,225,133,154,174,105,191,241,221,154,62,222,170,215,108,86,124,95,62,27,113,137,249,149,88,83,121,152,57,65,203,242,190,46,125,132,167,114,208,209,189,102,109,102,93,36,164,79,121,123,135,194,84,126,190,110,123,2,71,226,250,72,51,81,60,11,44,78,34,98,161,119,121,223,151,99,244,103,146,175,160,202,47,213,149,55,174,223,161,14,8,113,243,74,63,70,214,152,233,111,66,233,183,101,46,130,195,193,186,148,70,149,251,56,7,227,106,146,169,117,166,56,198,17,71,59,227,213,104,135,75,159,49,30,133,165,204,145,180,10,117,236,115,78,118,199,35,55,22,94,2,193,119,128,214,134,212,42,206,84,166,113,206,103,104,107,162,119,117,254,147,169,159,104,84,19,122,225,77,73,33,117,151,66,110,146,193,53,200,12,179,242,58,1,123,28,211,41,77,21,84,85,82,44,101,111,159,155,228,254,230,181,57,79,108,78,53,177,93,96,251,88,164,100,124,255,133,44,139,218,226,207,34,46,15,41,187,205,209,
44,226,242,144,178,219,28,189,102,39,73,103,26,44,232,99,165,119,76,231,212,216,93,174,167,191,182,46,243,168,217,205,172,197,140,194,198,204,43,111,54,246,163,142,131,134,185,95,19,83,91,31,139,23,34,177,217,90,177,231,185,209,118,2,6,166,226,114,35,77,80,132,88,248,181,213,163,217,165,166,69,127,219,118,238,153,108,190,56,151,172,112,196,131,119,135,110,19,121,127,214,117,186,142,176,188,207,205,186,30,124,107,98,94,86,8,224,30,23,238,58,26,161,249,238,221,123,92,190,235,150,10,108,124,15,175,179,13,15,112,37,175,79,39,207,253,139,66,239,125,25,175,19,80,126,128,123,121,239,176,199,247,184,162,215,145,174,155,223,214,91,9,169,53,94,220,235,36,239,235,110,171,173,81,154,27,221,225,235,240,216,230,215,249,54,241,255,186,155,125,125,226,218,125,210,22,183,92,234,251,153,104,98,191,225,222,247,251,186,204,121,135,171,126,45,249,227,221,250,91,147,182,124,152,11,128,155,141,212,207,190,11,216,30,242,33,174,5,110,140,148,54,209,193,46,222, 107,118,146,116,166,193,130,62,86,122,199,116,78,141,221,229,122,250,107,235,50,143,154,221,204,90,204,40,108,204,188,242,102,99,63,234,56,104,152,251,53,49,181,245,177,120,33,18,155,173,21,123,158,27,109,39,96,96,42,46,55,210,4,69,136,133,95,91,61,154,93,106,90,244,119,109,231,158,201,230,139,115,201,10,71,60,120,119,232,54,145,247,103,93,167,235,8,203,251,220,172,235,193,183,38,230,101,133,0,238,113,225,174,163,17,154,239,222,189,199,229,187,110,169,192,198,247,240,58,219,240,0,87,242,250,116,242,220,191,40,244,222,151,241,58,1,229,7,184,151,247,14,123,124,143,43,122,29,233,186,249,109,189,149,144,90,227,197,189,78,242,190,238,182,218,26,165,185,209,29,190,14,143,109,126,157,111,19,255,175,187,217,215,39,174,221,39,109,113,203,165,190,159,137,38,246,27,238,125,191,175,203,156,119,184,234,215,146,63,222,173,191,53,105,203,135,185,0,184,217,72,253,236,187,128,237,33,31,226,90,224,198,72,105,19,29,236,226,77,96,155,93,14,236,22,117,
4,182,217,229,192,110,81,215,230,247,4,123,233,225,77,175,12,118,40,75,107,182,141,110,15,118,34,238,27,93,36,220,32,81,55,184,83,216,101,202,135,184,94,216,17,172,245,55,13,27,3,251,182,155,134,93,83,127,131,75,135,203,10,15,95,184,110,124,255,176,47,94,55,188,138,216,21,26,119,189,149,120,125,129,238,67,93,75,236,168,224,7,186,161,184,82,181,111,191,176,217,109,197,30,22,54,191,174,216,93,255,230,55,23,187,42,103,179,75,140,93,169,122,223,251,140,205,161,0,103,152,205,110,54,182,135,218,244,146,99,175,14,99,179,251,142,29,180,63,200,213,199,14,120,15,113,11,178,183,13,13,23,34,31,120,231,21,194,205,111,68,182,39,254,156,203,145,43,6,195,94,91,167,82,111,185,23,217,114,251,156,123,145,29,245,254,16,87,36,215,154,142,183,221,150,172,161,107,190,45,217,149,99,15,118,113,178,67,172,15,113,135,178,103,141,60,196,117,202,78,36,249,238,55,43,87,104,229,171,54,149,224,125,230,165,202,54,20,254,253,202,183,52,60,171,222, 109,126,79,176,151,30,222,244,202,96,135,178,180,102,219,232,246,96,39,226,190,209,69,194,13,18,117,131,59,133,93,166,124,136,235,133,29,193,90,127,211,176,49,176,111,187,105,216,53,245,55,184,116,184,172,240,240,133,235,198,247,15,251,226,117,195,171,136,93,161,113,215,91,137,215,23,232,62,212,181,196,142,10,126,160,27,138,43,85,251,246,11,155,221,86,236,97,97,243,235,138,221,245,111,126,115,177,171,114,54,187,196,216,149,170,247,189,207,216,28,10,112,134,217,236,102,99,123,168,77,47,57,246,234,48,54,187,239,216,65,251,131,92,125,236,128,247,16,183,32,123,219,208,112,33,242,129,119,94,33,220,252,70,100,123,226,207,185,28,185,98,48,236,181,117,42,245,150,123,145,45,183,207,185,23,217,81,239,15,113,69,114,173,233,120,219,109,201,26,186,230,219,146,93,57,246,96,23,39,59,196,250,16,119,40,123,214,200,67,92,167,236,68,146,239,126,179,114,133,86,190,110,83,9,222,103,94,170,108,67,225,223,175,124,75,195,179,234,61,203,246,96,15,112,227,178,
179,108,15,246,0,55,46,59,108,245,0,151,47,187,168,219,240,246,229,58,7,104,227,139,152,237,209,30,228,78,230,6,51,127,131,235,153,125,203,237,246,155,154,237,126,19,238,77,205,117,150,170,139,184,251,93,214,124,103,216,154,120,233,235,187,95,217,236,28,130,40,175,108,246,2,46,119,189,189,25,167,89,128,48,38,95,84,135,101,65,166,248,66,98,163,107,157,107,171,104,228,231,220,240,236,48,250,134,151,61,59,238,217,131,220,251,236,21,227,108,124,5,180,111,108,223,225,54,104,151,178,202,91,77,170,119,64,87,104,240,105,91,236,119,15,58,231,131,174,24,190,238,154,182,113,189,129,110,21,119,40,94,245,187,93,188,245,244,224,117,167,127,212,109,225,115,253,46,62,113,114,106,195,170,103,162,198,113,214,88,240,194,41,125,238,254,113,216,61,25,138,179,110,255,77,111,56,132,129,247,223,139,206,217,25,204,211,217,63,134,199,59,239,28,145,222,253,227,65,247,108,40,222,189,238,158,136,83,156,243,93,15,128,28,12,59,248,106,239,68,188,235,247,134,189,147, 195,86,15,112,249,178,139,186,13,111,95,174,115,128,54,190,136,217,30,237,65,238,100,110,48,243,55,184,158,217,183,220,110,191,169,217,238,55,225,222,212,92,103,169,186,136,187,223,101,205,119,134,173,137,151,190,185,251,149,205,206,33,136,242,202,102,47,224,114,215,219,155,113,154,5,8,99,242,69,117,88,22,100,138,47,36,54,186,214,185,182,138,70,126,206,13,207,14,163,111,120,217,179,227,158,61,200,189,207,94,49,206,198,87,64,251,198,246,29,110,131,118,41,171,188,213,164,122,7,116,133,6,159,182,197,126,247,160,115,62,232,138,225,235,174,105,27,215,27,232,86,113,135,226,85,191,219,197,91,79,15,94,119,250,71,221,22,62,215,239,226,19,39,167,54,172,122,38,106,28,103,141,5,47,156,210,231,238,31,134,221,147,161,56,235,246,223,244,134,67,24,120,255,189,232,156,157,193,60,157,253,99,120,188,243,206,17,233,221,63,28,116,207,134,226,221,235,238,137,56,197,57,223,245,0,200,193,176,131,175,246,78,196,187,126,111,216,59,57,162,161,177,79,93,191,119,
35,26,26,251,212,245,123,71,175,135,226,245,233,241,97,183,79,205,236,30,159,246,237,241,104,12,190,168,176,59,16,103,253,211,183,189,67,119,209,163,71,157,1,172,107,244,200,220,156,104,214,4,203,239,156,188,183,135,251,190,119,114,216,18,221,30,141,218,253,227,89,191,59,64,100,193,218,123,111,96,77,93,248,177,119,114,112,124,126,72,253,243,246,97,176,147,211,33,76,5,107,135,199,134,167,132,71,123,64,245,154,158,19,129,132,89,253,155,23,177,247,94,211,213,139,246,104,229,45,140,132,122,24,15,246,172,223,27,124,47,96,141,106,67,254,112,222,49,99,194,174,192,112,111,58,39,7,180,215,30,108,22,89,32,106,196,251,211,115,76,180,2,142,142,15,29,20,34,90,187,226,176,251,170,123,48,236,189,5,98,129,39,97,198,193,249,27,103,60,222,179,193,144,240,122,124,44,78,186,7,176,32,28,96,208,237,191,237,29,16,206,250,221,179,78,175,47,168,13,97,191,143,3,158,158,52,202,210,103,109,164,9,32,248,238,91,36,178,243,147,99,196,80,191,251,135, 244,122,40,94,159,30,31,118,251,212,204,238,241,105,223,30,143,198,224,139,10,187,3,113,214,63,125,219,59,116,23,61,122,212,25,192,186,70,143,204,205,137,102,77,176,252,206,201,123,123,184,31,122,39,135,45,209,237,209,168,221,63,156,245,187,3,68,22,172,189,247,6,214,212,133,31,123,39,7,199,231,135,212,63,111,31,6,59,57,29,194,84,176,118,120,108,120,74,120,180,7,84,175,233,57,17,72,152,213,191,121,17,123,239,53,93,189,104,143,86,222,194,72,168,135,241,96,207,250,189,193,15,2,214,168,54,228,247,231,29,51,38,236,10,12,247,166,115,114,64,123,237,193,102,145,5,162,70,188,63,61,199,68,43,224,232,248,208,65,33,162,181,43,14,187,175,186,7,195,222,91,32,22,120,18,102,28,156,191,113,198,227,61,27,12,9,175,199,199,226,164,123,0,11,194,1,6,221,254,219,222,1,225,172,223,61,235,244,250,130,218,16,246,251,56,224,233,73,163,44,125,214,70,154,0,130,239,190,69,34,59,63,57,70,12,245,187,191,63,135,133,215,144,26,14,219,
115,88,120,13,169,225,176,157,35,160,108,220,11,120,213,161,100,69,89,239,122,0,26,94,158,233,147,87,139,222,134,31,74,154,122,15,132,122,42,222,116,222,115,103,68,135,84,152,22,1,24,211,69,209,165,59,216,145,146,41,58,251,167,136,183,125,252,153,128,5,240,0,137,246,120,184,239,135,157,55,157,163,238,192,34,50,2,72,181,123,108,137,193,89,247,160,135,255,128,223,129,206,129,128,142,133,203,15,7,167,192,221,127,56,71,210,128,223,212,120,162,3,52,130,131,33,245,51,29,8,148,13,72,214,39,154,6,1,34,37,47,234,104,100,171,132,168,74,245,226,248,116,64,116,125,216,25,118,4,173,3,254,222,239,194,211,246,88,253,238,9,160,153,248,188,115,112,112,222,7,158,199,135,241,101,128,113,112,14,82,160,119,194,219,138,4,70,2,167,215,63,52,220,141,219,227,96,172,211,59,62,239,107,202,54,160,2,60,167,128,121,28,157,200,186,220,210,193,233,171,33,48,98,119,187,69,4,37,122,175,28,37,116,126,240,90,145,2,78,101,83,193,107,216,204,253, 57,2,202,198,189,128,87,29,74,86,148,245,174,7,160,225,229,153,62,121,181,232,109,248,161,164,169,247,64,168,167,226,77,231,61,119,70,116,72,133,105,17,128,49,93,20,93,186,131,29,41,153,162,179,127,138,120,219,199,159,9,88,0,15,144,104,143,135,251,126,216,121,211,57,234,14,44,34,35,128,84,187,199,150,24,156,117,15,122,248,15,248,29,232,28,8,232,88,184,252,112,112,10,220,253,251,115,36,13,248,77,141,39,58,64,35,56,24,82,63,211,129,64,217,128,100,125,162,105,16,32,82,242,162,142,70,182,74,136,170,84,47,142,79,7,68,215,135,157,97,71,208,58,224,239,253,46,60,109,143,213,239,158,0,154,137,207,59,7,7,231,125,224,121,124,24,95,6,24,7,231,32,5,122,39,188,173,72,96,36,112,122,253,67,195,221,184,61,14,198,58,189,227,243,190,166,108,3,42,192,115,10,152,199,209,137,172,203,45,29,156,190,26,2,35,118,183,91,68,80,162,247,202,81,66,231,7,175,21,41,224,84,54,21,188,134,205,220,239,194,27,157,195,183,61,18,
46,188,209,57,124,219,35,129,192,83,2,51,14,122,10,127,240,21,142,96,143,168,208,191,174,171,39,252,185,195,245,211,230,18,54,241,225,255,3,149,65,46,127, 8,60,37,48,227,160,167,240,7,95,225,8,246,136,10,253,235,186,122,194,159,59,92,63,109,46,97,19,31,254,31,117,61,43,42,

View file

@ -1,462 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
^L
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
^L
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
^L
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
^L
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
^L
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
^L
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
^L
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
^L

View file

@ -0,0 +1,29 @@
NASM is now licensed under the 2-clause BSD license, also known as the
simplified BSD license.
Copyright 1996-2009 the NASM Authors - All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,186 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 2007-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* compiler.h
*
* Compiler-specific macros for NASM. Feel free to add support for
* other compilers in here.
*
* This header file should be included before any other header.
*/
#ifndef NASM_COMPILER_H
#define NASM_COMPILER_H 1
#ifdef HAVE_CONFIG_H
# include "config.h"
/* autoconf doesn't define these if they are redundant, but we want to
be able to #ifdef them... */
#else
/* Default these to unsupported unless we have config.h */
# ifndef inline
# define inline
# endif
# ifndef restrict
# define restrict
# endif
#endif /* HAVE_CONFIG_H */
/* This is required to get the standard <inttypes.h> macros when compiling
with a C++ compiler. This must be defined *before* <inttypes.h> is
included, directly or indirectly. */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#define __STDC_FORMAT_MACROS 1
#ifdef __GNUC__
# if __GNUC__ >= 4
# define HAVE_GNUC_4
# endif
# if __GNUC__ >= 3
# define HAVE_GNUC_3
# endif
#endif
#ifdef __GNUC__
# define _unused __attribute__((unused))
#else
# define _unused
#endif
/* Some versions of MSVC have these only with underscores in front */
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
#ifndef HAVE_SNPRINTF
# ifdef HAVE__SNPRINTF
# define snprintf _snprintf
# else
int snprintf(char *, size_t, const char *, ...);
# endif
#endif
#ifndef HAVE_VSNPRINTF
# ifdef HAVE__VSNPRINT
# define vsnprintf _vsnprintf
# else
int vsnprintf(char *, size_t, const char *, va_list);
# endif
#endif
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
size_t strlcpy(char *, const char *, size_t);
#endif
#ifndef __cplusplus /* C++ has false, true, bool as keywords */
# if defined(HAVE_STDBOOL_H) && defined(HAVE_WORKING_BOOL)
# include <stdbool.h>
# else
/* This is sort of dangerous, since casts will behave different than
casting to the standard boolean type. Always use !!, not (bool). */
typedef enum bool { false, true } bool;
# endif
#endif
/* Provide a substitute for offsetof() if we don't have one. This
variant works on most (but not *all*) systems... */
#ifndef offsetof
# define offsetof(t,m) ((size_t)&(((t *)0)->m))
#endif
/* The container_of construct: if p is a pointer to member m of
container class c, then return a pointer to the container of which
*p is a member. */
#ifndef container_of
# define container_of(p, c, m) ((c *)((char *)(p) - offsetof(c,m)))
#endif
/* Some misguided platforms hide the defs for these */
#if defined(HAVE_STRCASECMP) && !HAVE_DECL_STRCASECMP
int strcasecmp(const char *, const char *);
#endif
#if defined(HAVE_STRICMP) && !HAVE_DECL_STRICMP
int stricmp(const char *, const char *);
#endif
#if defined(HAVE_STRNCASECMP) && !HAVE_DECL_STRNCASECMP
int strncasecmp(const char *, const char *, size_t);
#endif
#if defined(HAVE_STRNICMP) && !HAVE_DECL_STRNICMP
int strnicmp(const char *, const char *, size_t);
#endif
#if defined(HAVE_STRSEP) && !HAVE_DECL_STRSEP
char *strsep(char **, const char *);
#endif
/*
* Define this to 1 for faster performance if this is a littleendian
* platform which can do unaligned memory references. It is safe
* to leave it defined to 0 even if that is true.
*/
#if defined(__386__) || defined(__i386__) || defined(__x86_64__)
# define X86_MEMORY 1
# ifndef WORDS_LITTLEENDIAN
# define WORDS_LITTLEENDIAN 1
# endif
#else
# define X86_MEMORY 0
#endif
/*
* Hints to the compiler that a particular branch of code is more or
* less likely to be taken.
*/
#if defined(__GNUC__) && __GNUC__ >= 3
# define likely(x) __builtin_expect(!!(x), 1)
# define unlikely(x) __builtin_expect(!!(x), 0)
#else
# define likely(x) (!!(x))
# define unlikely(x) (!!(x))
#endif
/*
* How to tell the compiler that a function doesn't return
*/
#ifdef __GNUC__
# define no_return void __attribute__((noreturn))
#else
# define no_return void
#endif
#endif /* NASM_COMPILER_H */

File diff suppressed because it is too large Load diff

View file

@ -1,18 +1,47 @@
/* disasm.h header file for disasm.c /* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
* *
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and * Redistribution and use in source and binary forms, with or without
* Julian Hall. All rights reserved. The software is * modification, are permitted provided that the following
* redistributable under the licence given in the file "Licence" * conditions are met:
* distributed in the NASM archive. *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* disasm.h header file for disasm.c
*/ */
#ifndef NASM_DISASM_H #ifndef NASM_DISASM_H
#define NASM_DISASM_H #define NASM_DISASM_H
#define INSN_MAX 32 /* one instruction can't be longer than this */ #define INSN_MAX 32 /* one instruction can't be longer than this */
long disasm (unsigned char *data, char *output, int segsize, long offset, int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
int autosync, unsigned long prefer); int32_t offset, int autosync, uint32_t prefer);
long eatbyte (unsigned char *data, char *output); int32_t eatbyte(uint8_t *data, char *output, int outbufsize, int segsize);
#endif #endif

View file

@ -0,0 +1,186 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* exprlib.c
*
* Library routines to manipulate expression data types.
*/
#include "nasm.h"
/*
* Return true if the argument is a simple scalar. (Or a far-
* absolute, which counts.)
*/
int is_simple(expr * vect)
{
while (vect->type && !vect->value)
vect++;
if (!vect->type)
return 1;
if (vect->type != EXPR_SIMPLE)
return 0;
do {
vect++;
} while (vect->type && !vect->value);
if (vect->type && vect->type < EXPR_SEGBASE + SEG_ABS)
return 0;
return 1;
}
/*
* Return true if the argument is a simple scalar, _NOT_ a far-
* absolute.
*/
int is_really_simple(expr * vect)
{
while (vect->type && !vect->value)
vect++;
if (!vect->type)
return 1;
if (vect->type != EXPR_SIMPLE)
return 0;
do {
vect++;
} while (vect->type && !vect->value);
if (vect->type)
return 0;
return 1;
}
/*
* Return true if the argument is relocatable (i.e. a simple
* scalar, plus at most one segment-base, plus possibly a WRT).
*/
int is_reloc(expr * vect)
{
while (vect->type && !vect->value) /* skip initial value-0 terms */
vect++;
if (!vect->type) /* trivially return true if nothing */
return 1; /* is present apart from value-0s */
if (vect->type < EXPR_SIMPLE) /* false if a register is present */
return 0;
if (vect->type == EXPR_SIMPLE) { /* skip over a pure number term... */
do {
vect++;
} while (vect->type && !vect->value);
if (!vect->type) /* ...returning true if that's all */
return 1;
}
if (vect->type == EXPR_WRT) { /* skip over a WRT term... */
do {
vect++;
} while (vect->type && !vect->value);
if (!vect->type) /* ...returning true if that's all */
return 1;
}
if (vect->value != 0 && vect->value != 1)
return 0; /* segment base multiplier non-unity */
do { /* skip over _one_ seg-base term... */
vect++;
} while (vect->type && !vect->value);
if (!vect->type) /* ...returning true if that's all */
return 1;
return 0; /* And return false if there's more */
}
/*
* Return true if the argument contains an `unknown' part.
*/
int is_unknown(expr * vect)
{
while (vect->type && vect->type < EXPR_UNKNOWN)
vect++;
return (vect->type == EXPR_UNKNOWN);
}
/*
* Return true if the argument contains nothing but an `unknown'
* part.
*/
int is_just_unknown(expr * vect)
{
while (vect->type && !vect->value)
vect++;
return (vect->type == EXPR_UNKNOWN);
}
/*
* Return the scalar part of a relocatable vector. (Including
* simple scalar vectors - those qualify as relocatable.)
*/
int64_t reloc_value(expr * vect)
{
while (vect->type && !vect->value)
vect++;
if (!vect->type)
return 0;
if (vect->type == EXPR_SIMPLE)
return vect->value;
else
return 0;
}
/*
* Return the segment number of a relocatable vector, or NO_SEG for
* simple scalars.
*/
int32_t reloc_seg(expr * vect)
{
while (vect->type && (vect->type == EXPR_WRT || !vect->value))
vect++;
if (vect->type == EXPR_SIMPLE) {
do {
vect++;
} while (vect->type && (vect->type == EXPR_WRT || !vect->value));
}
if (!vect->type)
return NO_SEG;
else
return vect->type - EXPR_SEGBASE;
}
/*
* Return the WRT segment number of a relocatable vector, or NO_SEG
* if no WRT part is present.
*/
int32_t reloc_wrt(expr * vect)
{
while (vect->type && vect->type < EXPR_WRT)
vect++;
if (vect->type == EXPR_WRT) {
return vect->value;
} else
return NO_SEG;
}

View file

@ -1,32 +1,42 @@
/* insns.h header file for insns.c /* insns.h header file for insns.c
* $Id: insns.h,v 1.1 2005/02/07 00:26:03 rylek Exp $
* *
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is * Julian Hall. All rights reserved. The software is
* redistributable under the licence given in the file "Licence" * redistributable under the license given in the file "LICENSE"
* distributed in the NASM archive. * distributed in the NASM archive.
*/ */
#ifndef NASM_INSNS_H #ifndef NASM_INSNS_H
#define NASM_INSNS_H #define NASM_INSNS_H
#include "insnsi.h" /* instruction opcode enum */ #include "nasm.h"
#include "tokens.h"
/* max length of any instruction, register name etc. */
#if MAX_INSLEN > 9 /* MAX_INSLEN defined in insnsi.h */
#define MAX_KEYWORD MAX_INSLEN
#else
#define MAX_KEYWORD 9
#endif
struct itemplate { struct itemplate {
int opcode; /* the token, passed from "parser.c" */ enum opcode opcode; /* the token, passed from "parser.c" */
int operands; /* number of operands */ int operands; /* number of operands */
long opd[3]; /* bit flags for operand types */ opflags_t opd[MAX_OPERANDS]; /* bit flags for operand types */
const char *code; /* the code it assembles to */ const uint8_t *code; /* the code it assembles to */
unsigned long flags; /* some flags */ uint32_t flags; /* some flags */
}; };
/* Disassembler table structure */
/* If n == -1, then p points to another table of 256
struct disasm_index, otherwise p points to a list of n
struct itemplates to consider. */
struct disasm_index {
const void *p;
int n;
};
/* Tables for the assembler and disassembler, respectively */
extern const struct itemplate * const nasm_instructions[];
extern const struct disasm_index itable[256];
extern const struct disasm_index * const itable_vex[2][32][8];
/* Common table for the byte codes */
extern const uint8_t nasm_bytecodes[];
/* /*
* this define is used to signify the end of an itemplate * this define is used to signify the end of an itemplate
*/ */
@ -59,41 +69,67 @@ struct itemplate {
* required to have unspecified size in the instruction too...) * required to have unspecified size in the instruction too...)
*/ */
#define IF_SM 0x00000001UL /* size match */ #define IF_SM 0x00000001UL /* size match */
#define IF_SM2 0x00000002UL /* size match first two operands */ #define IF_SM2 0x00000002UL /* size match first two operands */
#define IF_SB 0x00000004UL /* unsized operands can't be non-byte */ #define IF_SB 0x00000004UL /* unsized operands can't be non-byte */
#define IF_SW 0x00000008UL /* unsized operands can't be non-word */ #define IF_SW 0x00000008UL /* unsized operands can't be non-word */
#define IF_SD 0x00000010UL /* unsized operands can't be nondword */ #define IF_SD 0x0000000CUL /* unsized operands can't be non-dword */
#define IF_AR0 0x00000020UL /* SB, SW, SD applies to argument 0 */ #define IF_SQ 0x00000010UL /* unsized operands can't be non-qword */
#define IF_AR1 0x00000040UL /* SB, SW, SD applies to argument 1 */ #define IF_SO 0x00000014UL /* unsized operands can't be non-oword */
#define IF_AR2 0x00000060UL /* SB, SW, SD applies to argument 2 */ #define IF_SY 0x00000018UL /* unsized operands can't be non-yword */
#define IF_ARMASK 0x00000060UL /* mask for unsized argument spec */ #define IF_SZ 0x00000038UL /* unsized operands must match the bitsize */
#define IF_PRIV 0x00000100UL /* it's a privileged instruction */ #define IF_SX 0x0000003CUL /* unsized operands not allowed */
#define IF_SMM 0x00000200UL /* it's only valid in SMM */ #define IF_SMASK 0x0000003CUL /* mask for unsized argument size */
#define IF_PROT 0x00000400UL /* it's protected mode only */ #define IF_AR0 0x00000040UL /* SB, SW, SD applies to argument 0 */
#define IF_UNDOC 0x00001000UL /* it's an undocumented instruction */ #define IF_AR1 0x00000080UL /* SB, SW, SD applies to argument 1 */
#define IF_FPU 0x00002000UL /* it's an FPU instruction */ #define IF_AR2 0x000000C0UL /* SB, SW, SD applies to argument 2 */
#define IF_MMX 0x00004000UL /* it's an MMX instruction */ #define IF_AR3 0x00000100UL /* SB, SW, SD applies to argument 3 */
#define IF_3DNOW 0x00008000UL /* it's a 3DNow! instruction */ #define IF_AR4 0x00000140UL /* SB, SW, SD applies to argument 4 */
#define IF_SSE 0x00010000UL /* it's a SSE (KNI, MMX2) instruction */ #define IF_ARMASK 0x000001C0UL /* mask for unsized argument spec */
#define IF_SSE2 0x00020000UL /* it's a SSE2 instruction */ #define IF_ARSHFT 6 /* LSB in IF_ARMASK */
#define IF_SSE3 0x00040000UL /* it's a SSE3 (PNI) instruction */ /* The next 3 bits aren't actually used for anything */
#define IF_PMASK 0xFF000000UL /* the mask for processor types */ #define IF_PRIV 0x00000000UL /* it's a privileged instruction */
#define IF_PLEVEL 0x0F000000UL /* the mask for processor instr. level */ #define IF_SMM 0x00000000UL /* it's only valid in SMM */
/* also the highest possible processor */ #define IF_PROT 0x00000000UL /* it's protected mode only */
#define IF_PFMASK 0xF001FF00UL /* the mask for disassembly "prefer" */ #define IF_NOLONG 0x00000800UL /* it's not available in long mode */
#define IF_8086 0x00000000UL /* 8086 instruction */ #define IF_UNDOC 0x00001000UL /* it's an undocumented instruction */
#define IF_186 0x01000000UL /* 186+ instruction */ #define IF_FPU 0x00002000UL /* it's an FPU instruction */
#define IF_286 0x02000000UL /* 286+ instruction */ #define IF_MMX 0x00004000UL /* it's an MMX instruction */
#define IF_386 0x03000000UL /* 386+ instruction */ #define IF_3DNOW 0x00008000UL /* it's a 3DNow! instruction */
#define IF_486 0x04000000UL /* 486+ instruction */ #define IF_SSE 0x00010000UL /* it's a SSE (KNI, MMX2) instruction */
#define IF_PENT 0x05000000UL /* Pentium instruction */ #define IF_SSE2 0x00020000UL /* it's a SSE2 instruction */
#define IF_P6 0x06000000UL /* P6 instruction */ #define IF_SSE3 0x00040000UL /* it's a SSE3 (PNI) instruction */
#define IF_KATMAI 0x07000000UL /* Katmai instructions */ #define IF_VMX 0x00080000UL /* it's a VMX instruction */
#define IF_WILLAMETTE 0x08000000UL /* Willamette instructions */ #define IF_LONG 0x00100000UL /* long mode instruction */
#define IF_PRESCOTT 0x09000000UL /* Prescott instructions */ #define IF_SSSE3 0x00200000UL /* it's an SSSE3 instruction */
#define IF_IA64 0x0F000000UL /* IA64 instructions */ #define IF_SSE4A 0x00400000UL /* AMD SSE4a */
#define IF_CYRIX 0x10000000UL /* Cyrix-specific instruction */ #define IF_SSE41 0x00800000UL /* it's an SSE4.1 instruction */
#define IF_AMD 0x20000000UL /* AMD-specific instruction */ #define IF_SSE42 0x00800000UL /* HACK NEED TO REORGANIZE THESE BITS */
#define IF_SSE5 0x00800000UL /* HACK NEED TO REORGANIZE THESE BITS */
#define IF_AVX 0x00800000UL /* HACK NEED TO REORGANIZE THESE BITS */
#define IF_FMA 0x00800000UL /* HACK NEED TO REORGANIZE THESE BITS */
#define IF_PMASK 0xFF000000UL /* the mask for processor types */
#define IF_PLEVEL 0x0F000000UL /* the mask for processor instr. level */
/* also the highest possible processor */
#define IF_PFMASK 0xF01FFF00UL /* the mask for disassembly "prefer" */
#define IF_8086 0x00000000UL /* 8086 instruction */
#define IF_186 0x01000000UL /* 186+ instruction */
#define IF_286 0x02000000UL /* 286+ instruction */
#define IF_386 0x03000000UL /* 386+ instruction */
#define IF_486 0x04000000UL /* 486+ instruction */
#define IF_PENT 0x05000000UL /* Pentium instruction */
#define IF_P6 0x06000000UL /* P6 instruction */
#define IF_KATMAI 0x07000000UL /* Katmai instructions */
#define IF_WILLAMETTE 0x08000000UL /* Willamette instructions */
#define IF_PRESCOTT 0x09000000UL /* Prescott instructions */
#define IF_X86_64 0x0A000000UL /* x86-64 instruction (long or legacy mode) */
#define IF_NEHALEM 0x0B000000UL /* Nehalem instruction */
#define IF_WESTMERE 0x0C000000UL /* Westmere instruction */
#define IF_SANDYBRIDGE 0x0D000000UL /* Sandy Bridge instruction */
#define IF_FUTURE 0x0E000000UL /* Future processor (not yet disclosed) */
#define IF_X64 (IF_LONG|IF_X86_64)
#define IF_IA64 0x0F000000UL /* IA64 instructions (in x86 mode) */
#define IF_CYRIX 0x10000000UL /* Cyrix-specific instruction */
#define IF_AMD 0x20000000UL /* AMD-specific instruction */
#endif #endif

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,201 @@
/*
* inttypes.h
*
* Small ersatz subset of <inttypes.h>, deriving the types from
* <limits.h>.
*
* Important: the preprocessor may truncate numbers too large for it.
* Therefore, test the signed types only ... truncation won't generate
* a 01111111... bit pattern.
*/
#ifndef INTTYPES_H
#define INTTYPES_H
#include <limits.h>
/*** 64-bit type: long or long long ***/
/* Some old versions of gcc <limits.h> omit LLONG_MAX */
#ifndef LLONG_MAX
# ifdef __LONG_LONG_MAX__
# define LLONG_MAX __LONG_LONG_MAX__
# else
# define LLONG_MAX 0 /* Assume long long is unusable */
# endif
#endif
#if LONG_MAX == 9223372036854775807L
/* long is 64 bits */
typedef signed long int64_t;
typedef unsigned long uint64_t;
#define _scn64 "l"
#define _pri64 "l"
#define INT64_C(x) x ## L
#define UINT64_C(x) x ## UL
#elif LLONG_MAX == 9223372036854775807LL
/* long long is 64 bits */
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#define _scn64 "ll"
#define _pri64 "ll"
#define INT64_C(x) x ## LL
#define UINT64_C(x) x ## ULL
#else
#error "Neither long nor long long is 64 bits in size"
#endif
/*** 32-bit type: int or long ***/
#if INT_MAX == 2147483647
/* int is 32 bits */
typedef signed int int32_t;
typedef unsigned int uint32_t;
#define _scn32 ""
#define _pri32 ""
#define INT32_C(x) x
#define UINT32_C(x) x ## U
#elif LONG_MAX == 2147483647L
/* long is 32 bits */
typedef signed long int32_t;
typedef unsigned long uint32_t;
#define _scn32 "l"
#define _pri32 "l"
#define INT32_C(x) x ## L
#define UINT32_C(x) x ## UL
#else
#error "Neither int nor long is 32 bits in size"
#endif
/*** 16-bit size: int or short ***/
#if INT_MAX == 32767
/* int is 16 bits */
typedef signed int int16_t;
typedef unsigned int uint16_t;
#define _scn16 ""
#define _pri16 ""
#define INT16_C(x) x
#define UINT16_C(x) x ## U
#elif SHRT_MAX == 32767
/* short is 16 bits */
typedef signed short int16_t;
typedef unsigned short uint16_t;
#define _scn16 "h"
#define _pri16 ""
#define INT16_C(x) x
#define UINT16_C(x) x ## U
#else
#error "Neither short nor int is 16 bits in size"
#endif
/*** 8-bit size: char ***/
#if SCHAR_MAX == 127
/* char is 8 bits */
typedef signed char int8_t;
typedef unsigned char uint8_t;
#define _scn8 "hh"
#define _pri8 ""
#define INT8_C(x) x
#define UINT8_C(x) x ## U
#else
#error "char is not 8 bits in size"
#endif
/* The rest of this is common to all models */
#define PRId8 _pri8 "d"
#define PRId16 _pri16 "d"
#define PRId32 _pri32 "d"
#define PRId64 _pri64 "d"
#define PRIi8 _pri8 "i"
#define PRIi16 _pri16 "i"
#define PRIi32 _pri32 "i"
#define PRIi64 _pri64 "i"
#define PRIo8 _pri8 "o"
#define PRIo16 _pri16 "o"
#define PRIo32 _pri32 "o"
#define PRIo64 _pri64 "o"
#define PRIu8 _pri8 "u"
#define PRIu16 _pri16 "u"
#define PRIu32 _pri32 "u"
#define PRIu64 _pri64 "u"
#define PRIx8 _pri8 "x"
#define PRIx16 _pri16 "x"
#define PRIx32 _pri32 "x"
#define PRIx64 _pri64 "x"
#define PRIX8 _pri8 "X"
#define PRIX16 _pri16 "X"
#define PRIX32 _pri32 "X"
#define PRIX64 _pri64 "X"
#define SCNd8 _scn8 "d"
#define SCNd16 _scn16 "d"
#define SCNd32 _scn32 "d"
#define SCNd64 _scn64 "d"
#define SCNi8 _scn8 "i"
#define SCNi16 _scn16 "i"
#define SCNi32 _scn32 "i"
#define SCNi64 _scn64 "i"
#define SCNo8 _scn8 "o"
#define SCNo16 _scn16 "o"
#define SCNo32 _scn32 "o"
#define SCNo64 _scn64 "o"
#define SCNu8 _scn8 "u"
#define SCNu16 _scn16 "u"
#define SCNu32 _scn32 "u"
#define SCNu64 _scn64 "u"
#define SCNx8 _scn8 "x"
#define SCNx16 _scn16 "x"
#define SCNx32 _scn32 "x"
#define SCNx64 _scn64 "x"
#define INT8_MIN INT8_C(-128)
#define INT8_MAX INT8_C(127)
#define UINT8_MAX UINT8_C(255)
#define INT16_MIN INT16_C(-32768)
#define INT16_MAX INT16_C(32767)
#define UINT16_MAX UINT16_C(65535)
#define INT32_MIN INT32_C(-2147483648)
#define INT32_MAX INT32_C(2147483647)
#define UINT32_MAX UINT32_C(4294967295)
#define INT64_MIN INT64_C(-9223372036854775808)
#define INT64_MAX INT64_C(9223372036854775807)
#define UINT64_MAX UINT64_C(18446744073709551615)
#endif /* INTTYPES_H */

View file

@ -1,20 +0,0 @@
/* names.c included source file defining instruction and register
* names for the Netwide [Dis]Assembler
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is
* redistributable under the licence given in the file "Licence"
* distributed in the NASM archive.
*/
static const char *conditions[] = { /* condition code names */
"a", "ae", "b", "be", "c", "e", "g", "ge", "l", "le", "na", "nae",
"nb", "nbe", "nc", "ne", "ng", "nge", "nl", "nle", "no", "np",
"ns", "nz", "o", "p", "pe", "po", "s", "z"
};
/* Register names automatically generated from regs.dat */
#include "regs.c"
/* Instruction names automatically generated from insns.dat */
#include "insnsn.c"

View file

@ -1,32 +1,55 @@
/* nasm.h main header file for the Netwide Assembler: inter-module interface /* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
* *
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and * Redistribution and use in source and binary forms, with or without
* Julian Hall. All rights reserved. The software is * modification, are permitted provided that the following
* redistributable under the licence given in the file "Licence" * conditions are met:
* distributed in the NASM archive.
* *
* initial version: 27/iii/95 by Simon Tatham * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* nasm.h main header file for the Netwide Assembler: inter-module interface
*/ */
#ifndef NASM_NASM_H #ifndef NASM_NASM_H
#define NASM_NASM_H #define NASM_NASM_H
#include "compiler.h"
#include <stdio.h> #include <stdio.h>
#include "version.h" /* generated NASM version macros */ #include "inttypes.h"
#include "nasmlib.h"
//#include "preproc.h"
#include "insnsi.h" /* For enum opcode */
//#include "directives.h" /* For enum directive */
#include "opflags.h"
#ifndef NULL #define NO_SEG -1L /* null segment value */
#define NULL 0 #define SEG_ABS 0x40000000L /* mask for far-absolute segments */
#endif
#ifndef FALSE
#define FALSE 0 /* comes in handy */
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define NO_SEG -1L /* null segment value */
#define SEG_ABS 0x40000000L /* mask for far-absolute segments */
#ifndef FILENAME_MAX #ifndef FILENAME_MAX
#define FILENAME_MAX 256 #define FILENAME_MAX 256
@ -58,46 +81,30 @@
struct ofmt; struct ofmt;
/* /*
* ------------------------- * values for the `type' parameter to an output function.
* Error reporting functions *
* ------------------------- * Exceptions are OUT_RELxADR, which denote an x-byte relocation
* which will be a relative jump. For this we need to know the
* distance in bytes from the start of the relocated record until
* the end of the containing instruction. _This_ is what is stored
* in the size part of the parameter, in this case.
*
* Also OUT_RESERVE denotes reservation of N bytes of BSS space,
* and the contents of the "data" parameter is irrelevant.
*
* The "data" parameter for the output function points to a "int32_t",
* containing the address in question, unless the type is
* OUT_RAWDATA, in which case it points to an "uint8_t"
* array.
*/ */
enum out_type {
/* OUT_RAWDATA, /* Plain bytes */
* An error reporting function should look like this. OUT_ADDRESS, /* An address (symbol value) */
*/ OUT_RESERVE, /* Reserved bytes (RESB et al) */
typedef void (*efunc) (int severity, const char *fmt, ...); OUT_REL2ADR, /* 2-byte relative address */
OUT_REL4ADR, /* 4-byte relative address */
/* OUT_REL8ADR, /* 8-byte relative address */
* These are the error severity codes which get passed as the first };
* argument to an efunc.
*/
#define ERR_DEBUG 0x00000008 /* put out debugging message */
#define ERR_WARNING 0x00000000 /* warn only: no further action */
#define ERR_NONFATAL 0x00000001 /* terminate assembly after phase */
#define ERR_FATAL 0x00000002 /* instantly fatal: exit with error */
#define ERR_PANIC 0x00000003 /* internal error: panic instantly
* and dump core for reference */
#define ERR_MASK 0x0000000F /* mask off the above codes */
#define ERR_NOFILE 0x00000010 /* don't give source file name/line */
#define ERR_USAGE 0x00000020 /* print a usage message */
#define ERR_PASS1 0x00000040 /* only print this error on pass one */
/*
* These codes define specific types of suppressible warning.
*/
#define ERR_WARN_MASK 0x0000FF00 /* the mask for this feature */
#define ERR_WARN_SHR 8 /* how far to shift right */
#define ERR_WARN_MNP 0x00000100 /* macro-num-parameters warning */
#define ERR_WARN_MSR 0x00000200 /* macro self-reference */
#define ERR_WARN_OL 0x00000300 /* orphan label (no colon, and
* alone on line) */
#define ERR_WARN_NOV 0x00000400 /* numeric overflow */
#define ERR_WARN_GNUELF 0x00000500 /* using GNU ELF extensions */
#define ERR_WARN_MAX 5 /* the highest numbered one */
/* /*
* ----------------------- * -----------------------
@ -108,7 +115,7 @@ typedef void (*efunc) (int severity, const char *fmt, ...);
/* /*
* A label-lookup function should look like this. * A label-lookup function should look like this.
*/ */
typedef int (*lfunc) (char *label, long *segment, long *offset); typedef bool (*lfunc) (char *label, int32_t *segment, int64_t *offset);
/* /*
* And a label-definition function like this. The boolean parameter * And a label-definition function like this. The boolean parameter
@ -116,16 +123,17 @@ typedef int (*lfunc) (char *label, long *segment, long *offset);
* should affect the local-label system), or something odder like * should affect the local-label system), or something odder like
* an EQU or a segment-base symbol, which shouldn't. * an EQU or a segment-base symbol, which shouldn't.
*/ */
typedef void (*ldfunc) (char *label, long segment, long offset, char *special, typedef void (*ldfunc)(char *label, int32_t segment, int64_t offset,
int is_norm, int isextrn, struct ofmt *ofmt, char *special, bool is_norm, bool isextrn);
efunc error); void define_label(char *label, int32_t segment, int64_t offset,
char *special, bool is_norm, bool isextrn);
/* /*
* List-file generators should look like this: * List-file generators should look like this:
*/ */
typedef struct { typedef struct {
/* /*
* Called to initialise the listing file generator. Before this * Called to initialize the listing file generator. Before this
* is called, the other routines will silently do nothing when * is called, the other routines will silently do nothing when
* called. The `char *' parameter is the file name to write the * called. The `char *' parameter is the file name to write the
* listing to. * listing to.
@ -143,12 +151,12 @@ typedef struct {
* output-format interface, only OUT_ADDRESS will _always_ be * output-format interface, only OUT_ADDRESS will _always_ be
* displayed as if it's relocatable, so ensure that any non- * displayed as if it's relocatable, so ensure that any non-
* relocatable address has been converted to OUT_RAWDATA by * relocatable address has been converted to OUT_RAWDATA by
* then. Note that OUT_RAWDATA+0 is a valid data type, and is a * then. Note that OUT_RAWDATA,0 is a valid data type, and is a
* dummy call used to give the listing generator an offset to * dummy call used to give the listing generator an offset to
* work with when doing things like uplevel(LIST_TIMES) or * work with when doing things like uplevel(LIST_TIMES) or
* uplevel(LIST_INCBIN). * uplevel(LIST_INCBIN).
*/ */
void (*output) (long, const void *, unsigned long); void (*output) (int32_t, const void *, enum out_type, uint64_t);
/* /*
* Called to send a text line to the listing generator. The * Called to send a text line to the listing generator. The
@ -177,8 +185,60 @@ typedef struct {
* Reverse the effects of uplevel. * Reverse the effects of uplevel.
*/ */
void (*downlevel) (int); void (*downlevel) (int);
/*
* Called on a warning or error, with the error message.
*/
void (*error)(int severity, const char *pfx, const char *msg);
} ListGen; } ListGen;
/*
* Token types returned by the scanner, in addition to ordinary
* ASCII character values, and zero for end-of-string.
*/
enum token_type { /* token types, other than chars */
TOKEN_INVALID = -1, /* a placeholder value */
TOKEN_EOS = 0, /* end of string */
TOKEN_EQ = '=', TOKEN_GT = '>', TOKEN_LT = '<', /* aliases */
TOKEN_ID = 256, /* identifier */
TOKEN_NUM, /* numeric constant */
TOKEN_ERRNUM, /* malformed numeric constant */
TOKEN_STR, /* string constant */
TOKEN_ERRSTR, /* unterminated string constant */
TOKEN_FLOAT, /* floating-point constant */
TOKEN_REG, /* register name */
TOKEN_INSN, /* instruction name */
TOKEN_HERE, TOKEN_BASE, /* $ and $$ */
TOKEN_SPECIAL, /* BYTE, WORD, DWORD, QWORD, FAR, NEAR, etc */
TOKEN_PREFIX, /* A32, O16, LOCK, REPNZ, TIMES, etc */
TOKEN_SHL, TOKEN_SHR, /* << and >> */
TOKEN_SDIV, TOKEN_SMOD, /* // and %% */
TOKEN_GE, TOKEN_LE, TOKEN_NE, /* >=, <= and <> (!= is same as <>) */
TOKEN_DBL_AND, TOKEN_DBL_OR, TOKEN_DBL_XOR, /* &&, || and ^^ */
TOKEN_SEG, TOKEN_WRT, /* SEG and WRT */
TOKEN_FLOATIZE, /* __floatX__ */
TOKEN_STRFUNC, /* __utf16__, __utf32__ */
};
enum floatize {
FLOAT_8,
FLOAT_16,
FLOAT_32,
FLOAT_64,
FLOAT_80M,
FLOAT_80E,
FLOAT_128L,
FLOAT_128H,
};
/* Must match the list in string_transform(), in strfunc.c */
enum strfunc {
STRFUNC_UTF16,
STRFUNC_UTF32,
};
size_t string_transform(char *, size_t, char **, enum strfunc);
/* /*
* The expression evaluator must be passed a scanner function; a * The expression evaluator must be passed a scanner function; a
* standard scanner is provided as part of nasmlib.c. The * standard scanner is provided as part of nasmlib.c. The
@ -189,39 +249,18 @@ typedef struct {
* `t_type' field in the structure. * `t_type' field in the structure.
*/ */
struct tokenval { struct tokenval {
int t_type; enum token_type t_type;
long t_integer, t_inttwo;
char *t_charptr; char *t_charptr;
int64_t t_integer, t_inttwo;
}; };
typedef int (*scanner) (void *private_data, struct tokenval *tv); typedef int (*scanner) (void *private_data, struct tokenval * tv);
/* struct location {
* Token types returned by the scanner, in addition to ordinary int64_t offset;
* ASCII character values, and zero for end-of-string. int32_t segment;
*/ int known;
enum { /* token types, other than chars */
TOKEN_INVALID = -1, /* a placeholder value */
TOKEN_EOS = 0, /* end of string */
TOKEN_EQ = '=', TOKEN_GT = '>', TOKEN_LT = '<', /* aliases */
TOKEN_ID = 256, TOKEN_NUM, TOKEN_REG, TOKEN_INSN, /* major token types */
TOKEN_ERRNUM, /* numeric constant with error in */
TOKEN_HERE, TOKEN_BASE, /* $ and $$ */
TOKEN_SPECIAL, /* BYTE, WORD, DWORD, FAR, NEAR, etc */
TOKEN_PREFIX, /* A32, O16, LOCK, REPNZ, TIMES, etc */
TOKEN_SHL, TOKEN_SHR, /* << and >> */
TOKEN_SDIV, TOKEN_SMOD, /* // and %% */
TOKEN_GE, TOKEN_LE, TOKEN_NE, /* >=, <= and <> (!= is same as <>) */
TOKEN_DBL_AND, TOKEN_DBL_OR, TOKEN_DBL_XOR, /* &&, || and ^^ */
TOKEN_SEG, TOKEN_WRT, /* SEG and WRT */
TOKEN_FLOAT /* floating-point constant */
}; };
typedef struct {
long segment;
long offset;
int known;
} loc_t;
/* /*
* Expression-evaluator datatype. Expressions, within the * Expression-evaluator datatype. Expressions, within the
* evaluator, are stored as an array of these beasts, terminated by * evaluator, are stored as an array of these beasts, terminated by
@ -235,17 +274,29 @@ typedef struct {
* `value' field of zero is insignificant. * `value' field of zero is insignificant.
*/ */
typedef struct { typedef struct {
long type; /* a register, or EXPR_xxx */ int32_t type; /* a register, or EXPR_xxx */
long value; /* must be >= 32 bits */ int64_t value; /* must be >= 32 bits */
} expr; } expr;
/*
* Library routines to manipulate expression data types.
*/
int is_reloc(expr *);
int is_simple(expr *);
int is_really_simple(expr *);
int is_unknown(expr *);
int is_just_unknown(expr *);
int64_t reloc_value(expr *);
int32_t reloc_seg(expr *);
int32_t reloc_wrt(expr *);
/* /*
* The evaluator can also return hints about which of two registers * The evaluator can also return hints about which of two registers
* used in an expression should be the base register. See also the * used in an expression should be the base register. See also the
* `operand' structure. * `operand' structure.
*/ */
struct eval_hints { struct eval_hints {
int base; int64_t base;
int type; int type;
}; };
@ -256,7 +307,7 @@ struct eval_hints {
* it will start by calling the scanner. * it will start by calling the scanner.
* *
* If a forward reference happens during evaluation, the evaluator * If a forward reference happens during evaluation, the evaluator
* must set `*fwref' to TRUE if `fwref' is non-NULL. * must set `*fwref' to true if `fwref' is non-NULL.
* *
* `critical' is non-zero if the expression may not contain forward * `critical' is non-zero if the expression may not contain forward
* references. The evaluator will report its own error if this * references. The evaluator will report its own error if this
@ -274,33 +325,38 @@ struct eval_hints {
* the base register in complex effective addresses. * the base register in complex effective addresses.
*/ */
#define CRITICAL 0x100 #define CRITICAL 0x100
typedef expr *(*evalfunc) (scanner sc, void *scprivate, struct tokenval *tv, typedef expr *(*evalfunc) (scanner sc, void *scprivate,
int *fwref, int critical, efunc error, struct tokenval * tv, int *fwref, int critical,
struct eval_hints *hints); efunc error, struct eval_hints * hints);
/* /*
* Special values for expr->type. ASSUMPTION MADE HERE: the number * Special values for expr->type. These come after EXPR_REG_END
* of distinct register names (i.e. possible "type" fields for an * as defined in regs.h.
* expr structure) does not exceed 124 (EXPR_REG_START through
* EXPR_REG_END).
*/ */
#define EXPR_REG_START 1
#define EXPR_REG_END 124 #define EXPR_UNKNOWN (EXPR_REG_END+1) /* forward references */
#define EXPR_UNKNOWN 125L /* for forward references */ #define EXPR_SIMPLE (EXPR_REG_END+2)
#define EXPR_SIMPLE 126L #define EXPR_WRT (EXPR_REG_END+3)
#define EXPR_WRT 127L #define EXPR_SEGBASE (EXPR_REG_END+4)
#define EXPR_SEGBASE 128L
/* /*
* Preprocessors ought to look like this: * Linked list of strings...
*/ */
typedef struct { typedef struct string_list {
struct string_list *next;
char str[1];
} StrList;
/*
* preprocessors ought to look like this:
*/
typedef struct preproc_ops {
/* /*
* Called at the start of a pass; given a file name, the number * Called at the start of a pass; given a file name, the number
* of the pass, an error reporting function, an evaluator * of the pass, an error reporting function, an evaluator
* function, and a listing generator to talk to. * function, and a listing generator to talk to.
*/ */
void (*reset) (char *, int, efunc, evalfunc, ListGen *); void (*reset) (char *, int, ListGen *, StrList **);
/* /*
* Called to fetch a line of preprocessed source. The line * Called to fetch a line of preprocessed source. The line
@ -315,6 +371,8 @@ typedef struct {
void (*cleanup) (int); void (*cleanup) (int);
} Preproc; } Preproc;
extern Preproc nasmpp;
/* /*
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* Some lexical properties of the NASM source language, included * Some lexical properties of the NASM source language, included
@ -330,15 +388,15 @@ typedef struct {
* start. * start.
*/ */
#define isidstart(c) ( isalpha(c) || (c)=='_' || (c)=='.' || (c)=='?' \ #define isidstart(c) ( nasm_isalpha(c) || (c)=='_' || (c)=='.' || (c)=='?' \
|| (c)=='@' ) || (c)=='@' )
#define isidchar(c) ( isidstart(c) || isdigit(c) || (c)=='$' || (c)=='#' \ #define isidchar(c) ( isidstart(c) || nasm_isdigit(c) || \
|| (c)=='~' ) (c)=='$' || (c)=='#' || (c)=='~' )
/* Ditto for numeric constants. */ /* Ditto for numeric constants. */
#define isnumstart(c) ( isdigit(c) || (c)=='$' ) #define isnumstart(c) ( nasm_isdigit(c) || (c)=='$' )
#define isnumchar(c) ( isalnum(c) ) #define isnumchar(c) ( nasm_isalnum(c) || (c)=='_' )
/* This returns the numeric value of a given 'digit'. */ /* This returns the numeric value of a given 'digit'. */
@ -359,86 +417,38 @@ enum {
* ----------------------------------------------------------- * -----------------------------------------------------------
*/ */
/*
* Here we define the operand types. These are implemented as bit
* masks, since some are subsets of others; e.g. AX in a MOV
* instruction is a special operand type, whereas AX in other
* contexts is just another 16-bit register. (Also, consider CL in
* shift instructions, DX in OUT, etc.)
*/
/* size, and other attributes, of the operand */
#define BITS8 0x00000001L
#define BITS16 0x00000002L
#define BITS32 0x00000004L
#define BITS64 0x00000008L /* FPU only */
#define BITS80 0x00000010L /* FPU only */
#define FAR 0x00000020L /* grotty: this means 16:16 or */
/* 16:32, like in CALL/JMP */
#define NEAR 0x00000040L
#define SHORT 0x00000080L /* and this means what it says :) */
#define SIZE_MASK 0x000000FFL /* all the size attributes */
#define NON_SIZE (~SIZE_MASK)
#define TO 0x00000100L /* reverse effect in FADD, FSUB &c */
#define COLON 0x00000200L /* operand is followed by a colon */
#define STRICT 0x00000400L /* do not optimize this operand */
/* type of operand: memory reference, register, etc. */
#define MEMORY 0x00204000L
#define REGISTER 0x00001000L /* register number in 'basereg' */
#define IMMEDIATE 0x00002000L
#define REGMEM 0x00200000L /* for r/m, ie EA, operands */
#define REGNORM 0x00201000L /* 'normal' reg, qualifies as EA */
#define REG8 0x00201001L
#define REG16 0x00201002L
#define REG32 0x00201004L
#define MMXREG 0x00201008L /* MMX registers */
#define XMMREG 0x00201010L /* XMM Katmai reg */
#define FPUREG 0x01000000L /* floating point stack registers */
#define FPU0 0x01000800L /* FPU stack register zero */
/* special register operands: these may be treated differently */
#define REG_SMASK 0x00070000L /* a mask for the following */
#define REG_ACCUM 0x00211000L /* accumulator: AL, AX or EAX */
#define REG_AL 0x00211001L /* REG_ACCUM | BITSxx */
#define REG_AX 0x00211002L /* ditto */
#define REG_EAX 0x00211004L /* and again */
#define REG_COUNT 0x00221000L /* counter: CL, CX or ECX */
#define REG_CL 0x00221001L /* REG_COUNT | BITSxx */
#define REG_CX 0x00221002L /* ditto */
#define REG_ECX 0x00221004L /* another one */
#define REG_DL 0x00241001L
#define REG_DX 0x00241002L
#define REG_EDX 0x00241004L
#define REG_SREG 0x00081002L /* any segment register */
#define REG_CS 0x01081002L /* CS */
#define REG_DESS 0x02081002L /* DS, ES, SS (non-CS 86 registers) */
#define REG_FSGS 0x04081002L /* FS, GS (386 extended registers) */
#define REG_SEG67 0x08081002L /* Non-implemented segment registers */
#define REG_CDT 0x00101004L /* CRn, DRn and TRn */
#define REG_CREG 0x08101004L /* CRn */
#define REG_DREG 0x10101004L /* DRn */
#define REG_TREG 0x20101004L /* TRn */
/* special type of EA */
#define MEM_OFFS 0x00604000L /* simple [address] offset */
/* special type of immediate operand */
#define ONENESS 0x00800000L /* so UNITY == IMMEDIATE | ONENESS */
#define UNITY 0x00802000L /* for shift/rotate instructions */
#define BYTENESS 0x40000000L /* so SBYTE == IMMEDIATE | BYTENESS */
#define SBYTE 0x40002000L /* for op r16/32,immediate instrs. */
/* Register names automatically generated from regs.dat */ /* Register names automatically generated from regs.dat */
#include "regs.h" #include "regs.h"
enum { /* condition code names */ enum ccode { /* condition code names */
C_A, C_AE, C_B, C_BE, C_C, C_E, C_G, C_GE, C_L, C_LE, C_NA, C_NAE, C_A, C_AE, C_B, C_BE, C_C, C_E, C_G, C_GE, C_L, C_LE, C_NA, C_NAE,
C_NB, C_NBE, C_NC, C_NE, C_NG, C_NGE, C_NL, C_NLE, C_NO, C_NP, C_NB, C_NBE, C_NC, C_NE, C_NG, C_NGE, C_NL, C_NLE, C_NO, C_NP,
C_NS, C_NZ, C_O, C_P, C_PE, C_PO, C_S, C_Z C_NS, C_NZ, C_O, C_P, C_PE, C_PO, C_S, C_Z,
C_none = -1
};
/*
* REX flags
*/
#define REX_REAL 0x4f /* Actual REX prefix bits */
#define REX_B 0x01 /* ModRM r/m extension */
#define REX_X 0x02 /* SIB index extension */
#define REX_R 0x04 /* ModRM reg extension */
#define REX_W 0x08 /* 64-bit operand size */
#define REX_L 0x20 /* Use LOCK prefix instead of REX.R */
#define REX_P 0x40 /* REX prefix present/required */
#define REX_H 0x80 /* High register present, REX forbidden */
#define REX_D 0x0100 /* Instruction uses DREX instead of REX */
#define REX_OC 0x0200 /* DREX suffix has the OC0 bit set */
#define REX_V 0x0400 /* Instruction uses VEX/XOP instead of REX */
#define REX_NH 0x0800 /* Instruction which doesn't use high regs */
/*
* REX_V "classes" (prefixes which behave like VEX)
*/
enum vex_class {
RV_VEX = 0, /* C4/C5 */
RV_XOP = 1 /* 8F */
}; };
/* /*
@ -446,68 +456,104 @@ enum { /* condition code names */
* prefixes, we must ensure the enumerations for prefixes and * prefixes, we must ensure the enumerations for prefixes and
* register names do not overlap. * register names do not overlap.
*/ */
enum { /* instruction prefixes */ enum prefixes { /* instruction prefixes */
P_none = 0,
PREFIX_ENUM_START = REG_ENUM_LIMIT, PREFIX_ENUM_START = REG_ENUM_LIMIT,
P_A16 = PREFIX_ENUM_START, P_A32, P_LOCK, P_O16, P_O32, P_REP, P_REPE, P_A16 = PREFIX_ENUM_START, P_A32, P_A64, P_ASP,
P_REPNE, P_REPNZ, P_REPZ, P_TIMES P_LOCK, P_O16, P_O32, P_O64, P_OSP,
P_REP, P_REPE, P_REPNE, P_REPNZ, P_REPZ, P_TIMES,
P_WAIT,
PREFIX_ENUM_LIMIT
}; };
enum { /* extended operand types */ enum extop_type { /* extended operand types */
EOT_NOTHING, EOT_DB_STRING, EOT_DB_NUMBER EOT_NOTHING,
EOT_DB_STRING, /* Byte string */
EOT_DB_STRING_FREE, /* Byte string which should be nasm_free'd*/
EOT_DB_NUMBER, /* Integer */
}; };
enum { /* special EA flags */ enum ea_flags { /* special EA flags */
EAF_BYTEOFFS = 1, /* force offset part to byte size */ EAF_BYTEOFFS = 1, /* force offset part to byte size */
EAF_WORDOFFS = 2, /* force offset part to [d]word size */ EAF_WORDOFFS = 2, /* force offset part to [d]word size */
EAF_TIMESTWO = 4 /* really do EAX*2 not EAX+EAX */ EAF_TIMESTWO = 4, /* really do EAX*2 not EAX+EAX */
EAF_REL = 8, /* IP-relative addressing */
EAF_ABS = 16, /* non-IP-relative addressing */
EAF_FSGS = 32 /* fs/gs segment override present */
}; };
enum { /* values for `hinttype' */ enum eval_hint { /* values for `hinttype' */
EAH_NOHINT = 0, /* no hint at all - our discretion */ EAH_NOHINT = 0, /* no hint at all - our discretion */
EAH_MAKEBASE = 1, /* try to make given reg the base */ EAH_MAKEBASE = 1, /* try to make given reg the base */
EAH_NOTBASE = 2 /* try _not_ to make reg the base */ EAH_NOTBASE = 2 /* try _not_ to make reg the base */
}; };
typedef struct { /* operand to an instruction */ typedef struct operand { /* operand to an instruction */
long type; /* type of operand */ opflags_t type; /* type of operand */
int addr_size; /* 0 means default; 16; 32 */ int disp_size; /* 0 means default; 16; 32; 64 */
int basereg, indexreg, scale; /* registers and scale involved */ enum reg_enum basereg, indexreg; /* address registers */
int hintbase, hinttype; /* hint as to real base register */ int scale; /* index scale */
long segment; /* immediate segment, if needed */ int hintbase;
long offset; /* any immediate number */ enum eval_hint hinttype; /* hint as to real base register */
long wrt; /* segment base it's relative to */ int32_t segment; /* immediate segment, if needed */
int eaflags; /* special EA flags */ int64_t offset; /* any immediate number */
int opflags; /* see OPFLAG_* defines below */ int32_t wrt; /* segment base it's relative to */
int eaflags; /* special EA flags */
int opflags; /* see OPFLAG_* defines below */
} operand; } operand;
#define OPFLAG_FORWARD 1 /* operand is a forward reference */ #define OPFLAG_FORWARD 1 /* operand is a forward reference */
#define OPFLAG_EXTERN 2 /* operand is an external reference */ #define OPFLAG_EXTERN 2 /* operand is an external reference */
#define OPFLAG_UNKNOWN 4 /* operand is an unknown reference */
/* (always a forward reference also) */
typedef struct extop { /* extended operand */ typedef struct extop { /* extended operand */
struct extop *next; /* linked list */ struct extop *next; /* linked list */
long type; /* defined above */ char *stringval; /* if it's a string, then here it is */
char *stringval; /* if it's a string, then here it is */ size_t stringlen; /* ... and here's how long it is */
int stringlen; /* ... and here's how long it is */ int64_t offset; /* ... it's given here ... */
long segment; /* if it's a number/address, then... */ int32_t segment; /* if it's a number/address, then... */
long offset; /* ... it's given here ... */ int32_t wrt; /* ... and here */
long wrt; /* ... and here */ enum extop_type type; /* defined above */
} extop; } extop;
#define MAXPREFIX 4 /* Prefix positions: each type of prefix goes in a specific slot.
This affects the final ordering of the assembled output, which
shouldn't matter to the processor, but if you have stylistic
preferences, you can change this. REX prefixes are handled
differently for the time being.
typedef struct { /* an instruction itself */ Note that LOCK and REP are in the same slot. This is
char *label; /* the label defined, or NULL */ an x86 architectural constraint. */
int prefixes[MAXPREFIX]; /* instruction prefixes, if any */ enum prefix_pos {
int nprefix; /* number of entries in above */ PPS_WAIT, /* WAIT (technically not a prefix!) */
int opcode; /* the opcode - not just the string */ PPS_LREP, /* Lock or REP prefix */
int condition; /* the condition code, if Jcc/SETcc */ PPS_SEG, /* Segment override prefix */
int operands; /* how many operands? 0-3 PPS_OSIZE, /* Operand size prefix */
* (more if db et al) */ PPS_ASIZE, /* Address size prefix */
operand oprs[3]; /* the operands, defined as above */ MAXPREFIX /* Total number of prefix slots */
extop *eops; /* extended operands */ };
int eops_float; /* true if DD and floating */
long times; /* repeat count (TIMES prefix) */ /* If you need to change this, also change it in insns.pl */
int forw_ref; /* is there a forward reference? */ #define MAX_OPERANDS 5
typedef struct insn { /* an instruction itself */
char *label; /* the label defined, or NULL */
enum prefixes prefixes[MAXPREFIX]; /* instruction prefixes, if any */
enum opcode opcode; /* the opcode - not just the string */
enum ccode condition; /* the condition code, if Jcc/SETcc */
int operands; /* how many operands? 0-3
* (more if db et al) */
int addr_size; /* address size */
operand oprs[MAX_OPERANDS]; /* the operands, defined as above */
extop *eops; /* extended operands */
int eops_float; /* true if DD and floating */
int32_t times; /* repeat count (TIMES prefix) */
bool forw_ref; /* is there a forward reference? */
int rex; /* Special REX Prefix */
int drexdst; /* Destination register for DREX/VEX suffix */
int vex_cm; /* Class and M field for VEX prefix */
int vex_wlp; /* W, P and L information for VEX prefix */
} insn; } insn;
enum geninfo { GI_SWITCH }; enum geninfo { GI_SWITCH };
@ -518,6 +564,8 @@ enum geninfo { GI_SWITCH };
* ------------------------------------------------------------ * ------------------------------------------------------------
*/ */
typedef const unsigned char macros_t;
struct ofmt { struct ofmt {
/* /*
* This is a short (one-liner) description of the type of * This is a short (one-liner) description of the type of
@ -531,11 +579,10 @@ struct ofmt {
const char *shortname; const char *shortname;
/* /*
* this is reserved for out module specific help. * Output format flags.
* It is set to NULL in all the out modules but is not implemented
* in the main program
*/ */
const char *helpstring; #define OFMT_TEXT 1 /* Text file format */
unsigned int flags;
/* /*
* this is a pointer to the first element of the debug information * this is a pointer to the first element of the debug information
@ -549,7 +596,7 @@ struct ofmt {
* an output format, be sure to set this to whatever default you want * an output format, be sure to set this to whatever default you want
* *
*/ */
struct dfmt *current_dfmt; const struct dfmt *current_dfmt;
/* /*
* This, if non-NULL, is a NULL-terminated list of `char *'s * This, if non-NULL, is a NULL-terminated list of `char *'s
@ -558,16 +605,13 @@ struct ofmt {
* and user-level equivalents for any format-specific * and user-level equivalents for any format-specific
* directives). * directives).
*/ */
const char **stdmac; macros_t *stdmac;
/* /*
* This procedure is called at the start of an output session. * This procedure is called at the start of an output session to set
* It tells the output format what file it will be writing to, * up internal parameters.
* what routine to report errors through, and how to interface
* to the label manager and expression evaluator if necessary.
* It also gives it a chance to do other initialisation.
*/ */
void (*init) (FILE *fp, efunc error, ldfunc ldef, evalfunc eval); void (*init)(void);
/* /*
* This procedure is called to pass generic information to the * This procedure is called to pass generic information to the
@ -576,7 +620,7 @@ struct ofmt {
* and the second parameter gives the value. This function returns * and the second parameter gives the value. This function returns
* 1 if recognized, 0 if unrecognized * 1 if recognized, 0 if unrecognized
*/ */
int (*setinfo)(enum geninfo type, char **string); int (*setinfo) (enum geninfo type, char **string);
/* /*
* This procedure is called by assemble() to write actual * This procedure is called by assemble() to write actual
@ -587,8 +631,9 @@ struct ofmt {
* The `type' argument specifies the type of output data, and * The `type' argument specifies the type of output data, and
* usually the size as well: its contents are described below. * usually the size as well: its contents are described below.
*/ */
void (*output) (long segto, const void *data, unsigned long type, void (*output) (int32_t segto, const void *data,
long segment, long wrt); enum out_type type, uint64_t size,
int32_t segment, int32_t wrt);
/* /*
* This procedure is called once for every symbol defined in * This procedure is called once for every symbol defined in
@ -618,8 +663,8 @@ struct ofmt {
* been an EXTERN, a COMMON or a GLOBAL. The distinction should * been an EXTERN, a COMMON or a GLOBAL. The distinction should
* be obvious to the output format from the other parameters. * be obvious to the output format from the other parameters.
*/ */
void (*symdef) (char *name, long segment, long offset, int is_global, void (*symdef) (char *name, int32_t segment, int64_t offset,
char *special); int is_global, char *special);
/* /*
* This procedure is called when the source code requests a * This procedure is called when the source code requests a
@ -636,7 +681,7 @@ struct ofmt {
* the segment, by setting `*bits' to 16 or 32. Or, if it * the segment, by setting `*bits' to 16 or 32. Or, if it
* doesn't wish to define a default, it can leave `bits' alone. * doesn't wish to define a default, it can leave `bits' alone.
*/ */
long (*section) (char *name, int pass, int *bits); int32_t (*section) (char *name, int pass, int *bits);
/* /*
* This procedure is called to modify the segment base values * This procedure is called to modify the segment base values
@ -651,7 +696,7 @@ struct ofmt {
* responsible for throwing an error condition if that occurs * responsible for throwing an error condition if that occurs
* in pass two or in a critical expression. * in pass two or in a critical expression.
*/ */
long (*segbase) (long segment); int32_t (*segbase) (int32_t segment);
/* /*
* This procedure is called to allow the output driver to * This procedure is called to allow the output driver to
@ -667,7 +712,7 @@ struct ofmt {
* should also return non-zero if it correctly processes the * should also return non-zero if it correctly processes the
* directive. * directive.
*/ */
int (*directive) (char *directive, char *value, int pass); int (*directive)(enum directives directive, char *value, int pass);
/* /*
* This procedure is called before anything else - even before * This procedure is called before anything else - even before
@ -676,7 +721,7 @@ struct ofmt {
* should return its preferred name for the output file in * should return its preferred name for the output file in
* `outname', if outname[0] is not '\0', and do nothing to * `outname', if outname[0] is not '\0', and do nothing to
* `outname' otherwise. Since it is called before the driver is * `outname' otherwise. Since it is called before the driver is
* properly initialised, it has to be passed its error handler * properly initialized, it has to be passed its error handler
* separately. * separately.
* *
* This procedure may also take its own copy of the input file * This procedure may also take its own copy of the input file
@ -686,7 +731,7 @@ struct ofmt {
* The parameter `outname' points to an area of storage * The parameter `outname' points to an area of storage
* guaranteed to be at least FILENAME_MAX in size. * guaranteed to be at least FILENAME_MAX in size.
*/ */
void (*filename) (char *inname, char *outname, efunc error); void (*filename) (char *inname, char *outname);
/* /*
* This procedure is called after assembly finishes, to allow * This procedure is called after assembly finishes, to allow
@ -700,31 +745,8 @@ struct ofmt {
void (*cleanup) (int debuginfo); void (*cleanup) (int debuginfo);
}; };
/* extern struct ofmt *ofmt;
* values for the `type' parameter to an output function. Each one extern FILE *ofile;
* must have the actual number of _bytes_ added to it.
*
* Exceptions are OUT_RELxADR, which denote an x-byte relocation
* which will be a relative jump. For this we need to know the
* distance in bytes from the start of the relocated record until
* the end of the containing instruction. _This_ is what is stored
* in the size part of the parameter, in this case.
*
* Also OUT_RESERVE denotes reservation of N bytes of BSS space,
* and the contents of the "data" parameter is irrelevant.
*
* The "data" parameter for the output function points to a "long",
* containing the address in question, unless the type is
* OUT_RAWDATA, in which case it points to an "unsigned char"
* array.
*/
#define OUT_RAWDATA 0x00000000UL
#define OUT_ADDRESS 0x10000000UL
#define OUT_REL2ADR 0x20000000UL
#define OUT_REL4ADR 0x30000000UL
#define OUT_RESERVE 0x40000000UL
#define OUT_TYPMASK 0xF0000000UL
#define OUT_SIZMASK 0x0FFFFFFFUL
/* /*
* ------------------------------------------------------------ * ------------------------------------------------------------
@ -734,7 +756,6 @@ struct ofmt {
*/ */
struct dfmt { struct dfmt {
/* /*
* This is a short (one-liner) description of the type of * This is a short (one-liner) description of the type of
* output generated by the driver. * output generated by the driver.
@ -746,19 +767,16 @@ struct dfmt {
*/ */
const char *shortname; const char *shortname;
/* /*
* init - called initially to set up local pointer to object format, * init - called initially to set up local pointer to object format.
* void pointer to implementation defined data, file pointer (which
* probably won't be used, but who knows?), and error function.
*/ */
void (*init) (struct ofmt * of, void * id, FILE * fp, efunc error); void (*init)(void);
/* /*
* linenum - called any time there is output with a change of * linenum - called any time there is output with a change of
* line number or file. * line number or file.
*/ */
void (*linenum) (const char * filename, long linenumber, long segto); void (*linenum)(const char *filename, int32_t linenumber, int32_t segto);
/* /*
* debug_deflabel - called whenever a label is defined. Parameters * debug_deflabel - called whenever a label is defined. Parameters
@ -766,8 +784,8 @@ struct dfmt {
* would be called before the output format version. * would be called before the output format version.
*/ */
void (*debug_deflabel) (char * name, long segment, long offset, void (*debug_deflabel)(char *name, int32_t segment, int64_t offset,
int is_global, char * special); int is_global, char *special);
/* /*
* debug_directive - called whenever a DEBUG directive other than 'LINE' * debug_directive - called whenever a DEBUG directive other than 'LINE'
* is encountered. 'directive' contains the first parameter to the * is encountered. 'directive' contains the first parameter to the
@ -776,27 +794,29 @@ struct dfmt {
* function with 'directive' equal to "VAR" and 'params' equal to * function with 'directive' equal to "VAR" and 'params' equal to
* "_somevar:int". * "_somevar:int".
*/ */
void (*debug_directive) (const char * directive, const char * params); void (*debug_directive)(const char *directive, const char *params);
/* /*
* typevalue - called whenever the assembler wishes to register a type * typevalue - called whenever the assembler wishes to register a type
* for the last defined label. This routine MUST detect if a type was * for the last defined label. This routine MUST detect if a type was
* already registered and not re-register it. * already registered and not re-register it.
*/ */
void (*debug_typevalue) (long type); void (*debug_typevalue)(int32_t type);
/* /*
* debug_output - called whenever output is required * debug_output - called whenever output is required
* 'type' is the type of info required, and this is format-specific * 'type' is the type of info required, and this is format-specific
*/ */
void (*debug_output) (int type, void *param); void (*debug_output)(int type, void *param);
/* /*
* cleanup - called after processing of file is complete * cleanup - called after processing of file is complete
*/ */
void (*cleanup) (void); void (*cleanup)(void);
}; };
extern const struct dfmt *dfmt;
/* /*
* The type definition macros * The type definition macros
* for debugging * for debugging
@ -814,6 +834,8 @@ struct dfmt {
#define TY_FLOAT 0x28 #define TY_FLOAT 0x28
#define TY_QWORD 0x30 #define TY_QWORD 0x30
#define TY_TBYTE 0x38 #define TY_TBYTE 0x38
#define TY_OWORD 0x40
#define TY_YWORD 0x48
#define TY_COMMON 0xE0 #define TY_COMMON 0xE0
#define TY_SEG 0xE8 #define TY_SEG 0xE8
#define TY_EXTERN 0xF0 #define TY_EXTERN 0xF0
@ -823,21 +845,27 @@ struct dfmt {
#define TYM_ELEMENTS(x) (((x) & 0xFFFFFF00) >> 8) #define TYM_ELEMENTS(x) (((x) & 0xFFFFFF00) >> 8)
#define TYS_ELEMENTS(x) ((x) << 8) #define TYS_ELEMENTS(x) ((x) << 8)
/* /*
* ----- * -----
* Other * Special tokens
* ----- * -----
*/ */
enum special_tokens {
SPECIAL_ENUM_START = PREFIX_ENUM_LIMIT,
S_ABS = SPECIAL_ENUM_START,
S_BYTE, S_DWORD, S_FAR, S_LONG, S_NEAR, S_NOSPLIT,
S_OWORD, S_QWORD, S_REL, S_SHORT, S_STRICT, S_TO, S_TWORD, S_WORD, S_YWORD,
SPECIAL_ENUM_LIMIT
};
/* /*
* This is a useful #define which I keep meaning to use more often: * -----
* the number of elements of a statically defined array. * Global modes
* -----
*/ */
#define elements(x) ( sizeof(x) / sizeof(*(x)) )
extern int tasm_compatible_mode;
/* /*
* This declaration passes the "pass" number to all other modules * This declaration passes the "pass" number to all other modules
* "pass0" assumes the values: 0, 0, ..., 0, 1, 2 * "pass0" assumes the values: 0, 0, ..., 0, 1, 2
@ -846,7 +874,22 @@ extern int tasm_compatible_mode;
* 2 = pass 2 * 2 = pass 2
*/ */
extern int pass0; /* this is globally known */ extern int pass0;
extern int passn; /* Actual pass number */
#define tasm_compatible_mode false
extern int optimizing; extern int optimizing;
extern int globalbits; /* 16, 32 or 64-bit mode */
extern int globalrel; /* default to relative addressing? */
extern int maxbits; /* max bits supported by output */
/*
* NASM version strings, defined in ver.c
*/
extern const char nasm_version[];
extern const char nasm_date[];
extern const char nasm_compile_options[];
extern const char nasm_comment[];
extern const char nasm_signature[];
#endif #endif

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,68 @@
/* nasmlib.h header file for nasmlib.c /* ----------------------------------------------------------------------- *
* *
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and * Copyright 1996-2009 The NASM Authors - All Rights Reserved
* Julian Hall. All rights reserved. The software is * See the file AUTHORS included with the NASM distribution for
* redistributable under the licence given in the file "Licence" * the specific copyright holders.
* distributed in the NASM archive. *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* nasmlib.h header file for nasmlib.c
*/ */
#ifndef NASM_NASMLIB_H #ifndef NASM_NASMLIB_H
#define NASM_NASMLIB_H #define NASM_NASMLIB_H
#include "compiler.h"
#include "inttypes.h"
#include <stdio.h>
#include <string.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
/*
* tolower table -- avoids a function call on some platforms.
* NOTE: unlike the tolower() function in ctype, EOF is *NOT*
* a permitted value, for obvious reasons.
*/
void tolower_init(void);
extern unsigned char nasm_tolower_tab[256];
#define nasm_tolower(x) nasm_tolower_tab[(unsigned char)(x)]
/* Wrappers around <ctype.h> functions */
/* These are only valid for values that cannot include EOF */
#define nasm_isspace(x) isspace((unsigned char)(x))
#define nasm_isalpha(x) isalpha((unsigned char)(x))
#define nasm_isdigit(x) isdigit((unsigned char)(x))
#define nasm_isalnum(x) isalnum((unsigned char)(x))
#define nasm_isxdigit(x) isxdigit((unsigned char)(x))
/* /*
* If this is defined, the wrappers around malloc et al will * If this is defined, the wrappers around malloc et al will
* transform into logging variants, which will cause NASM to create * transform into logging variants, which will cause NASM to create
@ -18,6 +72,65 @@
*/ */
/* #define LOGALLOC */ /* #define LOGALLOC */
/*
* -------------------------
* Error reporting functions
* -------------------------
*/
/*
* An error reporting function should look like this.
*/
typedef void (*efunc) (int severity, const char *fmt, ...);
typedef void (*vefunc) (int severity, const char *fmt, va_list ap);
#ifdef __GNUC__
void nasm_error(int severity, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
#else
void nasm_error(int severity, const char *fmt, ...);
#endif
void nasm_set_verror(vefunc);
/*
* These are the error severity codes which get passed as the first
* argument to an efunc.
*/
#define ERR_DEBUG 0x00000008 /* put out debugging message */
#define ERR_WARNING 0x00000000 /* warn only: no further action */
#define ERR_NONFATAL 0x00000001 /* terminate assembly after phase */
#define ERR_FATAL 0x00000002 /* instantly fatal: exit with error */
#define ERR_PANIC 0x00000003 /* internal error: panic instantly
* and dump core for reference */
#define ERR_MASK 0x0000000F /* mask off the above codes */
#define ERR_NOFILE 0x00000010 /* don't give source file name/line */
#define ERR_USAGE 0x00000020 /* print a usage message */
#define ERR_PASS1 0x00000040 /* only print this error on pass one */
#define ERR_PASS2 0x00000080
#define ERR_NO_SEVERITY 0x00000100 /* suppress printing severity */
/*
* These codes define specific types of suppressible warning.
*/
#define ERR_WARN_MASK 0xFFFFF000 /* the mask for this feature */
#define ERR_WARN_SHR 12 /* how far to shift right */
#define WARN(x) ((x) << ERR_WARN_SHR)
#define ERR_WARN_MNP WARN( 1) /* macro-num-parameters warning */
#define ERR_WARN_MSR WARN( 2) /* macro self-reference */
#define ERR_WARN_MDP WARN( 3) /* macro default parameters check */
#define ERR_WARN_OL WARN( 4) /* orphan label (no colon, and
* alone on line) */
#define ERR_WARN_NOV WARN( 5) /* numeric overflow */
#define ERR_WARN_GNUELF WARN( 6) /* using GNU ELF extensions */
#define ERR_WARN_FL_OVERFLOW WARN( 7) /* FP overflow */
#define ERR_WARN_FL_DENORM WARN( 8) /* FP denormal */
#define ERR_WARN_FL_UNDERFLOW WARN( 9) /* FP underflow */
#define ERR_WARN_FL_TOOLONG WARN(10) /* FP too many digits */
#define ERR_WARN_USER WARN(11) /* %warning directives */
#define ERR_WARN_MAX 11 /* the highest numbered one */
/* /*
* Wrappers around malloc, realloc and free. nasm_malloc will * Wrappers around malloc, realloc and free. nasm_malloc will
* fatal-error and die rather than return NULL; nasm_realloc will * fatal-error and die rather than return NULL; nasm_realloc will
@ -25,81 +138,127 @@
* passed a NULL pointer; nasm_free will do nothing if it is passed * passed a NULL pointer; nasm_free will do nothing if it is passed
* a NULL pointer. * a NULL pointer.
*/ */
#ifdef NASM_NASM_H /* need efunc defined for this */ void nasm_init_malloc_error(void);
void nasm_set_malloc_error (efunc);
#ifndef LOGALLOC #ifndef LOGALLOC
void *nasm_malloc (size_t); void *nasm_malloc(size_t);
void *nasm_realloc (void *, size_t); void *nasm_zalloc(size_t);
void nasm_free (void *); void *nasm_realloc(void *, size_t);
char *nasm_strdup (const char *); void nasm_free(void *);
char *nasm_strndup (char *, size_t); char *nasm_strdup(const char *);
char *nasm_strndup(const char *, size_t);
#else #else
void *nasm_malloc_log (char *, int, size_t); void *nasm_malloc_log(const char *, int, size_t);
void *nasm_realloc_log (char *, int, void *, size_t); void *nasm_zalloc_log(const char *, int, size_t);
void nasm_free_log (char *, int, void *); void *nasm_realloc_log(const char *, int, void *, size_t);
char *nasm_strdup_log (char *, int, const char *); void nasm_free_log(const char *, int, void *);
char *nasm_strndup_log (char *, int, char *, size_t); char *nasm_strdup_log(const char *, int, const char *);
char *nasm_strndup_log(const char *, int, const char *, size_t);
#define nasm_malloc(x) nasm_malloc_log(__FILE__,__LINE__,x) #define nasm_malloc(x) nasm_malloc_log(__FILE__,__LINE__,x)
#define nasm_zalloc(x) nasm_zalloc_log(__FILE__,__LINE__,x)
#define nasm_realloc(x,y) nasm_realloc_log(__FILE__,__LINE__,x,y) #define nasm_realloc(x,y) nasm_realloc_log(__FILE__,__LINE__,x,y)
#define nasm_free(x) nasm_free_log(__FILE__,__LINE__,x) #define nasm_free(x) nasm_free_log(__FILE__,__LINE__,x)
#define nasm_strdup(x) nasm_strdup_log(__FILE__,__LINE__,x) #define nasm_strdup(x) nasm_strdup_log(__FILE__,__LINE__,x)
#define nasm_strndup(x,y) nasm_strndup_log(__FILE__,__LINE__,x,y) #define nasm_strndup(x,y) nasm_strndup_log(__FILE__,__LINE__,x,y)
#endif #endif
#endif
/*
* NASM assert failure
*/
no_return nasm_assert_failed(const char *, int, const char *);
#define nasm_assert(x) \
do { \
if (unlikely(!(x))) \
nasm_assert_failed(__FILE__,__LINE__,#x); \
} while (0)
/*
* NASM failure at build time if x != 0
*/
#define nasm_build_assert(x) (void)(sizeof(char[1-2*!!(x)]))
/* /*
* ANSI doesn't guarantee the presence of `stricmp' or * ANSI doesn't guarantee the presence of `stricmp' or
* `strcasecmp'. * `strcasecmp'.
*/ */
#if defined(stricmp) || defined(strcasecmp) #if defined(HAVE_STRCASECMP)
#if defined(stricmp) #define nasm_stricmp strcasecmp
#elif defined(HAVE_STRICMP)
#define nasm_stricmp stricmp #define nasm_stricmp stricmp
#else #else
#define nasm_stricmp strcasecmp int nasm_stricmp(const char *, const char *);
#endif
#else
int nasm_stricmp (const char *, const char *);
#endif #endif
#if defined(strnicmp) || defined(strncasecmp) #if defined(HAVE_STRNCASECMP)
#if defined(strnicmp) #define nasm_strnicmp strncasecmp
#elif defined(HAVE_STRNICMP)
#define nasm_strnicmp strnicmp #define nasm_strnicmp strnicmp
#else #else
#define nasm_strnicmp strncasecmp int nasm_strnicmp(const char *, const char *, size_t);
#endif #endif
int nasm_memicmp(const char *, const char *, size_t);
#if defined(HAVE_STRSEP)
#define nasm_strsep strsep
#else #else
int nasm_strnicmp (const char *, const char *, int); char *nasm_strsep(char **stringp, const char *delim);
#endif #endif
/* /*
* Convert a string into a number, using NASM number rules. Sets * Convert a string into a number, using NASM number rules. Sets
* `*error' to TRUE if an error occurs, and FALSE otherwise. * `*error' to true if an error occurs, and false otherwise.
*/ */
long readnum(char *str, int *error); int64_t readnum(char *str, bool *error);
/* /*
* Convert a character constant into a number. Sets * Convert a character constant into a number. Sets
* `*warn' to TRUE if an overflow occurs, and FALSE otherwise. * `*warn' to true if an overflow occurs, and false otherwise.
* str points to and length covers the middle of the string, * str points to and length covers the middle of the string,
* without the quotes. * without the quotes.
*/ */
long readstrnum(char *str, int length, int *warn); int64_t readstrnum(char *str, int length, bool *warn);
/* /*
* seg_init: Initialise the segment-number allocator. * seg_init: Initialise the segment-number allocator.
* seg_alloc: allocate a hitherto unused segment number. * seg_alloc: allocate a hitherto unused segment number.
*/ */
void seg_init(void); void seg_init(void);
long seg_alloc(void); int32_t seg_alloc(void);
/* /*
* many output formats will be able to make use of this: a standard * many output formats will be able to make use of this: a standard
* function to add an extension to the name of the input file * function to add an extension to the name of the input file
*/ */
#ifdef NASM_NASM_H void standard_extension(char *inname, char *outname, char *extension);
void standard_extension (char *inname, char *outname, char *extension,
efunc error); /*
#endif * Utility macros...
*
* This is a useful #define which I keep meaning to use more often:
* the number of elements of a statically defined array.
*/
#define elements(x) ( sizeof(x) / sizeof(*(x)) )
/*
* List handling
*
* list_for_each - regular iterator over list
* list_for_each_safe - the same but safe against list items removal
*/
#define list_for_each(pos, head) \
for (pos = head; pos; pos = pos->next)
#define list_for_each_safe(pos, n, head) \
for (pos = head, n = (pos ? pos->next : NULL); pos; \
pos = n, n = (n ? n->next : NULL))
/*
* Power of 2 align helpers
*/
#define ALIGN_MASK(v, mask) (((v) + (mask)) & ~(mask))
#define ALIGN(v, a) ALIGN_MASK(v, (a) - 1)
#define IS_ALIGNED(v, a) (((v) & ((a) - 1)) == 0)
/* /*
* some handy macros that will probably be of use in more than one * some handy macros that will probably be of use in more than one
@ -107,157 +266,187 @@ void standard_extension (char *inname, char *outname, char *extension,
* format in memory * format in memory
*/ */
#define WRITECHAR(p,v) \ #if X86_MEMORY
do { \
*(p)++ = (v) & 0xFF; \
} while (0)
#define WRITESHORT(p,v) \ #define WRITECHAR(p,v) \
do { \ do { \
WRITECHAR(p,v); \ *(uint8_t *)(p) = (v); \
WRITECHAR(p,(v) >> 8); \ (p) += 1; \
} while (0) } while (0)
#define WRITELONG(p,v) \ #define WRITESHORT(p,v) \
do { \ do { \
WRITECHAR(p,v); \ *(uint16_t *)(p) = (v); \
WRITECHAR(p,(v) >> 8); \ (p) += 2; \
WRITECHAR(p,(v) >> 16); \ } while (0)
WRITECHAR(p,(v) >> 24); \
} while (0) #define WRITELONG(p,v) \
do { \
*(uint32_t *)(p) = (v); \
(p) += 4; \
} while (0)
#define WRITEDLONG(p,v) \
do { \
*(uint64_t *)(p) = (v); \
(p) += 8; \
} while (0)
#define WRITEADDR(p,v,s) \
do { \
uint64_t _wa_v = (v); \
memcpy((p), &_wa_v, (s)); \
(p) += (s); \
} while (0)
#else /* !X86_MEMORY */
#define WRITECHAR(p,v) \
do { \
uint8_t *_wc_p = (uint8_t *)(p); \
uint8_t _wc_v = (v); \
_wc_p[0] = _wc_v; \
(p) = (void *)(_wc_p + 1); \
} while (0)
#define WRITESHORT(p,v) \
do { \
uint8_t *_ws_p = (uint8_t *)(p); \
uint16_t _ws_v = (v); \
_ws_p[0] = _ws_v; \
_ws_p[1] = _ws_v >> 8; \
(p) = (void *)(_ws_p + 2); \
} while (0)
#define WRITELONG(p,v) \
do { \
uint8_t *_wl_p = (uint8_t *)(p); \
uint32_t _wl_v = (v); \
_wl_p[0] = _wl_v; \
_wl_p[1] = _wl_v >> 8; \
_wl_p[2] = _wl_v >> 16; \
_wl_p[3] = _wl_v >> 24; \
(p) = (void *)(_wl_p + 4); \
} while (0)
#define WRITEDLONG(p,v) \
do { \
uint8_t *_wq_p = (uint8_t *)(p); \
uint64_t _wq_v = (v); \
_wq_p[0] = _wq_v; \
_wq_p[1] = _wq_v >> 8; \
_wq_p[2] = _wq_v >> 16; \
_wq_p[3] = _wq_v >> 24; \
_wq_p[4] = _wq_v >> 32; \
_wq_p[5] = _wq_v >> 40; \
_wq_p[6] = _wq_v >> 48; \
_wq_p[7] = _wq_v >> 56; \
(p) = (void *)(_wq_p + 8); \
} while (0)
#define WRITEADDR(p,v,s) \
do { \
int _wa_s = (s); \
uint64_t _wa_v = (v); \
while (_wa_s--) { \
WRITECHAR(p,_wa_v); \
_wa_v >>= 8; \
} \
} while(0)
#endif
/* /*
* and routines to do the same thing to a file * and routines to do the same thing to a file
*/ */
void fwriteshort (int data, FILE *fp); #define fwriteint8_t(d,f) putc(d,f)
void fwritelong (long data, FILE *fp); void fwriteint16_t(uint16_t data, FILE * fp);
void fwriteint32_t(uint32_t data, FILE * fp);
/* void fwriteint64_t(uint64_t data, FILE * fp);
* Routines to manage a dynamic random access array of longs which void fwriteaddr(uint64_t data, int size, FILE * fp);
* may grow in size to be more than the largest single malloc'able
* chunk.
*/
#define RAA_BLKSIZE 4096 /* this many longs allocated at once */
#define RAA_LAYERSIZE 1024 /* this many _pointers_ allocated */
typedef struct RAA RAA;
typedef union RAA_UNION RAA_UNION;
typedef struct RAA_LEAF RAA_LEAF;
typedef struct RAA_BRANCH RAA_BRANCH;
struct RAA {
/*
* Number of layers below this one to get to the real data. 0
* means this structure is a leaf, holding RAA_BLKSIZE real
* data items; 1 and above mean it's a branch, holding
* RAA_LAYERSIZE pointers to the next level branch or leaf
* structures.
*/
int layers;
/*
* Number of real data items spanned by one position in the
* `data' array at this level. This number is 1, trivially, for
* a leaf (level 0): for a level 1 branch it should be
* RAA_BLKSIZE, and for a level 2 branch it's
* RAA_LAYERSIZE*RAA_BLKSIZE.
*/
long stepsize;
union RAA_UNION {
struct RAA_LEAF {
long data[RAA_BLKSIZE];
} l;
struct RAA_BRANCH {
struct RAA *data[RAA_LAYERSIZE];
} b;
} u;
};
struct RAA *raa_init (void);
void raa_free (struct RAA *);
long raa_read (struct RAA *, long);
struct RAA *raa_write (struct RAA *r, long posn, long value);
/*
* Routines to manage a dynamic sequential-access array, under the
* same restriction on maximum mallocable block. This array may be
* written to in two ways: a contiguous chunk can be reserved of a
* given size, and a pointer returned, or single-byte data may be
* written. The array can also be read back in the same two ways:
* as a series of big byte-data blocks or as a list of structures
* of a given size.
*/
struct SAA {
/*
* members `end' and `elem_len' are only valid in first link in
* list; `rptr' and `rpos' are used for reading
*/
struct SAA *next, *end, *rptr;
long elem_len, length, posn, start, rpos;
char *data;
};
struct SAA *saa_init (long elem_len); /* 1 == byte */
void saa_free (struct SAA *);
void *saa_wstruct (struct SAA *); /* return a structure of elem_len */
void saa_wbytes (struct SAA *, const void *, long); /* write arbitrary bytes */
void saa_rewind (struct SAA *); /* for reading from beginning */
void *saa_rstruct (struct SAA *); /* return NULL on EOA */
void *saa_rbytes (struct SAA *, long *); /* return 0 on EOA */
void saa_rnbytes (struct SAA *, void *, long); /* read a given no. of bytes */
void saa_fread (struct SAA *s, long posn, void *p, long len); /* fixup */
void saa_fwrite (struct SAA *s, long posn, void *p, long len); /* fixup */
void saa_fpwrite (struct SAA *, FILE *);
#ifdef NASM_NASM_H
/*
* Standard scanner.
*/
extern char *stdscan_bufptr;
void stdscan_reset(void);
int stdscan (void *private_data, struct tokenval *tv);
#endif
#ifdef NASM_NASM_H
/*
* Library routines to manipulate expression data types.
*/
int is_reloc(expr *);
int is_simple(expr *);
int is_really_simple (expr *);
int is_unknown(expr *);
int is_just_unknown(expr *);
long reloc_value(expr *);
long reloc_seg(expr *);
long reloc_wrt(expr *);
#endif
/* /*
* Binary search routine. Returns index into `array' of an entry * Binary search routine. Returns index into `array' of an entry
* matching `string', or <0 if no match. `array' is taken to * matching `string', or <0 if no match. `array' is taken to
* contain `size' elements. * contain `size' elements.
*
* bsi() is case sensitive, bsii() is case insensitive.
*/ */
int bsi (char *string, const char **array, int size); int bsi(const char *string, const char **array, int size);
int bsii(const char *string, const char **array, int size);
char *src_set_fname(char *newname); char *src_set_fname(char *newname);
long src_set_linnum(long newline); int32_t src_set_linnum(int32_t newline);
long src_get_linnum(void); int32_t src_get_linnum(void);
/* /*
* src_get may be used if you simply want to know the source file and line. * src_get may be used if you simply want to know the source file and line.
* It is also used if you maintain private status about the source location * It is also used if you maintain private status about the source location
* It return 0 if the information was the same as the last time you * It return 0 if the information was the same as the last time you
* checked, -1 if the name changed and (new-old) if just the line changed. * checked, -1 if the name changed and (new-old) if just the line changed.
*/ */
int src_get(long *xline, char **xname); int src_get(int32_t *xline, char **xname);
void nasm_quote(char **str); char *nasm_strcat(const char *one, const char *two);
char *nasm_strcat(char *one, char *two);
void nasmlib_cleanup(void); char *nasm_skip_spaces(const char *p);
char *nasm_skip_word(const char *p);
char *nasm_zap_spaces_fwd(char *p);
char *nasm_zap_spaces_rev(char *p);
const char *prefix_name(int);
#define ZERO_BUF_SIZE 4096
extern const uint8_t zero_buffer[ZERO_BUF_SIZE];
size_t fwritezero(size_t bytes, FILE *fp);
static inline bool overflow_general(int64_t value, int bytes)
{
int sbit;
int64_t vmax, vmin;
if (bytes >= 8)
return false;
sbit = (bytes << 3) - 1;
vmax = ((int64_t)2 << sbit) - 1;
vmin = -((int64_t)1 << sbit);
return value < vmin || value > vmax;
}
static inline bool overflow_signed(int64_t value, int bytes)
{
int sbit;
int64_t vmax, vmin;
if (bytes >= 8)
return false;
sbit = (bytes << 3) - 1;
vmax = ((int64_t)1 << sbit) - 1;
vmin = -((int64_t)1 << sbit);
return value < vmin || value > vmax;
}
static inline bool overflow_unsigned(int64_t value, int bytes)
{
int sbit;
int64_t vmax, vmin;
if (bytes >= 8)
return false;
sbit = (bytes << 3) - 1;
vmax = ((int64_t)2 << sbit) - 1;
vmin = 0;
return value < vmin || value > vmax;
}
int idata_bytes(int opcode);
/* check if value is power of 2 */
#define is_power2(v) ((v) && ((v) & ((v) - 1)) == 0)
void null_debug_routine(const char *directive, const char *params);
extern struct dfmt null_debug_form;
extern struct dfmt *null_debug_arr[2];
#endif #endif

View file

@ -1,321 +0,0 @@
/* ndisasm.c the Netwide Disassembler main module
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is
* redistributable under the licence given in the file "Licence"
* distributed in the NASM archive.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "insns.h"
#include "nasm.h"
#include "nasmlib.h"
#include "sync.h"
#include "disasm.h"
#define BPL 8 /* bytes per line of hex dump */
static const char *help =
"usage: ndisasm [-a] [-i] [-h] [-r] [-u] [-b bits] [-o origin] [-s sync...]\n"
" [-e bytes] [-k start,bytes] [-p vendor] file\n"
" -a or -i activates auto (intelligent) sync\n"
" -u sets USE32 (32-bit mode)\n"
" -b 16 or -b 32 sets number of bits too\n"
" -h displays this text\n"
" -r or -v displays the version number\n"
" -e skips <bytes> bytes of header\n"
" -k avoids disassembling <bytes> bytes from position <start>\n"
" -p selects the preferred vendor instruction set (intel, amd, cyrix, idt)\n";
static void output_ins (unsigned long, unsigned char *, int, char *);
static void skip (unsigned long dist, FILE *fp);
int main(int argc, char **argv)
{
unsigned char buffer[INSN_MAX * 2], *p, *q;
char outbuf[256];
char *pname = *argv;
char *filename = NULL;
unsigned long nextsync, synclen, initskip = 0L;
int lenread;
long lendis;
int autosync = FALSE;
int bits = 16;
int eof = FALSE;
unsigned long prefer = 0;
int rn_error;
long offset;
FILE *fp;
offset = 0;
init_sync();
while (--argc) {
char *v, *vv, *p = *++argv;
if (*p == '-' && p[1]) {
p++;
while (*p) switch (tolower(*p)) {
case 'a': /* auto or intelligent sync */
case 'i':
autosync = TRUE;
p++;
break;
case 'h':
fprintf(stderr, help);
return 0;
case 'r':
case 'v':
fprintf(stderr, "NDISASM version %s compiled " __DATE__ "\n", NASM_VER);
return 0;
case 'u': /* USE32 */
bits = 32;
p++;
break;
case 'b': /* bits */
v = p[1] ? p+1 : --argc ? *++argv : NULL;
if (!v) {
fprintf(stderr, "%s: `-b' requires an argument\n", pname);
return 1;
}
if (!strcmp(v, "16"))
bits = 16;
else if (!strcmp(v, "32"))
bits = 32;
else {
fprintf(stderr, "%s: argument to `-b' should"
" be `16' or `32'\n", pname);
}
p = ""; /* force to next argument */
break;
case 'o': /* origin */
v = p[1] ? p+1 : --argc ? *++argv : NULL;
if (!v) {
fprintf(stderr, "%s: `-o' requires an argument\n", pname);
return 1;
}
offset = readnum (v, &rn_error);
if (rn_error) {
fprintf(stderr, "%s: `-o' requires a numeric argument\n",
pname);
return 1;
}
p = ""; /* force to next argument */
break;
case 's': /* sync point */
v = p[1] ? p+1 : --argc ? *++argv : NULL;
if (!v) {
fprintf(stderr, "%s: `-s' requires an argument\n", pname);
return 1;
}
add_sync (readnum (v, &rn_error), 0L);
if (rn_error) {
fprintf(stderr, "%s: `-s' requires a numeric argument\n",
pname);
return 1;
}
p = ""; /* force to next argument */
break;
case 'e': /* skip a header */
v = p[1] ? p+1 : --argc ? *++argv : NULL;
if (!v) {
fprintf(stderr, "%s: `-e' requires an argument\n", pname);
return 1;
}
initskip = readnum (v, &rn_error);
if (rn_error) {
fprintf(stderr, "%s: `-e' requires a numeric argument\n",
pname);
return 1;
}
p = ""; /* force to next argument */
break;
case 'k': /* skip a region */
v = p[1] ? p+1 : --argc ? *++argv : NULL;
if (!v) {
fprintf(stderr, "%s: `-k' requires an argument\n", pname);
return 1;
}
vv = strchr(v, ',');
if (!vv) {
fprintf(stderr, "%s: `-k' requires two numbers separated"
" by a comma\n", pname);
return 1;
}
*vv++ = '\0';
nextsync = readnum (v, &rn_error);
if (rn_error) {
fprintf(stderr, "%s: `-k' requires numeric arguments\n",
pname);
return 1;
}
synclen = readnum (vv, &rn_error);
if (rn_error) {
fprintf(stderr, "%s: `-k' requires numeric arguments\n",
pname);
return 1;
}
add_sync (nextsync, synclen);
p = ""; /* force to next argument */
break;
case 'p': /* preferred vendor */
v = p[1] ? p+1 : --argc ? *++argv : NULL;
if (!v) {
fprintf(stderr, "%s: `-p' requires an argument\n", pname);
return 1;
}
if ( !strcmp(v, "intel") ) {
prefer = 0; /* Default */
} else if ( !strcmp(v, "amd") ) {
prefer = IF_AMD|IF_3DNOW;
} else if ( !strcmp(v, "cyrix") ) {
prefer = IF_CYRIX|IF_3DNOW;
} else if ( !strcmp(v, "idt") || !strcmp(v, "centaur") ||
!strcmp(v, "winchip") ) {
prefer = IF_3DNOW;
} else {
fprintf(stderr, "%s: unknown vendor `%s' specified with `-p'\n", pname, v);
return 1;
}
p = ""; /* force to next argument */
break;
default: /*bf*/
fprintf(stderr, "%s: unrecognised option `-%c'\n",
pname, *p);
return 1;
}
} else if (!filename) {
filename = p;
} else {
fprintf(stderr, "%s: more than one filename specified\n", pname);
return 1;
}
}
if (!filename) {
fprintf(stderr, help, pname);
return 0;
}
if (strcmp(filename, "-")) {
fp = fopen(filename, "rb");
if (!fp) {
fprintf(stderr, "%s: unable to open `%s': %s\n",
pname, filename, strerror(errno));
return 1;
}
} else
fp = stdin;
if (initskip > 0)
skip (initskip, fp);
/*
* This main loop is really horrible, and wants rewriting with
* an axe. It'll stay the way it is for a while though, until I
* find the energy...
*/
p = q = buffer;
nextsync = next_sync (offset, &synclen);
do {
unsigned long to_read = buffer+sizeof(buffer)-p;
if (to_read > nextsync-offset-(p-q))
to_read = nextsync-offset-(p-q);
if (to_read) {
lenread = fread (p, 1, to_read, fp);
if (lenread == 0)
eof = TRUE; /* help along systems with bad feof */
} else
lenread = 0;
p += lenread;
if ((unsigned long)offset == nextsync) {
if (synclen) {
fprintf(stdout, "%08lX skipping 0x%lX bytes\n", offset, synclen);
offset += synclen;
skip (synclen, fp);
}
p = q = buffer;
nextsync = next_sync (offset, &synclen);
}
while (p > q && (p - q >= INSN_MAX || lenread == 0)) {
lendis = disasm (q, outbuf, bits, offset, autosync, prefer);
if (!lendis || lendis > (p - q) ||
(unsigned long)lendis > nextsync-offset)
lendis = eatbyte (q, outbuf);
output_ins (offset, q, lendis, outbuf);
q += lendis;
offset += lendis;
}
if (q >= buffer+INSN_MAX) {
unsigned char *r = buffer, *s = q;
int count = p - q;
while (count--)
*r++ = *s++;
p -= (q - buffer);
q = buffer;
}
} while (lenread > 0 || !(eof || feof(fp)));
if (fp != stdin)
fclose (fp);
return 0;
}
static void output_ins (unsigned long offset, unsigned char *data,
int datalen, char *insn)
{
int bytes;
fprintf(stdout, "%08lX ", offset);
bytes = 0;
while (datalen > 0 && bytes < BPL) {
fprintf(stdout, "%02X", *data++);
bytes++;
datalen--;
}
fprintf(stdout, "%*s%s\n", (BPL+1-bytes)*2, "", insn);
while (datalen > 0) {
fprintf(stdout, " -");
bytes = 0;
while (datalen > 0 && bytes < BPL) {
fprintf(stdout, "%02X", *data++);
bytes++;
datalen--;
}
fprintf(stdout, "\n");
}
}
/*
* Skip a certain amount of data in a file, either by seeking if
* possible, or if that fails then by reading and discarding.
*/
static void skip (unsigned long dist, FILE *fp)
{
char buffer[256]; /* should fit on most stacks :-) */
/*
* Got to be careful with fseek: at least one fseek I've tried
* doesn't approve of SEEK_CUR. So I'll use SEEK_SET and
* ftell... horrible but apparently necessary.
*/
if (fseek (fp, dist+ftell(fp), SEEK_SET)) {
while (dist > 0) {
unsigned long len = (dist < sizeof(buffer) ?
dist : sizeof(buffer));
if (fread (buffer, 1, len, fp) < len) {
perror("fread");
exit(1);
}
dist -= len;
}
}
}

View file

@ -0,0 +1,239 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* opflags.h - operand flags
*/
#ifndef NASM_OPFLAGS_H
#define NASM_OPFLAGS_H
#include "compiler.h"
/*
* Here we define the operand types. These are implemented as bit
* masks, since some are subsets of others; e.g. AX in a MOV
* instruction is a special operand type, whereas AX in other
* contexts is just another 16-bit register. (Also, consider CL in
* shift instructions, DX in OUT, etc.)
*
* The basic concept here is that
* (class & ~operand) == 0
*
* if and only if "operand" belongs to class type "class".
*
* The bits are assigned as follows:
*
* Bits 0-7, 23, 29: sizes
* 0: 8 bits (BYTE)
* 1: 16 bits (WORD)
* 2: 32 bits (DWORD)
* 3: 64 bits (QWORD)
* 4: 80 bits (TWORD)
* 5: FAR
* 6: NEAR
* 7: SHORT
* 23: 256 bits (YWORD)
* 29: 128 bits (OWORD)
*
* Bits 8-11 modifiers
* 8: TO
* 9: COLON
* 10: STRICT
* 11: (reserved)
*
* Bits 12-15: type of operand
* 12: REGISTER
* 13: IMMEDIATE
* 14: MEMORY (always has REGMEM attribute as well)
* 15: REGMEM (valid EA operand)
*
* Bits 16-19, 28: subclasses
* With REG_CDT:
* 16: REG_CREG (CRx)
* 17: REG_DREG (DRx)
* 18: REG_TREG (TRx)
* With REG_GPR:
* 16: REG_ACCUM (AL, AX, EAX, RAX)
* 17: REG_COUNT (CL, CX, ECX, RCX)
* 18: REG_DATA (DL, DX, EDX, RDX)
* 19: REG_HIGH (AH, CH, DH, BH)
* 28: REG_NOTACC (not REG_ACCUM)
*
* With REG_SREG:
* 16: REG_CS
* 17: REG_DESS (DS, ES, SS)
* 18: REG_FSGS
* 19: REG_SEG67
*
* With FPUREG:
* 16: FPU0
*
* With XMMREG:
* 16: XMM0
*
* With YMMREG:
* 16: YMM0
*
* With MEMORY:
* 16: MEM_OFFS (this is a simple offset)
* 17: IP_REL (IP-relative offset)
*
* With IMMEDIATE:
* 16: UNITY (1)
* 17: BYTENESS16 (-128..127)
* 18: BYTENESS32 (-128..127)
* 19: BYTENESS64 (-128..127)
*
* Bits 20-22, 24-27: register classes
* 20: REG_CDT (CRx, DRx, TRx)
* 21: RM_GPR (REG_GPR) (integer register)
* 22: REG_SREG
* 24: FPUREG
* 25: RM_MMX (MMXREG)
* 26: RM_XMM (XMMREG)
* 27: RM_YMM (YMMREG)
*
* Bit 31 is currently unallocated.
*
* 30: SAME_AS
* Special flag only used in instruction patterns; means this operand
* has to be identical to another operand. Currently only supported
* for registers.
*/
typedef uint32_t opflags_t;
/* Size, and other attributes, of the operand */
#define BITS8 0x00000001U
#define BITS16 0x00000002U
#define BITS32 0x00000004U
#define BITS64 0x00000008U /* x64 and FPU only */
#define BITS80 0x00000010U /* FPU only */
#define BITS128 0x20000000U
#define BITS256 0x00800000U
#define FAR 0x00000020U /* grotty: this means 16:16 or */
/* 16:32, like in CALL/JMP */
#define NEAR 0x00000040U
#define SHORT 0x00000080U /* and this means what it says :) */
#define SIZE_MASK 0x208000FFU /* all the size attributes */
/* Modifiers */
#define MODIFIER_MASK 0x00000f00U
#define TO 0x00000100U /* reverse effect in FADD, FSUB &c */
#define COLON 0x00000200U /* operand is followed by a colon */
#define STRICT 0x00000400U /* do not optimize this operand */
/* Type of operand: memory reference, register, etc. */
#define OPTYPE_MASK 0x0000f000U
#define REGISTER 0x00001000U /* register number in 'basereg' */
#define IMMEDIATE 0x00002000U
#define MEMORY 0x0000c000U
#define REGMEM 0x00008000U /* for r/m, ie EA, operands */
#define is_class(class, op) (!((opflags_t)(class) & ~(opflags_t)(op)))
/* Register classes */
#define REG_EA 0x00009000U /* 'normal' reg, qualifies as EA */
#define RM_GPR 0x00208000U /* integer operand */
#define REG_GPR 0x00209000U /* integer register */
#define REG8 0x00209001U /* 8-bit GPR */
#define REG16 0x00209002U /* 16-bit GPR */
#define REG32 0x00209004U /* 32-bit GPR */
#define REG64 0x00209008U /* 64-bit GPR */
#define FPUREG 0x01001000U /* floating point stack registers */
#define FPU0 0x01011000U /* FPU stack register zero */
#define RM_MMX 0x02008000U /* MMX operand */
#define MMXREG 0x02009000U /* MMX register */
#define RM_XMM 0x04008000U /* XMM (SSE) operand */
#define XMMREG 0x04009000U /* XMM (SSE) register */
#define XMM0 0x04019000U /* XMM register zero */
#define RM_YMM 0x08008000U /* YMM (AVX) operand */
#define YMMREG 0x08009000U /* YMM (AVX) register */
#define YMM0 0x08019000U /* YMM register zero */
#define REG_CDT 0x00101004U /* CRn, DRn and TRn */
#define REG_CREG 0x00111004U /* CRn */
#define REG_DREG 0x00121004U /* DRn */
#define REG_TREG 0x00141004U /* TRn */
#define REG_SREG 0x00401002U /* any segment register */
#define REG_CS 0x00411002U /* CS */
#define REG_DESS 0x00421002U /* DS, ES, SS */
#define REG_FSGS 0x00441002U /* FS, GS */
#define REG_SEG67 0x00481002U /* Unimplemented segment registers */
#define REG_RIP 0x00801008U /* RIP relative addressing */
#define REG_EIP 0x00801004U /* EIP relative addressing */
/* Special GPRs */
#define REG_SMASK 0x100f0000U /* a mask for the following */
#define REG_ACCUM 0x00219000U /* accumulator: AL, AX, EAX, RAX */
#define REG_AL 0x00219001U
#define REG_AX 0x00219002U
#define REG_EAX 0x00219004U
#define REG_RAX 0x00219008U
#define REG_COUNT 0x10229000U /* counter: CL, CX, ECX, RCX */
#define REG_CL 0x10229001U
#define REG_CX 0x10229002U
#define REG_ECX 0x10229004U
#define REG_RCX 0x10229008U
#define REG_DL 0x10249001U /* data: DL, DX, EDX, RDX */
#define REG_DX 0x10249002U
#define REG_EDX 0x10249004U
#define REG_RDX 0x10249008U
#define REG_HIGH 0x10289001U /* high regs: AH, CH, DH, BH */
#define REG_NOTACC 0x10000000U /* non-accumulator register */
#define REG8NA 0x10209001U /* 8-bit non-acc GPR */
#define REG16NA 0x10209002U /* 16-bit non-acc GPR */
#define REG32NA 0x10209004U /* 32-bit non-acc GPR */
#define REG64NA 0x10209008U /* 64-bit non-acc GPR */
/* special types of EAs */
#define MEM_OFFS 0x0001c000U /* simple [address] offset - absolute! */
#define IP_REL 0x0002c000U /* IP-relative offset */
/* memory which matches any type of r/m operand */
#define MEMORY_ANY (MEMORY|RM_GPR|RM_MMX|RM_XMM|RM_YMM)
/* special type of immediate operand */
#define UNITY 0x00012000U /* for shift/rotate instructions */
#define SBYTE16 0x00022000U /* for op r16,immediate instrs. */
#define SBYTE32 0x00042000U /* for op r32,immediate instrs. */
#define SBYTE64 0x00082000U /* for op r64,immediate instrs. */
#define BYTENESS 0x000e0000U /* for testing for byteness */
/* special flags */
#define SAME_AS 0x40000000U
#endif /* NASM_OPFLAGS_H */

View file

@ -1,11 +1,17 @@
/* automatically generated from ./regs.dat - do not edit */ /* automatically generated from ./regs.dat - do not edit */
static const int creg [] = {R_CR0,R_CR1,R_CR2,R_CR3,R_CR4,R_CR5,R_CR6,R_CR7};
static const int dreg [] = {R_DR0,R_DR1,R_DR2,R_DR3,R_DR4,R_DR5,R_DR6,R_DR7}; #include "regdis.h"
static const int fpureg [] = {R_ST0,R_ST1,R_ST2,R_ST3,R_ST4,R_ST5,R_ST6,R_ST7};
static const int mmxreg [] = {R_MM0,R_MM1,R_MM2,R_MM3,R_MM4,R_MM5,R_MM6,R_MM7}; const enum reg_enum nasm_rd_creg [16] = {R_CR0,R_CR1,R_CR2,R_CR3,R_CR4,R_CR5,R_CR6,R_CR7,R_CR8,R_CR9,R_CR10,R_CR11,R_CR12,R_CR13,R_CR14,R_CR15};
static const int reg16 [] = {R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI}; const enum reg_enum nasm_rd_dreg [16] = {R_DR0,R_DR1,R_DR2,R_DR3,R_DR4,R_DR5,R_DR6,R_DR7,R_DR8,R_DR9,R_DR10,R_DR11,R_DR12,R_DR13,R_DR14,R_DR15};
static const int reg32 [] = {R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI}; const enum reg_enum nasm_rd_fpureg [ 8] = {R_ST0,R_ST1,R_ST2,R_ST3,R_ST4,R_ST5,R_ST6,R_ST7};
static const int reg8 [] = {R_AL,R_CL,R_DL,R_BL,R_AH,R_CH,R_DH,R_BH}; const enum reg_enum nasm_rd_mmxreg [ 8] = {R_MM0,R_MM1,R_MM2,R_MM3,R_MM4,R_MM5,R_MM6,R_MM7};
static const int sreg [] = {R_ES,R_CS,R_SS,R_DS,R_FS,R_GS,R_SEGR6,R_SEGR7}; const enum reg_enum nasm_rd_reg16 [16] = {R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,R_R8W,R_R9W,R_R10W,R_R11W,R_R12W,R_R13W,R_R14W,R_R15W};
static const int treg [] = {R_TR0,R_TR1,R_TR2,R_TR3,R_TR4,R_TR5,R_TR6,R_TR7}; const enum reg_enum nasm_rd_reg32 [16] = {R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,R_R8D,R_R9D,R_R10D,R_R11D,R_R12D,R_R13D,R_R14D,R_R15D};
static const int xmmreg [] = {R_XMM0,R_XMM1,R_XMM2,R_XMM3,R_XMM4,R_XMM5,R_XMM6,R_XMM7}; const enum reg_enum nasm_rd_reg64 [16] = {R_RAX,R_RCX,R_RDX,R_RBX,R_RSP,R_RBP,R_RSI,R_RDI,R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_R15};
const enum reg_enum nasm_rd_reg8 [ 8] = {R_AL,R_CL,R_DL,R_BL,R_AH,R_CH,R_DH,R_BH};
const enum reg_enum nasm_rd_reg8_rex[16] = {R_AL,R_CL,R_DL,R_BL,R_SPL,R_BPL,R_SIL,R_DIL,R_R8B,R_R9B,R_R10B,R_R11B,R_R12B,R_R13B,R_R14B,R_R15B};
const enum reg_enum nasm_rd_sreg [ 8] = {R_ES,R_CS,R_SS,R_DS,R_FS,R_GS,R_SEGR6,R_SEGR7};
const enum reg_enum nasm_rd_treg [ 8] = {R_TR0,R_TR1,R_TR2,R_TR3,R_TR4,R_TR5,R_TR6,R_TR7};
const enum reg_enum nasm_rd_xmmreg [16] = {R_XMM0,R_XMM1,R_XMM2,R_XMM3,R_XMM4,R_XMM5,R_XMM6,R_XMM7,R_XMM8,R_XMM9,R_XMM10,R_XMM11,R_XMM12,R_XMM13,R_XMM14,R_XMM15};
const enum reg_enum nasm_rd_ymmreg [16] = {R_YMM0,R_YMM1,R_YMM2,R_YMM3,R_YMM4,R_YMM5,R_YMM6,R_YMM7,R_YMM8,R_YMM9,R_YMM10,R_YMM11,R_YMM12,R_YMM13,R_YMM14,R_YMM15};

View file

@ -0,0 +1,22 @@
/* automatically generated from ./regs.dat - do not edit */
#ifndef NASM_REGDIS_H
#define NASM_REGDIS_H
#include "regs.h"
extern const enum reg_enum nasm_rd_creg [16];
extern const enum reg_enum nasm_rd_dreg [16];
extern const enum reg_enum nasm_rd_fpureg [ 8];
extern const enum reg_enum nasm_rd_mmxreg [ 8];
extern const enum reg_enum nasm_rd_reg16 [16];
extern const enum reg_enum nasm_rd_reg32 [16];
extern const enum reg_enum nasm_rd_reg64 [16];
extern const enum reg_enum nasm_rd_reg8 [ 8];
extern const enum reg_enum nasm_rd_reg8_rex[16];
extern const enum reg_enum nasm_rd_sreg [ 8];
extern const enum reg_enum nasm_rd_treg [ 8];
extern const enum reg_enum nasm_rd_xmmreg [16];
extern const enum reg_enum nasm_rd_ymmreg [16];
#endif /* NASM_REGDIS_H */

View file

@ -1,35 +1,56 @@
/* automatically generated from ./regs.dat - do not edit */ /* automatically generated from ./regs.dat - do not edit */
static const char *reg_names[] = {
#include "tables.h"
const char * const nasm_reg_names[] = {
"ah", "ah",
"al", "al",
"ax", "ax",
"bh", "bh",
"bl", "bl",
"bp", "bp",
"bpl",
"bx", "bx",
"ch", "ch",
"cl", "cl",
"cr0", "cr0",
"cr1", "cr1",
"cr10",
"cr11",
"cr12",
"cr13",
"cr14",
"cr15",
"cr2", "cr2",
"cr3", "cr3",
"cr4", "cr4",
"cr5", "cr5",
"cr6", "cr6",
"cr7", "cr7",
"cr8",
"cr9",
"cs", "cs",
"cx", "cx",
"dh", "dh",
"di", "di",
"dil",
"dl", "dl",
"dr0", "dr0",
"dr1", "dr1",
"dr10",
"dr11",
"dr12",
"dr13",
"dr14",
"dr15",
"dr2", "dr2",
"dr3", "dr3",
"dr4", "dr4",
"dr5", "dr5",
"dr6", "dr6",
"dr7", "dr7",
"dr8",
"dr9",
"ds", "ds",
"dx", "dx",
"eax", "eax",
@ -51,10 +72,52 @@ static const char *reg_names[] = {
"mm5", "mm5",
"mm6", "mm6",
"mm7", "mm7",
"r10",
"r10b",
"r10d",
"r10w",
"r11",
"r11b",
"r11d",
"r11w",
"r12",
"r12b",
"r12d",
"r12w",
"r13",
"r13b",
"r13d",
"r13w",
"r14",
"r14b",
"r14d",
"r14w",
"r15",
"r15b",
"r15d",
"r15w",
"r8",
"r8b",
"r8d",
"r8w",
"r9",
"r9b",
"r9d",
"r9w",
"rax",
"rbp",
"rbx",
"rcx",
"rdi",
"rdx",
"rsi",
"rsp",
"segr6", "segr6",
"segr7", "segr7",
"si", "si",
"sil",
"sp", "sp",
"spl",
"ss", "ss",
"st0", "st0",
"st1", "st1",
@ -74,10 +137,34 @@ static const char *reg_names[] = {
"tr7", "tr7",
"xmm0", "xmm0",
"xmm1", "xmm1",
"xmm10",
"xmm11",
"xmm12",
"xmm13",
"xmm14",
"xmm15",
"xmm2", "xmm2",
"xmm3", "xmm3",
"xmm4", "xmm4",
"xmm5", "xmm5",
"xmm6", "xmm6",
"xmm7" "xmm7",
"xmm8",
"xmm9",
"ymm0",
"ymm1",
"ymm10",
"ymm11",
"ymm12",
"ymm13",
"ymm14",
"ymm15",
"ymm2",
"ymm3",
"ymm4",
"ymm5",
"ymm6",
"ymm7",
"ymm8",
"ymm9"
}; };

View file

@ -1,35 +1,61 @@
/* automatically generated from ./regs.dat - do not edit */ /* automatically generated from ./regs.dat - do not edit */
#ifndef NASM_REGS_H
#define NASM_REGS_H
#define EXPR_REG_START 1
enum reg_enum { enum reg_enum {
R_zero = 0,
R_none = -1,
R_AH = EXPR_REG_START, R_AH = EXPR_REG_START,
R_AL, R_AL,
R_AX, R_AX,
R_BH, R_BH,
R_BL, R_BL,
R_BP, R_BP,
R_BPL,
R_BX, R_BX,
R_CH, R_CH,
R_CL, R_CL,
R_CR0, R_CR0,
R_CR1, R_CR1,
R_CR10,
R_CR11,
R_CR12,
R_CR13,
R_CR14,
R_CR15,
R_CR2, R_CR2,
R_CR3, R_CR3,
R_CR4, R_CR4,
R_CR5, R_CR5,
R_CR6, R_CR6,
R_CR7, R_CR7,
R_CR8,
R_CR9,
R_CS, R_CS,
R_CX, R_CX,
R_DH, R_DH,
R_DI, R_DI,
R_DIL,
R_DL, R_DL,
R_DR0, R_DR0,
R_DR1, R_DR1,
R_DR10,
R_DR11,
R_DR12,
R_DR13,
R_DR14,
R_DR15,
R_DR2, R_DR2,
R_DR3, R_DR3,
R_DR4, R_DR4,
R_DR5, R_DR5,
R_DR6, R_DR6,
R_DR7, R_DR7,
R_DR8,
R_DR9,
R_DS, R_DS,
R_DX, R_DX,
R_EAX, R_EAX,
@ -51,10 +77,52 @@ enum reg_enum {
R_MM5, R_MM5,
R_MM6, R_MM6,
R_MM7, R_MM7,
R_R10,
R_R10B,
R_R10D,
R_R10W,
R_R11,
R_R11B,
R_R11D,
R_R11W,
R_R12,
R_R12B,
R_R12D,
R_R12W,
R_R13,
R_R13B,
R_R13D,
R_R13W,
R_R14,
R_R14B,
R_R14D,
R_R14W,
R_R15,
R_R15B,
R_R15D,
R_R15W,
R_R8,
R_R8B,
R_R8D,
R_R8W,
R_R9,
R_R9B,
R_R9D,
R_R9W,
R_RAX,
R_RBP,
R_RBX,
R_RCX,
R_RDI,
R_RDX,
R_RSI,
R_RSP,
R_SEGR6, R_SEGR6,
R_SEGR7, R_SEGR7,
R_SI, R_SI,
R_SIL,
R_SP, R_SP,
R_SPL,
R_SS, R_SS,
R_ST0, R_ST0,
R_ST1, R_ST1,
@ -74,11 +142,205 @@ enum reg_enum {
R_TR7, R_TR7,
R_XMM0, R_XMM0,
R_XMM1, R_XMM1,
R_XMM10,
R_XMM11,
R_XMM12,
R_XMM13,
R_XMM14,
R_XMM15,
R_XMM2, R_XMM2,
R_XMM3, R_XMM3,
R_XMM4, R_XMM4,
R_XMM5, R_XMM5,
R_XMM6, R_XMM6,
R_XMM7, R_XMM7,
R_XMM8,
R_XMM9,
R_YMM0,
R_YMM1,
R_YMM10,
R_YMM11,
R_YMM12,
R_YMM13,
R_YMM14,
R_YMM15,
R_YMM2,
R_YMM3,
R_YMM4,
R_YMM5,
R_YMM6,
R_YMM7,
R_YMM8,
R_YMM9,
REG_ENUM_LIMIT REG_ENUM_LIMIT
}; };
#define EXPR_REG_END 164
#define REG_NUM_AH 4
#define REG_NUM_AL 0
#define REG_NUM_AX 0
#define REG_NUM_BH 7
#define REG_NUM_BL 3
#define REG_NUM_BP 5
#define REG_NUM_BPL 5
#define REG_NUM_BX 3
#define REG_NUM_CH 5
#define REG_NUM_CL 1
#define REG_NUM_CR0 0
#define REG_NUM_CR1 1
#define REG_NUM_CR10 10
#define REG_NUM_CR11 11
#define REG_NUM_CR12 12
#define REG_NUM_CR13 13
#define REG_NUM_CR14 14
#define REG_NUM_CR15 15
#define REG_NUM_CR2 2
#define REG_NUM_CR3 3
#define REG_NUM_CR4 4
#define REG_NUM_CR5 5
#define REG_NUM_CR6 6
#define REG_NUM_CR7 7
#define REG_NUM_CR8 8
#define REG_NUM_CR9 9
#define REG_NUM_CS 1
#define REG_NUM_CX 1
#define REG_NUM_DH 6
#define REG_NUM_DI 7
#define REG_NUM_DIL 7
#define REG_NUM_DL 2
#define REG_NUM_DR0 0
#define REG_NUM_DR1 1
#define REG_NUM_DR10 10
#define REG_NUM_DR11 11
#define REG_NUM_DR12 12
#define REG_NUM_DR13 13
#define REG_NUM_DR14 14
#define REG_NUM_DR15 15
#define REG_NUM_DR2 2
#define REG_NUM_DR3 3
#define REG_NUM_DR4 4
#define REG_NUM_DR5 5
#define REG_NUM_DR6 6
#define REG_NUM_DR7 7
#define REG_NUM_DR8 8
#define REG_NUM_DR9 9
#define REG_NUM_DS 3
#define REG_NUM_DX 2
#define REG_NUM_EAX 0
#define REG_NUM_EBP 5
#define REG_NUM_EBX 3
#define REG_NUM_ECX 1
#define REG_NUM_EDI 7
#define REG_NUM_EDX 2
#define REG_NUM_ES 0
#define REG_NUM_ESI 6
#define REG_NUM_ESP 4
#define REG_NUM_FS 4
#define REG_NUM_GS 5
#define REG_NUM_MM0 0
#define REG_NUM_MM1 1
#define REG_NUM_MM2 2
#define REG_NUM_MM3 3
#define REG_NUM_MM4 4
#define REG_NUM_MM5 5
#define REG_NUM_MM6 6
#define REG_NUM_MM7 7
#define REG_NUM_R10 10
#define REG_NUM_R10B 10
#define REG_NUM_R10D 10
#define REG_NUM_R10W 10
#define REG_NUM_R11 11
#define REG_NUM_R11B 11
#define REG_NUM_R11D 11
#define REG_NUM_R11W 11
#define REG_NUM_R12 12
#define REG_NUM_R12B 12
#define REG_NUM_R12D 12
#define REG_NUM_R12W 12
#define REG_NUM_R13 13
#define REG_NUM_R13B 13
#define REG_NUM_R13D 13
#define REG_NUM_R13W 13
#define REG_NUM_R14 14
#define REG_NUM_R14B 14
#define REG_NUM_R14D 14
#define REG_NUM_R14W 14
#define REG_NUM_R15 15
#define REG_NUM_R15B 15
#define REG_NUM_R15D 15
#define REG_NUM_R15W 15
#define REG_NUM_R8 8
#define REG_NUM_R8B 8
#define REG_NUM_R8D 8
#define REG_NUM_R8W 8
#define REG_NUM_R9 9
#define REG_NUM_R9B 9
#define REG_NUM_R9D 9
#define REG_NUM_R9W 9
#define REG_NUM_RAX 0
#define REG_NUM_RBP 5
#define REG_NUM_RBX 3
#define REG_NUM_RCX 1
#define REG_NUM_RDI 7
#define REG_NUM_RDX 2
#define REG_NUM_RSI 6
#define REG_NUM_RSP 4
#define REG_NUM_SEGR6 6
#define REG_NUM_SEGR7 7
#define REG_NUM_SI 6
#define REG_NUM_SIL 6
#define REG_NUM_SP 4
#define REG_NUM_SPL 4
#define REG_NUM_SS 2
#define REG_NUM_ST0 0
#define REG_NUM_ST1 1
#define REG_NUM_ST2 2
#define REG_NUM_ST3 3
#define REG_NUM_ST4 4
#define REG_NUM_ST5 5
#define REG_NUM_ST6 6
#define REG_NUM_ST7 7
#define REG_NUM_TR0 0
#define REG_NUM_TR1 1
#define REG_NUM_TR2 2
#define REG_NUM_TR3 3
#define REG_NUM_TR4 4
#define REG_NUM_TR5 5
#define REG_NUM_TR6 6
#define REG_NUM_TR7 7
#define REG_NUM_XMM0 0
#define REG_NUM_XMM1 1
#define REG_NUM_XMM10 10
#define REG_NUM_XMM11 11
#define REG_NUM_XMM12 12
#define REG_NUM_XMM13 13
#define REG_NUM_XMM14 14
#define REG_NUM_XMM15 15
#define REG_NUM_XMM2 2
#define REG_NUM_XMM3 3
#define REG_NUM_XMM4 4
#define REG_NUM_XMM5 5
#define REG_NUM_XMM6 6
#define REG_NUM_XMM7 7
#define REG_NUM_XMM8 8
#define REG_NUM_XMM9 9
#define REG_NUM_YMM0 0
#define REG_NUM_YMM1 1
#define REG_NUM_YMM10 10
#define REG_NUM_YMM11 11
#define REG_NUM_YMM12 12
#define REG_NUM_YMM13 13
#define REG_NUM_YMM14 14
#define REG_NUM_YMM15 15
#define REG_NUM_YMM2 2
#define REG_NUM_YMM3 3
#define REG_NUM_YMM4 4
#define REG_NUM_YMM5 5
#define REG_NUM_YMM6 6
#define REG_NUM_YMM7 7
#define REG_NUM_YMM8 8
#define REG_NUM_YMM9 9
#endif /* NASM_REGS_H */

View file

@ -0,0 +1,25 @@
/*
* snprintf()
*
* Implement snprintf() in terms of vsnprintf()
*/
#include "compiler.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "nasmlib.h"
int snprintf(char *str, size_t size, const char *format, ...)
{
va_list ap;
int rv;
va_start(ap, format);
rv = vsnprintf(str, size, format, ap);
va_end(ap);
return rv;
}

View file

@ -0,0 +1,203 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* strfunc.c
*
* String transformation functions
*/
#include "nasmlib.h"
#include "nasm.h"
/*
* Convert a string in UTF-8 format to UTF-16LE
*/
static size_t utf8_to_16le(uint8_t *str, size_t len, char *op)
{
#define EMIT(x) do { if (op) { WRITESHORT(op,x); } outlen++; } while(0)
size_t outlen = 0;
int expect = 0;
uint8_t c;
uint32_t v = 0, vmin = 0;
while (len--) {
c = *str++;
if (expect) {
if ((c & 0xc0) != 0x80) {
expect = 0;
return -1;
} else {
v = (v << 6) | (c & 0x3f);
if (!--expect) {
if (v < vmin || v > 0x10ffff ||
(v >= 0xd800 && v <= 0xdfff)) {
return -1;
} else if (v > 0xffff) {
v -= 0x10000;
EMIT(0xd800 | (v >> 10));
EMIT(0xdc00 | (v & 0x3ff));
} else {
EMIT(v);
}
}
continue;
}
}
if (c < 0x80) {
EMIT(c);
} else if (c < 0xc0 || c >= 0xfe) {
/* Invalid UTF-8 */
return -1;
} else if (c < 0xe0) {
v = c & 0x1f;
expect = 1;
vmin = 0x80;
} else if (c < 0xf0) {
v = c & 0x0f;
expect = 2;
vmin = 0x800;
} else if (c < 0xf8) {
v = c & 0x07;
expect = 3;
vmin = 0x10000;
} else if (c < 0xfc) {
v = c & 0x03;
expect = 4;
vmin = 0x200000;
} else {
v = c & 0x01;
expect = 5;
vmin = 0x4000000;
}
}
return expect ? (size_t)-1 : outlen << 1;
#undef EMIT
}
/*
* Convert a string in UTF-8 format to UTF-32LE
*/
static size_t utf8_to_32le(uint8_t *str, size_t len, char *op)
{
#define EMIT(x) do { if (op) { WRITELONG(op,x); } outlen++; } while(0)
size_t outlen = 0;
int expect = 0;
uint8_t c;
uint32_t v = 0, vmin = 0;
while (len--) {
c = *str++;
if (expect) {
if ((c & 0xc0) != 0x80) {
return -1;
} else {
v = (v << 6) | (c & 0x3f);
if (!--expect) {
if (v < vmin || (v >= 0xd800 && v <= 0xdfff)) {
return -1;
} else {
EMIT(v);
}
}
continue;
}
}
if (c < 0x80) {
EMIT(c);
} else if (c < 0xc0 || c >= 0xfe) {
/* Invalid UTF-8 */
return -1;
} else if (c < 0xe0) {
v = c & 0x1f;
expect = 1;
vmin = 0x80;
} else if (c < 0xf0) {
v = c & 0x0f;
expect = 2;
vmin = 0x800;
} else if (c < 0xf8) {
v = c & 0x07;
expect = 3;
vmin = 0x10000;
} else if (c < 0xfc) {
v = c & 0x03;
expect = 4;
vmin = 0x200000;
} else {
v = c & 0x01;
expect = 5;
vmin = 0x4000000;
}
}
return expect ? (size_t)-1 : outlen << 2;
#undef EMIT
}
typedef size_t (*transform_func)(uint8_t *, size_t, char *);
/*
* Apply a specific string transform and return it in a nasm_malloc'd
* buffer, returning the length. On error, returns (size_t)-1 and no
* buffer is allocated.
*/
size_t string_transform(char *str, size_t len, char **out, enum strfunc func)
{
/* This should match enum strfunc in nasm.h */
static const transform_func str_transforms[] = {
utf8_to_16le,
utf8_to_32le,
};
transform_func transform = str_transforms[func];
size_t outlen;
uint8_t *s = (uint8_t *)str;
char *buf;
outlen = transform(s, len, NULL);
if (outlen == (size_t)-1)
return -1;
*out = buf = nasm_malloc(outlen+1);
buf[outlen] = '\0'; /* Forcibly null-terminate the buffer */
return transform(s, len, buf);
}

View file

@ -1,18 +1,55 @@
/* sync.c the Netwide Disassembler synchronisation processing module /* ----------------------------------------------------------------------- *
* *
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and * Copyright 1996-2009 The NASM Authors - All Rights Reserved
* Julian Hall. All rights reserved. The software is * See the file AUTHORS included with the NASM distribution for
* redistributable under the licence given in the file "Licence" * the specific copyright holders.
* distributed in the NASM archive. *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* sync.c the Netwide Disassembler synchronisation processing module
*/ */
#include "compiler.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
#include "inttypes.h"
#include "nasmlib.h"
#include "sync.h" #include "sync.h"
#define SYNC_MAX 4096 /* max # of sync points */ #define SYNC_MAX_SHIFT 31
#define SYNC_MAX_SIZE (1U << SYNC_MAX_SHIFT)
/* initial # of sync points (*must* be power of two)*/
#define SYNC_INITIAL_CHUNK (1U << 12)
/* /*
* This lot manages the current set of sync points by means of a * This lot manages the current set of sync points by means of a
@ -20,93 +57,77 @@
*/ */
static struct Sync { static struct Sync {
unsigned long pos; uint32_t pos;
unsigned long length; uint32_t length;
} *synx; } *synx;
static int nsynx;
static uint32_t max_synx, nsynx;
static inline void swap_sync(uint32_t dst, uint32_t src)
{
struct Sync t = synx[dst];
synx[dst] = synx[src];
synx[src] = t;
}
void init_sync(void) void init_sync(void)
{ {
/* max_synx = SYNC_INITIAL_CHUNK;
* I'd like to allocate an array of size SYNC_MAX, then write synx = nasm_malloc((max_synx + 1) * sizeof(*synx));
* `synx--' which would allow numbering the array from one
* instead of zero without wasting memory. Sadly I don't trust
* this to work in 16-bit Large model, so it's staying the way
* it is. Btw, we don't care about freeing this array, since it
* has to last for the duration of the program and will then be
* auto-freed on exit. And I'm lazy ;-)
*
* Speaking of 16-bit Large model, that's also the reason I'm
* not declaring this array statically - by doing it
* dynamically I avoid problems with the total size of DGROUP
* in Borland C.
*/
synx = malloc((SYNC_MAX+1) * sizeof(*synx));
if (!synx) {
fprintf(stderr, "ndisasm: not enough memory for sync array\n");
exit(1);
}
nsynx = 0; nsynx = 0;
} }
void add_sync(unsigned long pos, unsigned long length) void add_sync(uint32_t pos, uint32_t length)
{ {
int i; uint32_t i;
if (nsynx == SYNC_MAX) if (nsynx >= max_synx) {
return; /* can't do anything - overflow */ if (max_synx >= SYNC_MAX_SIZE) /* too many sync points! */
return;
max_synx = (max_synx << 1);
synx = nasm_realloc(synx, (max_synx + 1) * sizeof(*synx));
}
nsynx++; nsynx++;
synx[nsynx].pos = pos; synx[nsynx].pos = pos;
synx[nsynx].length = length; synx[nsynx].length = length;
for (i = nsynx; i > 1; i /= 2) { for (i = nsynx; i > 1; i /= 2) {
if (synx[i/2].pos > synx[i].pos) { if (synx[i / 2].pos > synx[i].pos)
struct Sync t; swap_sync(i / 2, i);
t = synx[i/2]; /* structure copy */
synx[i/2] = synx[i]; /* structure copy again */
synx[i] = t; /* another structure copy */
}
} }
} }
unsigned long next_sync(unsigned long position, unsigned long *length) uint32_t next_sync(uint32_t position, uint32_t *length)
{ {
while (nsynx > 0 && synx[1].pos + synx[1].length <= position) { while (nsynx > 0 && synx[1].pos + synx[1].length <= position) {
int i, j; uint32_t i, j;
struct Sync t;
t = synx[nsynx]; /* structure copy */
synx[nsynx] = synx[1]; /* structure copy */
synx[1] = t; /* ditto */
nsynx--; swap_sync(nsynx, 1);
nsynx--;
i = 1; i = 1;
while (i*2 <= nsynx) { while (i * 2 <= nsynx) {
j = i*2; j = i * 2;
if (synx[j].pos < synx[i].pos && if (synx[j].pos < synx[i].pos &&
(j+1 > nsynx || synx[j+1].pos > synx[j].pos)) { (j + 1 > nsynx || synx[j + 1].pos > synx[j].pos)) {
t = synx[j]; /* structure copy */ swap_sync(j, i);
synx[j] = synx[i]; /* lots of these... */ i = j;
synx[i] = t; /* ...aren't there? */ } else if (j + 1 <= nsynx && synx[j + 1].pos < synx[i].pos) {
i = j; swap_sync(j + 1, i);
} else if (j+1 <= nsynx && synx[j+1].pos < synx[i].pos) { i = j + 1;
t = synx[j+1]; /* structure copy */ } else
synx[j+1] = synx[i]; /* structure <yawn> copy */ break;
synx[i] = t; /* structure copy <zzzz....> */ }
i = j+1;
} else
break;
}
} }
if (nsynx > 0) { if (nsynx > 0) {
if (length) if (length)
*length = synx[1].length; *length = synx[1].length;
return synx[1].pos; return synx[1].pos;
} else { } else {
if (length) if (length)
*length = 0L; *length = 0L;
return ULONG_MAX; return 0;
} }
} }

View file

@ -1,16 +1,45 @@
/* sync.h header file for sync.c /* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
* *
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and * Redistribution and use in source and binary forms, with or without
* Julian Hall. All rights reserved. The software is * modification, are permitted provided that the following
* redistributable under the licence given in the file "Licence" * conditions are met:
* distributed in the NASM archive. *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* sync.h header file for sync.c
*/ */
#ifndef NASM_SYNC_H #ifndef NASM_SYNC_H
#define NASM_SYNC_H #define NASM_SYNC_H
void init_sync(void); void init_sync(void);
void add_sync(unsigned long position, unsigned long length); void add_sync(uint32_t position, uint32_t length);
unsigned long next_sync(unsigned long position, unsigned long *length); uint32_t next_sync(uint32_t position, uint32_t *length);
#endif #endif

View file

@ -0,0 +1,69 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ----------------------------------------------------------------------- */
/*
* tables.h
*
* Declarations for auto-generated tables
*/
#ifndef NASM_TABLES_H
#define NASM_TABLES_H
#include "compiler.h"
#include "inttypes.h"
#include "insnsi.h" /* For enum opcode */
#include "opflags.h" /* For opflags_t */
/* --- From standard.mac via macros.pl: --- */
/* macros.c */
extern const unsigned char nasm_stdmac[];
extern const unsigned char * const nasm_stdmac_after_tasm;
const unsigned char *nasm_stdmac_find_package(const char *);
/* --- From insns.dat via insns.pl: --- */
/* insnsn.c */
extern const char * const nasm_insn_names[];
/* --- From regs.dat via regs.pl: --- */
/* regs.c */
extern const char * const nasm_reg_names[];
/* regflags.c */
extern const opflags_t nasm_reg_flags[];
/* regvals.c */
extern const int nasm_regvals[];
#endif /* NASM_TABLES_H */

View file

@ -0,0 +1,11 @@
/*
* This file is generated from insns.dat, regs.dat and token.dat
* by tokhash.pl; do not edit.
*/
#ifndef NASM_TOKENS_H
#define NASM_TOKENS_H
#define MAX_KEYWORD 16 /* length of longest keyword */
#endif /* NASM_TOKENS_H */

View file

@ -1,9 +1,9 @@
#ifndef NASM_VERSION_H #ifndef NASM_VERSION_H
#define NASM_VERSION_H #define NASM_VERSION_H
#define NASM_MAJOR_VER 0 #define NASM_MAJOR_VER 2
#define NASM_MINOR_VER 98 #define NASM_MINOR_VER 8
#define NASM_SUBMINOR_VER 38 #define NASM_SUBMINOR_VER 1
#define NASM_PATCHLEVEL_VER 0 #define NASM_PATCHLEVEL_VER 0
#define NASM_VERSION_ID 0x00622600 #define NASM_VERSION_ID 0x02080100
#define NASM_VER "0.98.38" #define NASM_VER "2.08.01"
#endif /* NASM_VERSION_H */ #endif /* NASM_VERSION_H */

View file

@ -6,11 +6,8 @@ NAMESPACE_UPP
static const int NDISASM_INSN_MAX = 32; // one instruction can't be longer than this static const int NDISASM_INSN_MAX = 32; // one instruction can't be longer than this
static const int NDISASM_OUTBUF_SIZE = 256; // maximum length of disassembly output static const int NDISASM_OUTBUF_SIZE = 256; // maximum length of disassembly output
#ifdef CPU_32 int NDisassemble(char *output, const byte *data, long offset, bool x64 = false); // returns instruction length
int NDisassemble(char *output, const byte *data, long offset); // returns instruction length
#else
int NDisassemble(char *output, const byte *data, int64 offset); // returns instruction length
#endif
END_UPP_NAMESPACE END_UPP_NAMESPACE
#endif #endif

View file

@ -7,19 +7,31 @@ file
ndisasm.h, ndisasm.h,
ndisupp.cpp, ndisupp.cpp,
lib/ndisasm readonly separator, lib/ndisasm readonly separator,
lib\disasm.c tabsize 8,
lib\disasm.h,
lib\insns.h,
lib\insnsd.c tabsize 8,
lib\insnsi.h,
lib\nasm.h,
lib\nasmlib.c tabsize 8,
lib\nasmlib.h,
lib\regs.c tabsize 8,
lib\regs.h,
lib\sync.c tabsize 8,
lib\sync.h,
lib\version.h,
lib\Authors, lib\Authors,
lib\Copying; lib\compiler.h,
lib\disasm.c,
lib\disasm.h,
lib\exprlib.c,
lib\insns.h,
lib\insnsb.c,
lib\insnsd.c,
lib\insnsi.h,
lib\insnsn.c,
lib\inttypes.h,
lib\LICENSE,
lib\opflags.h,
lib\nasm.h,
lib\nasmlib.c,
lib\nasmlib.h,
lib\README,
lib\regdis.c,
lib\regdis.h,
lib\regs.c,
lib\regs.h,
lib\snprintf.c,
lib\strfunc.c,
lib\sync.c,
lib\sync.h,
lib\version,
lib\version.h;

View file

@ -3,23 +3,21 @@
#include "ndisasm.h" #include "ndisasm.h"
extern "C" { extern "C" {
#include "lib/compiler.h"
#include "lib/inttypes.h"
#include "lib/disasm.h" #include "lib/disasm.h"
} }
NAMESPACE_UPP NAMESPACE_UPP
#ifdef CPU_32
int NDisassemble(char *output, const byte *data, long offset)// returns instruction length int NDisassemble(char *output, const byte *data, long offset, bool x64)// returns instruction length
#else
int NDisassemble(char *output, const byte *data, int64 offset)// returns instruction length
#endif
{ {
unsigned preferences = 0; // see lib/insns.h(84) int len = disasm(const_cast<unsigned char *>(data), output, 256, x64 ? 64 : 32, offset, false, 0);
long len = (long)disasm(const_cast<unsigned char *>(data), output, 32, offset, false, preferences);
if(len <= 0) { if(len <= 0) {
eatbyte(const_cast<unsigned char *>(data), output); eatbyte(const_cast<unsigned char *>(data), output, 256, x64 ? 64 : 32);
len = 1; len = 1;
} }
return (int)len; return len;
} }
#ifdef flagMAIN #ifdef flagMAIN