mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 12:17:31 -06:00
A new compiler type 'win32-vc6' has been added, which uses a slightly modified version of asm-parser-vc to handle assembly output differences from current Visual Studio output. In particular, MSVC6 does not output a comment line containing the function's compile flags prior to the function body. The win32-vc parser uses this to identify the start of a function and initialize currentFunction. Instead, we use the regex that identifies a function name to do this. Otherwise, a TypeError occurs trying to set currentFunction.name when currentFunction is null. In addition, MSVC6 only outputs a file comment once (presumably, until a function from a different file is output). So instead of initializing currentFunction.file to undefined, it is set to currentFile instead. This should get set on the first function found in the file, but if not it is initialized to undefined, so the behavior there would be the same. Finally, the _DATA and _TLS segments are handled as well as some additional miscellaneous directives.
81 lines
3.6 KiB
JavaScript
81 lines
3.6 KiB
JavaScript
// Copyright (c) 2020, 2021, Compiler Explorer 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 HOLDER 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.
|
|
|
|
export { AdaCompiler } from './ada';
|
|
export { AnalysisTool } from './analysis-tool';
|
|
export { AssemblyCompiler } from './assembly';
|
|
export { NasmCompiler } from './nasm';
|
|
export { Cc65Compiler } from './cc65';
|
|
export { CircleCompiler } from './circle';
|
|
export { ClangCompiler } from './clang';
|
|
export { ClangCudaCompiler } from './clang';
|
|
export { ClangHipCompiler } from './clang';
|
|
export { CleanCompiler } from './clean';
|
|
export { CprocCompiler } from './cproc';
|
|
export { CrystalCompiler } from './crystal';
|
|
export { DefaultCompiler } from './default';
|
|
export { DMDCompiler } from './dmd';
|
|
export { EllccCompiler } from './ellcc';
|
|
export { EWARMCompiler } from './ewarm';
|
|
export { EWAVRCompiler } from './ewavr';
|
|
export { FakeCompiler } from './fake-for-test';
|
|
export { FortranCompiler } from './fortran';
|
|
export { GCCCompiler } from './gcc';
|
|
export { GCCRSCompiler } from './gccrs';
|
|
export { GolangCompiler } from './golang';
|
|
export { HaskellCompiler } from './haskell';
|
|
export { ISPCCompiler } from './ispc';
|
|
export { JavaCompiler } from './java';
|
|
export { KotlinCompiler } from './kotlin';
|
|
export { LDCCompiler } from './ldc';
|
|
export { LLCCompiler } from './llc';
|
|
export { LLVMmcaTool } from './llvm-mca';
|
|
export { NimCompiler } from './nim';
|
|
export { NvccCompiler } from './nvcc';
|
|
export { OCamlCompiler } from './ocaml';
|
|
export { OptCompiler } from './opt';
|
|
export { OSACATool } from './osaca';
|
|
export { FPCCompiler } from './pascal';
|
|
export { PascalWinCompiler } from './pascal-win';
|
|
export { PPCICompiler } from './ppci';
|
|
export { PtxAssembler } from './ptxas';
|
|
export { PythonCompiler } from './python';
|
|
export { RubyCompiler } from './ruby';
|
|
export { RustCompiler } from './rust';
|
|
export { RustcCgGCCCompiler } from './rustc-cg-gcc';
|
|
export { MrustcCompiler } from './mrustc';
|
|
export { ScalaCompiler } from './scala';
|
|
export { SdccCompiler } from './sdcc';
|
|
export { SwiftCompiler } from './swift';
|
|
export { TenDRACompiler } from './tendra';
|
|
export { Win32Compiler } from './win32';
|
|
export { Win32VcCompiler } from './win32-vc';
|
|
export { Win32Vc6Compiler } from './win32-vc6';
|
|
export { WineVcCompiler } from './wine-vc';
|
|
export { WslVcCompiler } from './wsl-vc';
|
|
export { ZigCompiler } from './zig';
|
|
export { TinyCCompiler } from './tinyc';
|
|
export { ZigCC } from './zigcc';
|
|
export { ZigCXX } from './zigcxx';
|