Work in progress on WINE/win32/win64 compiler support

dev/git-series/gccdum
Matt Godbolt 7 years ago
parent d69c554c4a
commit 49932af0fa

@ -37,6 +37,7 @@ var nopt = require('nopt'),
http = require('http'),
https = require('https'),
url = require('url'),
utils = require('./lib/utils'),
Promise = require('promise'),
aws = require('./lib/aws'),
_ = require('underscore-node'),
@ -330,8 +331,10 @@ function configuredCompilers() {
alias: props("alias"),
options: props("options"),
versionFlag: props("versionFlag"),
versionRe: props("versionRe"),
is6g: !!props("is6g", false),
isCl: !!props("isCl", false),
needsWine: !!props("isCl", false) && process.platform == 'linux',
intelAsm: props("intelAsm", ""),
asmFlag: props("asmFlag", "-S"),
outputFlag: props("outputFlag", "-o"),
@ -350,15 +353,32 @@ function getCompilerInfo(compilerInfo) {
return new Promise(function (resolve) {
var compiler = compilerInfo.exe;
var versionFlag = compilerInfo.versionFlag || '--version';
var versionRe = new RegExp(compilerInfo.versionRe || '.*');
var maybeWine = "";
if (compilerInfo.needsWine) {
maybeWine = '"' + gccProps("wine") + '" ';
}
// fill field compilerInfo.version,
// assuming the compiler returns its version on 1 line
child_process.exec('"' + compiler + '" ' + versionFlag, function (err, output) {
child_process.exec(maybeWine + '"' + compiler + '" ' + versionFlag, function (err, output, stderr) {
if (err) {
logger.error("Unable to run compiler '" + compiler + "' : " + err);
return resolve(null);
}
compilerInfo.version = output.split('\n')[0];
if (compilerInfo.intelAsm) {
var version = "";
_.each(utils.splitLines(output + stderr), function(line) {
if (version) return;
var match = line.match(versionRe);
if (match) version = match[0];
});
if (!version) {
logger.error("Unable to get compiler version for '" + compiler + "'");
return resolve(null);
}
logger.info(compiler + " is version '" + version + "'");
compilerInfo.version = version;
if (compilerInfo.intelAsm || compilerInfo.isCl) {
return resolve(compilerInfo);
}
@ -367,7 +387,7 @@ function getCompilerInfo(compilerInfo) {
var options = {};
if (!err) {
var splitness = /--?[-a-zA-Z]+( ?[-a-zA-Z]+)/;
output.split('\n').forEach(function (line) {
utils.eachLine(output, function (line) {
var match = line.match(splitness);
if (!match) return;
options[match[0]] = true;

@ -1,6 +1,6 @@
# Default settings for GCC Explorer.
defaultCompiler=g52
compilers=g44:g45:g46:clang35:g51:g52:gdef:msp430g453
compilers=g44:g45:g46:clang35:g51:g52:gdef:msp430g453:cl
#compilers=g44:g45:g46:clang35:g51:g52:gdef:AWS
#compilers=localhost@20480
compiler.g44.exe=/usr/bin/g++-4.4
@ -28,3 +28,9 @@ compiler.msp430g453.alias=/usr/bin/msp430-g++
compiler.msp430g453.name=MSP430 gcc 4.5.3
compiler.msp430g453.supportsBinary=false
compiler.msp430g453.needsMulti=false
compiler.cl.exe=/tmp/14.0.24224-Pre/lib/native/bin/amd64/cl.exe
compiler.cl.name=CL
compiler.cl.isCl=true
compiler.cl.needsMulti=false
compiler.cl.versionFlag=/?
compiler.cl.versionRe=^Microsoft \(R\) C/C\+\+.*$

@ -11,5 +11,6 @@ optionsBlacklistRe=^(-W[alp],)?((-wrapper|-fplugin.*|-specs|-load|-plugin|(@.*)|
allowedShortUrlHostRe=^([-a-z.]+\.)?(xania|godbolt)\.org$
googleShortLinkRewrite=^https?://goo.gl/(.*)$|https://godbolt.org/g/$1
wine=/opt/wine-devel/bin/wine64
wdiff=wdiff
max-diff-output=100000

@ -116,10 +116,9 @@ function ClParser(filters) {
}
ClParser.prototype._add = function (obj) {
var lastWasEmpty = this.result.length === 0 || this.result[this.result.length - 1].text === "";
if (obj.text === "" && lastWasEmpty) return;
if (obj.text === "" ) return;
if (this.currentLabel) obj.label = this.currentLabel;
obj.text = expandTabs(obj.text); // TODO where best?
obj.text = expandTabs(obj.text);
if (this.filters.binary && this.opcoder.hasOpcodes()) {
obj.opcodes = this.opcoder.opcodes;
obj.address = this.opcoder.offset;
@ -174,7 +173,7 @@ ClParser.prototype.addLine = function (line) {
lineLabels[label] = true;
}, this);
if (isIndented && this.opcoder.hasOpcodes()) {
this._add({keep: true, lineLabels: lineLabels, text: " " + command + comment, source: this.source});
this._add({keep: true, lineLabels: lineLabels, text: "\t" + command + comment, source: this.source});
} else {
var keep = !this.filters.directives;
if (command.match(isProc))

@ -25,8 +25,7 @@
(function () {
var _ = require('underscore-node');
var asmCl = require('./asm-cl');
var expandTabs = require('./utils').expandTabs;
var utils = require('./utils');
var labelFind = /[.a-zA-Z_][a-zA-Z0-9$_.]*/g;
var dataDefn = /\.(string|asciz|ascii|[1248]?byte|short|word|long|quad|value|zero)/;
var fileFind = /^\s*\.file\s+(\d+)\s+"([^"]+)".*/;
@ -108,7 +107,7 @@
if (filters.binary) return processBinaryAsm(asm, filters);
var result = [];
var asmLines = asm.split("\n");
var asmLines = utils.splitLines(asm);
var labelsUsed = findUsedLabels(asmLines, filters.directives);
var files = parseFiles(asmLines);
var prevLabel = "";
@ -175,7 +174,7 @@
}
var hasOpcodeMatch = line.match(hasOpcode);
line = expandTabs(line);
line = utils.expandTabs(line);
result.push({text: line, source: hasOpcodeMatch ? source : null});
});
return result;
@ -261,7 +260,7 @@
function processClAsm(asm, filters) {
var parser = new asmCl.ClParser(filters);
_.each(asm.split(/\r?\n/), function (line) {
utils.eachLine(asm, function (line) {
parser.addLine(line);
});
return parser.get();

@ -262,6 +262,15 @@ Compile.prototype.compile = function (source, compiler, options, filters) {
});
});
});
function filename(fn) {
if (compilerInfo.needsWine) {
return 'Z:' + fn;
} else {
return fn;
}
}
var compileToAsmPromise = tempFileAndDirPromise.then(function (info) {
var inputFilename = info.inputFilename;
var dirPath = info.dirPath;
@ -284,11 +293,11 @@ Compile.prototype.compile = function (source, compiler, options, filters) {
compileToAsm = compilerProps("compileToBinary", "").split(" ");
}
if (compilerInfo.isCl) {
options = options.concat(['/c', '/Fa' + outputFilename, '/Fo' + outputFilename + ".obj"]);
options = options.concat(['/FAsc', '/c', '/Fa' + filename(outputFilename), '/Fo' + filename(outputFilename) + ".obj"]);
} else {
options = options.concat(['-g', outputFlag, outputFilename]);
options = options.concat(['-g', outputFlag, filename(outputFilename)]);
}
options = options.concat(compileToAsm).concat([inputFilename]);
options = options.concat(compileToAsm).concat([filename(inputFilename)]);
var compilerExe = compilerInfo.exe;
var compilerWrapper = compilerProps("compiler-wrapper");
@ -296,9 +305,14 @@ Compile.prototype.compile = function (source, compiler, options, filters) {
options = [compilerExe].concat(options);
compilerExe = compilerWrapper;
}
if (compilerInfo.needsWine) {
options = [compilerExe].concat(options);
compilerExe = gccProps("wine");
}
var maxSize = gccProps("max-asm-size", 8 * 1024 * 1024);
options = options.filter(identity);
return self.runCompiler(compilerExe, options, inputFilename, compilerInfo.needsMulti).then(function (result) {
return self.runCompiler(compilerExe, options, filename(inputFilename),
compilerInfo.needsMulti).then(function (result) {
result.dirPath = dirPath;
if (result.code !== 0) {
result.asm = "<Compilation failed>";
@ -375,7 +389,7 @@ Compile.prototype.checkOptions = function (options) {
Compile.prototype.checkSource = function (source) {
var re = /^\s*#\s*i(nclude|mport)(_next)?\s+["<"](\/|.*\.\.)/;
var failed = [];
source.split('\n').forEach(function (line, index) {
utils.splitLines(source).forEach(function (line, index) {
if (line.match(re)) {
failed.push("<stdin>:" + (index + 1) + ":1: no absolute or relative includes please");
}

@ -25,6 +25,17 @@
var _ = require('underscore-node');
var tabsRe = /\t/g;
var lineRe = /\r?\n/;
function splitLines(text) {
return text.split(lineRe);
}
exports.splitLines = splitLines;
function eachLine(text, func, context) {
return _.each(splitLines(text), func, context);
}
exports.eachLine = eachLine;
function expandTabs(line) {
"use strict";
@ -41,9 +52,9 @@ exports.expandTabs = expandTabs;
function parseOutput(lines, inputFilename) {
var re = /^<source>[:(]([0-9]+)(:[0-9]+:)?[):]*\s*(.*)/;
var result = [];
_.each(lines.split('\n'), function (line) {
eachLine(lines, function (line) {
line = line.trim().replace(inputFilename, '<source>');
if (line !== "") {
if (line !== "" && line.indexOf("fixme:") !== 0) {
var lineObj = {text: line};
var match = line.match(re);
if (match) {

@ -3,10 +3,6 @@
"source": null,
"text": "maxArray PROC"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
72,
@ -16,7 +12,7 @@
],
"address": 0,
"source": 2,
"text": " lea rax, QWORD PTR [rcx+8]"
"text": " lea rax, QWORD PTR [rcx+8]"
},
{
"opcodes": [
@ -26,7 +22,7 @@
],
"address": 4,
"source": 2,
"text": " sub rdx, rcx"
"text": " sub rdx, rcx"
},
{
"opcodes": [
@ -38,7 +34,7 @@
],
"address": 7,
"source": 2,
"text": " mov ecx, 16384 ; 00004000H"
"text": " mov ecx, 16384 ; 00004000H"
},
{
"opcodes": [
@ -49,16 +45,12 @@
],
"address": 12,
"source": 2,
"text": " npad 4"
"text": " npad 4"
},
{
"source": null,
"text": "$LL9@maxArray:"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
242,
@ -70,7 +62,7 @@
],
"address": 16,
"source": 3,
"text": " movsd xmm0, QWORD PTR [rdx+rax-8]"
"text": " movsd xmm0, QWORD PTR [rdx+rax-8]"
},
{
"opcodes": [
@ -82,7 +74,7 @@
],
"address": 22,
"source": 3,
"text": " comisd xmm0, QWORD PTR [rax-8]"
"text": " comisd xmm0, QWORD PTR [rax-8]"
},
{
"opcodes": [
@ -91,7 +83,7 @@
],
"address": 27,
"source": 3,
"text": " jbe SHORT $LN10@maxArray"
"text": " jbe SHORT $LN10@maxArray"
},
{
"opcodes": [
@ -103,7 +95,7 @@
],
"address": 29,
"source": 3,
"text": " movsd QWORD PTR [rax-8], xmm0"
"text": " movsd QWORD PTR [rax-8], xmm0"
},
{
"source": null,
@ -119,7 +111,7 @@
],
"address": 34,
"source": 3,
"text": " movsd xmm0, QWORD PTR [rdx+rax]"
"text": " movsd xmm0, QWORD PTR [rdx+rax]"
},
{
"opcodes": [
@ -130,7 +122,7 @@
],
"address": 39,
"source": 3,
"text": " comisd xmm0, QWORD PTR [rax]"
"text": " comisd xmm0, QWORD PTR [rax]"
},
{
"opcodes": [
@ -139,7 +131,7 @@
],
"address": 43,
"source": 3,
"text": " jbe SHORT $LN14@maxArray"
"text": " jbe SHORT $LN14@maxArray"
},
{
"opcodes": [
@ -150,16 +142,12 @@
],
"address": 45,
"source": 3,
"text": " movsd QWORD PTR [rax], xmm0"
"text": " movsd QWORD PTR [rax], xmm0"
},
{
"source": null,
"text": "$LN14@maxArray:"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
242,
@ -171,7 +159,7 @@
],
"address": 49,
"source": 3,
"text": " movsd xmm0, QWORD PTR [rdx+rax+8]"
"text": " movsd xmm0, QWORD PTR [rdx+rax+8]"
},
{
"opcodes": [
@ -183,7 +171,7 @@
],
"address": 55,
"source": 3,
"text": " comisd xmm0, QWORD PTR [rax+8]"
"text": " comisd xmm0, QWORD PTR [rax+8]"
},
{
"opcodes": [
@ -192,7 +180,7 @@
],
"address": 60,
"source": 3,
"text": " jbe SHORT $LN15@maxArray"
"text": " jbe SHORT $LN15@maxArray"
},
{
"opcodes": [
@ -204,16 +192,12 @@
],
"address": 62,
"source": 3,
"text": " movsd QWORD PTR [rax+8], xmm0"
"text": " movsd QWORD PTR [rax+8], xmm0"
},
{
"source": null,
"text": "$LN15@maxArray:"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
242,
@ -225,7 +209,7 @@
],
"address": 67,
"source": 3,
"text": " movsd xmm0, QWORD PTR [rdx+rax+16]"
"text": " movsd xmm0, QWORD PTR [rdx+rax+16]"
},
{
"opcodes": [
@ -237,7 +221,7 @@
],
"address": 73,
"source": 3,
"text": " comisd xmm0, QWORD PTR [rax+16]"
"text": " comisd xmm0, QWORD PTR [rax+16]"
},
{
"opcodes": [
@ -246,7 +230,7 @@
],
"address": 78,
"source": 3,
"text": " jbe SHORT $LN16@maxArray"
"text": " jbe SHORT $LN16@maxArray"
},
{
"opcodes": [
@ -258,7 +242,7 @@
],
"address": 80,
"source": 3,
"text": " movsd QWORD PTR [rax+16], xmm0"
"text": " movsd QWORD PTR [rax+16], xmm0"
},
{
"source": null,
@ -273,11 +257,7 @@
],
"address": 85,
"source": 3,
"text": " add rax, 32 ; 00000020H"
},
{
"source": null,
"text": ""
"text": " add rax, 32 ; 00000020H"
},
{
"opcodes": [
@ -288,7 +268,7 @@
],
"address": 89,
"source": 2,
"text": " sub rcx, 1"
"text": " sub rcx, 1"
},
{
"opcodes": [
@ -297,11 +277,7 @@
],
"address": 93,
"source": 2,
"text": " jne SHORT $LL9@maxArray"
},
{
"source": null,
"text": ""
"text": " jne SHORT $LL9@maxArray"
},
{
"opcodes": [
@ -309,14 +285,10 @@
],
"address": 95,
"source": 4,
"text": " ret 0"
"text": " ret 0"
},
{
"source": null,
"text": "maxArray ENDP"
},
{
"source": null,
"text": ""
}
]

@ -15,128 +15,100 @@
"source": null,
"text": "regexTest PROC"
},
{
"source": null,
"text": ""
},
{
"source": 5,
"text": " sub rsp, 120 ; 00000078H"
},
{
"source": null,
"text": ""
"text": " sub rsp, 120 ; 00000078H"
},
{
"source": 5,
"text": " mov rax, QWORD PTR __security_cookie"
"text": " mov rax, QWORD PTR __security_cookie"
},
{
"source": 5,
"text": " xor rax, rsp"
"text": " xor rax, rsp"
},
{
"source": 5,
"text": " mov QWORD PTR __$ArrayPad$[rsp], rax"
},
{
"source": null,
"text": ""
"text": " mov QWORD PTR __$ArrayPad$[rsp], rax"
},
{
"source": 6,
"text": " lea rdx, OFFSET FLAT:$SG44257"
"text": " lea rdx, OFFSET FLAT:$SG44257"
},
{
"source": 6,
"text": " lea rcx, QWORD PTR s$[rsp]"
"text": " lea rcx, QWORD PTR s$[rsp]"
},
{
"source": 6,
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >"
},
{
"source": null,
"text": ""
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >"
},
{
"source": 9,
"text": " mov edx, 256 ; 00000100H"
"text": " mov edx, 256 ; 00000100H"
},
{
"source": 9,
"text": " mov ecx, 1"
"text": " mov ecx, 1"
},
{
"source": 9,
"text": " call std::regex_constants::operator|"
"text": " call std::regex_constants::operator|"
},
{
"source": 9,
"text": " mov r8d, eax"
},
{
"source": null,
"text": ""
"text": " mov r8d, eax"
},
{
"source": 9,
"text": " lea rdx, OFFSET FLAT:$SG44258"
"text": " lea rdx, OFFSET FLAT:$SG44258"
},
{
"source": 9,
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
},
{
"source": 9,
"text": " call std::basic_regex<char,std::regex_traits<char> >::basic_regex<char,std::regex_traits<char> >"
},
{
"source": null,
"text": ""
"text": " call std::basic_regex<char,std::regex_traits<char> >::basic_regex<char,std::regex_traits<char> >"
},
{
"source": 11,
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
},
{
"source": 11,
"text": " call std::basic_regex<char,std::regex_traits<char> >::~basic_regex<char,std::regex_traits<char> >"
"text": " call std::basic_regex<char,std::regex_traits<char> >::~basic_regex<char,std::regex_traits<char> >"
},
{
"source": 11,
"text": " lea rcx, QWORD PTR s$[rsp]"
"text": " lea rcx, QWORD PTR s$[rsp]"
},
{
"source": 11,
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >"
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >"
},
{
"source": 11,
"text": " mov rcx, QWORD PTR __$ArrayPad$[rsp]"
"text": " mov rcx, QWORD PTR __$ArrayPad$[rsp]"
},
{
"source": 11,
"text": " xor rcx, rsp"
"text": " xor rcx, rsp"
},
{
"source": 11,
"text": " call __security_check_cookie"
"text": " call __security_check_cookie"
},
{
"source": 11,
"text": " add rsp, 120 ; 00000078H"
"text": " add rsp, 120 ; 00000078H"
},
{
"source": 11,
"text": " ret 0"
"text": " ret 0"
},
{
"source": null,
"text": "regexTest ENDP"
},
{
"source": null,
"text": ""
}
]

@ -15,10 +15,6 @@
"source": null,
"text": "regexTest PROC"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
72,
@ -28,11 +24,7 @@
],
"address": 0,
"source": 5,
"text": " sub rsp, 120 ; 00000078H"
},
{
"source": null,
"text": ""
"text": " sub rsp, 120 ; 00000078H"
},
{
"opcodes": [
@ -46,7 +38,7 @@
],
"address": 4,
"source": 5,
"text": " mov rax, QWORD PTR __security_cookie"
"text": " mov rax, QWORD PTR __security_cookie"
},
{
"opcodes": [
@ -56,7 +48,7 @@
],
"address": 11,
"source": 5,
"text": " xor rax, rsp"
"text": " xor rax, rsp"
},
{
"opcodes": [
@ -68,11 +60,7 @@
],
"address": 14,
"source": 5,
"text": " mov QWORD PTR __$ArrayPad$[rsp], rax"
},
{
"source": null,
"text": ""
"text": " mov QWORD PTR __$ArrayPad$[rsp], rax"
},
{
"opcodes": [
@ -86,7 +74,7 @@
],
"address": 19,
"source": 6,
"text": " lea rdx, OFFSET FLAT:$SG44257"
"text": " lea rdx, OFFSET FLAT:$SG44257"
},
{
"opcodes": [
@ -98,7 +86,7 @@
],
"address": 26,
"source": 6,
"text": " lea rcx, QWORD PTR s$[rsp]"
"text": " lea rcx, QWORD PTR s$[rsp]"
},
{
"opcodes": [
@ -110,11 +98,7 @@
],
"address": 31,
"source": 6,
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >"
},
{
"source": null,
"text": ""
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >"
},
{
"opcodes": [
@ -126,7 +110,7 @@
],
"address": 36,
"source": 9,
"text": " mov edx, 256 ; 00000100H"
"text": " mov edx, 256 ; 00000100H"
},
{
"opcodes": [
@ -138,7 +122,7 @@
],
"address": 41,
"source": 9,
"text": " mov ecx, 1"
"text": " mov ecx, 1"
},
{
"opcodes": [
@ -150,7 +134,7 @@
],
"address": 46,
"source": 9,
"text": " call std::regex_constants::operator|"
"text": " call std::regex_constants::operator|"
},
{
"opcodes": [
@ -160,11 +144,7 @@
],
"address": 51,
"source": 9,
"text": " mov r8d, eax"
},
{
"source": null,
"text": ""
"text": " mov r8d, eax"
},
{
"opcodes": [
@ -178,7 +158,7 @@
],
"address": 54,
"source": 9,
"text": " lea rdx, OFFSET FLAT:$SG44258"
"text": " lea rdx, OFFSET FLAT:$SG44258"
},
{
"opcodes": [
@ -190,7 +170,7 @@
],
"address": 61,
"source": 9,
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
},
{
"opcodes": [
@ -202,11 +182,7 @@
],
"address": 66,
"source": 9,
"text": " call std::basic_regex<char,std::regex_traits<char> >::basic_regex<char,std::regex_traits<char> >"
},
{
"source": null,
"text": ""
"text": " call std::basic_regex<char,std::regex_traits<char> >::basic_regex<char,std::regex_traits<char> >"
},
{
"opcodes": [
@ -218,7 +194,7 @@
],
"address": 71,
"source": 11,
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
"text": " lea rcx, QWORD PTR self_regex$[rsp]"
},
{
"opcodes": [
@ -230,7 +206,7 @@
],
"address": 76,
"source": 11,
"text": " call std::basic_regex<char,std::regex_traits<char> >::~basic_regex<char,std::regex_traits<char> >"
"text": " call std::basic_regex<char,std::regex_traits<char> >::~basic_regex<char,std::regex_traits<char> >"
},
{
"opcodes": [
@ -242,7 +218,7 @@
],
"address": 81,
"source": 11,
"text": " lea rcx, QWORD PTR s$[rsp]"
"text": " lea rcx, QWORD PTR s$[rsp]"
},
{
"opcodes": [
@ -254,7 +230,7 @@
],
"address": 86,
"source": 11,
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >"
"text": " call std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >"
},
{
"opcodes": [
@ -266,7 +242,7 @@
],
"address": 91,
"source": 11,
"text": " mov rcx, QWORD PTR __$ArrayPad$[rsp]"
"text": " mov rcx, QWORD PTR __$ArrayPad$[rsp]"
},
{
"opcodes": [
@ -276,7 +252,7 @@
],
"address": 96,
"source": 11,
"text": " xor rcx, rsp"
"text": " xor rcx, rsp"
},
{
"opcodes": [
@ -288,7 +264,7 @@
],
"address": 99,
"source": 11,
"text": " call __security_check_cookie"
"text": " call __security_check_cookie"
},
{
"opcodes": [
@ -299,7 +275,7 @@
],
"address": 104,
"source": 11,
"text": " add rsp, 120 ; 00000078H"
"text": " add rsp, 120 ; 00000078H"
},
{
"opcodes": [
@ -307,14 +283,10 @@
],
"address": 108,
"source": 11,
"text": " ret 0"
"text": " ret 0"
},
{
"source": null,
"text": "regexTest ENDP"
},
{
"source": null,
"text": ""
}
]

@ -3,10 +3,6 @@
"source": null,
"text": "testFunction, COMDAT PROC"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
0,
@ -14,11 +10,7 @@
],
"address": 0,
"source": null,
"text": " mov QWORD PTR [rsp+8], rbx"
},
{
"source": null,
"text": ""
"text": " mov QWORD PTR [rsp+8], rbx"
},
{
"opcodes": [
@ -27,7 +19,7 @@
],
"address": 0,
"source": null,
"text": " xor r8d, r8d"
"text": " xor r8d, r8d"
},
{
"opcodes": [
@ -36,7 +28,7 @@
],
"address": 0,
"source": null,
"text": " movsxd rbx, edx"
"text": " movsxd rbx, edx"
},
{
"opcodes": [
@ -45,7 +37,7 @@
],
"address": 0,
"source": null,
"text": " mov r9, rcx"
"text": " mov r9, rcx"
},
{
"opcodes": [
@ -54,11 +46,7 @@
],
"address": 0,
"source": null,
"text": " mov r11d, r8d"
},
{
"source": null,
"text": ""
"text": " mov r11d, r8d"
},
{
"opcodes": [
@ -67,7 +55,7 @@
],
"address": 0,
"source": null,
"text": " mov r10d, r8d"
"text": " mov r10d, r8d"
},
{
"opcodes": [
@ -76,7 +64,7 @@
],
"address": 0,
"source": null,
"text": " test edx, edx"
"text": " test edx, edx"
},
{
"opcodes": [
@ -85,7 +73,7 @@
],
"address": 0,
"source": null,
"text": " jle SHORT $LN9@testFuncti"
"text": " jle SHORT $LN9@testFuncti"
},
{
"opcodes": [
@ -94,7 +82,7 @@
],
"address": 0,
"source": null,
"text": " cmp ebx, 8"
"text": " cmp ebx, 8"
},
{
"opcodes": [
@ -103,7 +91,7 @@
],
"address": 0,
"source": null,
"text": " jb SHORT $LN9@testFuncti"
"text": " jb SHORT $LN9@testFuncti"
},
{
"opcodes": [
@ -112,7 +100,7 @@
],
"address": 0,
"source": null,
"text": " mov eax, ebx"
"text": " mov eax, ebx"
},
{
"opcodes": [
@ -121,7 +109,7 @@
],
"address": 0,
"source": null,
"text": " and eax, -2147483641 ; ffffffff80000007H"
"text": " and eax, -2147483641 ; ffffffff80000007H"
},
{
"opcodes": [
@ -130,7 +118,7 @@
],
"address": 0,
"source": null,
"text": " jge SHORT $LN19@testFuncti"
"text": " jge SHORT $LN19@testFuncti"
},
{
"opcodes": [
@ -139,7 +127,7 @@
],
"address": 0,
"source": null,
"text": " dec eax"
"text": " dec eax"
},
{
"opcodes": [
@ -148,7 +136,7 @@
],
"address": 0,
"source": null,
"text": " or eax, -8"
"text": " or eax, -8"
},
{
"opcodes": [
@ -157,7 +145,7 @@
],
"address": 0,
"source": null,
"text": " inc eax"
"text": " inc eax"
},
{
"source": null,
@ -170,7 +158,7 @@
],
"address": 0,
"source": null,
"text": " mov edx, ebx"
"text": " mov edx, ebx"
},
{
"opcodes": [
@ -179,7 +167,7 @@
],
"address": 0,
"source": null,
"text": " xorps xmm2, xmm2"
"text": " xorps xmm2, xmm2"
},
{
"opcodes": [
@ -188,7 +176,7 @@
],
"address": 0,
"source": null,
"text": " sub edx, eax"
"text": " sub edx, eax"
},
{
"opcodes": [
@ -197,11 +185,7 @@
],
"address": 0,
"source": null,
"text": " movdqa xmm1, xmm2"
},
{
"source": null,
"text": ""
"text": " movdqa xmm1, xmm2"
},
{
"opcodes": [
@ -210,16 +194,12 @@
],
"address": 0,
"source": null,
"text": " npad 8"
"text": " npad 8"
},
{
"source": null,
"text": "$LL4@testFuncti:"
},
{
"source": null,
"text": ""
},
{
"opcodes": [
0,
@ -227,11 +207,7 @@
],
"address": 0,
"source": null,
"text": " movsxd rax, r10d"
},
{
"source": null,
"text": ""
"text": " movsxd rax, r10d"
},
{
"opcodes": [
@ -240,7 +216,7 @@
],
"address": 0,
"source": null,
"text": " movdqu xmm0, XMMWORD PTR [r9+rax*4]"
"text": " movdqu xmm0, XMMWORD PTR [r9+rax*4]"
},
{
"opcodes": [
@ -249,7 +225,7 @@
],
"address": 0,
"source": null,
"text": " lea eax, DWORD PTR [r10+4]"
"text": " lea eax, DWORD PTR [r10+4]"
},
{
"opcodes": [
@ -258,7 +234,7 @@
],
"address": 0,
"source": null,
"text": " add r10d, 8"
"text": " add r10d, 8"
},
{
"opcodes": [
@ -267,7 +243,7 @@
],
"address": 0,
"source": null,
"text": " movsxd rcx, eax"
"text": " movsxd rcx, eax"
},
{
"opcodes": [
@ -276,7 +252,7 @@
],
"address": 0,
"source": null,
"text": " paddd xmm0, xmm2"
"text": " paddd xmm0, xmm2"
},
{
"opcodes": [
@ -285,11 +261,7 @@
],
"address": 0,
"source": null,
"text": " movdqa xmm2, xmm0"
},
{
"source": null,
"text": ""
"text": " movdqa xmm2, xmm0"
},
{
"opcodes": [
@ -298,7 +270,7 @@
],
"address": 0,
"source": null,
"text": " movdqu xmm0, XMMWORD PTR [r9+rcx*4]"
"text": " movdqu xmm0, XMMWORD PTR [r9+rcx*4]"
},
{
"opcodes": [
@ -307,7 +279,7 @@
],
"address": 0,
"source": null,
"text": " paddd xmm0, xmm1"
"text": " paddd xmm0, xmm1"
},
{
"opcodes": [
@ -316,7 +288,7 @@
],
"address": 0,
"source": null,
"text": " movdqa xmm1, xmm0"
"text": " movdqa xmm1, xmm0"
},
{
"opcodes": [
@ -325,7 +297,7 @@
],
"address": 0,
"source": null,
"text": " cmp r10d, edx"
"text": " cmp r10d, edx"
},
{
"opcodes": [
@ -334,7 +306,7 @@
],
"address": 0,
"source": null,
"text": " jl SHORT $LL4@testFuncti"
"text": " jl SHORT $LL4@testFuncti"
},
{
"opcodes": [
@ -343,7 +315,7 @@
],
"address": 0,
"source": null,
"text": " paddd xmm1, xmm2"
"text": " paddd xmm1, xmm2"
},
{
"opcodes": [
@ -352,7 +324,7 @@
],
"address": 0,
"source": null,
"text": " movdqa xmm0, xmm1"
"text": " movdqa xmm0, xmm1"
},
{
"opcodes": [
@ -361,7 +333,7 @@
],
"address": 0,
"source": null,
"text": " psrldq xmm0, 8"
"text": " psrldq xmm0, 8"
},
{
"opcodes": [
@ -370,7 +342,7 @@
],
"address": 0,
"source": null,
"text": " paddd xmm1, xmm0"
"text": " paddd xmm1, xmm0"
},
{
"opcodes": [
@ -379,7 +351,7 @@
],
"address": 0,
"source": null,
"text": " movdqa xmm0, xmm1"
"text": " movdqa xmm0, xmm1"
},
{
"opcodes": [
@ -388,7 +360,7 @@
],
"address": 0,
"source": null,
"text": " psrldq xmm0, 4"
"text": " psrldq xmm0, 4"
},
{
"opcodes": [
@ -397,7 +369,7 @@
],
"address": 0,
"source": null,
"text": " paddd xmm1, xmm0"
"text": " paddd xmm1, xmm0"
},
{
"opcodes": [
@ -406,7 +378,7 @@
],
"address": 0,
"source": null,
"text": " movd r11d, xmm1"
"text": " movd r11d, xmm1"
},
{
"source": null,
@ -419,11 +391,7 @@
],
"address": 0,
"source": null,
"text": " movsxd rcx, r10d"
},
{
"source": null,
"text": ""
"text": " movsxd rcx, r10d"
},
{
"opcodes": [
@ -432,7 +400,7 @@
],
"address": 0,
"source": null,