[PATCH] D42157: [clang-cl] Let /FA output use intel assembly.

naoyuki nabana via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 06:30:52 PDT 2020


Cartman0 added a comment.

hi! I try to assemble the .asm outputted from `clang-cl` by ML/ML64.exe on windows10.
The ".asm" files outputted from `clang-cl /FA` / are supports to assemble by ML/ML64.exe on windows?

when assemble by ML64.exe, occured " A2008:syntax error" and  A2044:invalid character in file.

(Developer Command Prompt for VS 2019)

  >ml helloworld.asm
  Microsoft (R) Macro Assembler Version 14.26.28806.0
  Copyright (C) Microsoft Corporation.  All rights reserved.
  
   Assembling: helloworld.asm
  helloworld.asm(1) : error A2008:syntax error : .
  helloworld.asm(2) : error A2008:syntax error : .
  helloworld.asm(3) : error A2008:syntax error : .
  helloworld.asm(4) : error A2008:syntax error : .type
  helloworld.asm(5) : error A2008:syntax error : .
  helloworld.asm(6) : error A2008:syntax error : .
  helloworld.asm(7) : error A2008:syntax error : .
  helloworld.asm(8) : error A2008:syntax error : .
  helloworld.asm(9) : error A2008:syntax error : .
  helloworld.asm(10) : error A2008:syntax error : .
  helloworld.asm(11) : error A2008:syntax error : .
  helloworld.asm(12) : error A2008:syntax error : .type
  helloworld.asm(13) : error A2008:syntax error : .
  helloworld.asm(14) : error A2044:invalid character in file
  helloworld.asm(15) : error A2008:syntax error : .
  helloworld.asm(16) : error A2044:invalid character in file
  helloworld.asm(17) : error A2044:invalid character in file
  helloworld.asm(18) : error A2044:invalid character in file
  helloworld.asm(19) : error A2044:invalid character in file
  helloworld.asm(20) : error A2044:invalid character in file
  helloworld.asm(21) : error A2044:invalid character in file
  helloworld.asm(22) : error A2044:invalid character in file
  helloworld.asm(23) : error A2044:invalid character in file
  helloworld.asm(24) : error A2044:invalid character in file
  helloworld.asm(25) : error A2044:invalid character in file
  helloworld.asm(26) : error A2044:invalid character in file
  helloworld.asm(27) : error A2044:invalid character in file
  helloworld.asm(28) : error A2044:invalid character in file
  helloworld.asm(29) : error A2044:invalid character in file
  helloworld.asm(30) : error A2044:invalid character in file
  helloworld.asm(31) : error A2044:invalid character in file
  helloworld.asm(32) : error A2044:invalid character in file
  helloworld.asm(33) : error A2044:invalid character in file
  helloworld.asm(34) : error A2044:invalid character in file
  helloworld.asm(35) : error A2044:invalid character in file
  helloworld.asm(36) : error A2044:invalid character in file
  helloworld.asm(37) : error A2044:invalid character in file
  helloworld.asm(38) : error A2044:invalid character in file
  helloworld.asm(39) : error A2044:invalid character in file
  helloworld.asm(40) : error A2044:invalid character in file
  helloworld.asm(41) : error A2044:invalid character in file
  helloworld.asm(42) : error A2044:invalid character in file
  helloworld.asm(43) : error A2044:invalid character in file
  helloworld.asm(44) : error A2044:invalid character in file
  helloworld.asm(45) : error A2044:invalid character in file
  helloworld.asm(46) : error A2044:invalid character in file
  helloworld.asm(47) : error A2044:invalid character in file
  helloworld.asm(48) : error A2044:invalid character in file
  helloworld.asm(49) : error A2044:invalid character in file
  helloworld.asm(50) : error A2044:invalid character in file
  helloworld.asm(51) : error A2044:invalid character in file
  helloworld.asm(52) : error A2044:invalid character in file
  helloworld.asm(53) : error A2044:invalid character in file
  helloworld.asm(54) : error A2044:invalid character in file
  helloworld.asm(55) : error A2044:invalid character in file
  helloworld.asm(56) : error A2044:invalid character in file
  helloworld.asm(57) : error A2044:invalid character in file
  helloworld.asm(58) : error A2044:invalid character in file
  helloworld.asm(59) : error A2044:invalid character in file
  helloworld.asm(60) : error A2044:invalid character in file
  helloworld.asm(61) : error A2044:invalid character in file
  helloworld.asm(62) : error A2044:invalid character in file
  helloworld.asm(63) : error A2044:invalid character in file
  helloworld.asm(64) : error A2044:invalid character in file
  helloworld.asm(65) : error A2044:invalid character in file
  helloworld.asm(66) : error A2044:invalid character in file
  helloworld.asm(67) : error A2044:invalid character in file
  helloworld.asm(68) : error A2044:invalid character in file
  helloworld.asm(69) : error A2044:invalid character in file
  helloworld.asm(70) : error A2044:invalid character in file
  helloworld.asm(71) : error A2044:invalid character in file
  helloworld.asm(72) : error A2044:invalid character in file
  helloworld.asm(73) : error A2044:invalid character in file
  helloworld.asm(74) : error A2044:invalid character in file
  helloworld.asm(75) : error A2044:invalid character in file
  helloworld.asm(76) : error A2044:invalid character in file
  helloworld.asm(77) : error A2044:invalid character in file
  helloworld.asm(78) : error A2044:invalid character in file
  helloworld.asm(79) : error A2044:invalid character in file
  helloworld.asm(80) : error A2044:invalid character in file
  helloworld.asm(81) : error A2044:invalid character in file
  helloworld.asm(82) : error A2044:invalid character in file
  helloworld.asm(83) : error A2044:invalid character in file
  helloworld.asm(84) : error A2044:invalid character in file
  helloworld.asm(85) : error A2044:invalid character in file
  helloworld.asm(86) : error A2044:invalid character in file
  helloworld.asm(87) : error A2044:invalid character in file
  helloworld.asm(88) : error A2044:invalid character in file
  helloworld.asm(89) : error A2044:invalid character in file
  helloworld.asm(90) : error A2044:invalid character in file
  helloworld.asm(91) : error A2044:invalid character in file
  helloworld.asm(92) : error A2044:invalid character in file
  helloworld.asm(93) : error A2044:invalid character in file
  helloworld.asm(94) : error A2044:invalid character in file
  helloworld.asm(95) : error A2044:invalid character in file
  helloworld.asm(96) : error A2044:invalid character in file
  helloworld.asm(97) : error A2044:invalid character in file
  helloworld.asm(98) : error A2044:invalid character in file
  helloworld.asm(99) : error A2044:invalid character in file
  helloworld.asm(100) : error A2044:invalid character in file
  helloworld.asm(101) : fatal error A1012:error count exceeds 100; stopping assembly

created the `helloworld.asm`.

  >clang-cl /clang:-masm=intel /FA helloworld.cpp

`helloworld.cpp`

  c++
  #include <iostream>
  #include <vector>
  #include <string>
  
  int main()
  {
      std::vector<std::string> msg{"Hello1", "C++", "World", "from", "VS Code", "and the C++ extension!"};
  
      for (const std::string &word : msg)
      {
          std::cout << word << " ";
      }
      std::cout << std::endl;
      return 0;
  }

my env

- Windows 10 ver2004
- Visual Studio 2019
- ML.exe 14.26.28806.0
- clang-cl.exe version 10.0.0 (installed from VisualStudio2019 installer)

please tell me how to solve it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D42157/new/

https://reviews.llvm.org/D42157





More information about the cfe-commits mailing list