diff --git a/etc/config/c++.win32.properties b/etc/config/c++.win32.properties index 02f4f05ec..8ac103307 100644 --- a/etc/config/c++.win32.properties +++ b/etc/config/c++.win32.properties @@ -1,3 +1,4 @@ isCl=true compileToAsm=/FAsc +compileToBinary=/FAsc supportsBinary=true diff --git a/examples/c++/sum_over_array_opt.cpp b/examples/c++/sum_over_array_opt.cpp index ab351eb60..3304ff3e6 100644 --- a/examples/c++/sum_over_array_opt.cpp +++ b/examples/c++/sum_over_array_opt.cpp @@ -12,7 +12,11 @@ int testFunction(int* input, int length) { || __has_builtin(__builtin_assume_aligned) input = static_cast(__builtin_assume_aligned(input, 64)); #endif +#if _MSC_VER + __assume((length & 63) == 0); +#else if (length & 63) __builtin_unreachable(); +#endif int sum = 0; for (int i = 0; i < length; ++i) { sum += input[i]; diff --git a/lib/asm.js b/lib/asm.js index f4b822632..3eda134e6 100644 --- a/lib/asm.js +++ b/lib/asm.js @@ -215,7 +215,7 @@ }); } }); - + var directive = /^\s*(\.|([_A-Z]+\b))/; var labelDefinition = /^([a-zA-Z0-9$_.]+):/; var commentOnly = /^\s*([#@;]|\/\/).*/; diff --git a/lib/compile.js b/lib/compile.js index 5399fb430..24f1b3e5c 100644 --- a/lib/compile.js +++ b/lib/compile.js @@ -261,7 +261,7 @@ Compile.prototype.compile = function (source, compiler, options, filters) { if (!filters.binary) { compileToAsm = compilerProps("compileToAsm", "-S").split(" "); } else { - compileToAsm = []; + compileToAsm = compilerProps("compileToBinary", "").split(" "); } if (compilerInfo.isCl) { options = options.concat(['/c', '/Fa' + outputFilename, '/Fo' + outputFilename + ".obj"]);