-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang as an x64 assembler - Masm x64 #99
Comments
Last time I looked there was a different feature set working for at&t, so there's an outside chance that changing dialect would be a workaround. |
I've recently improved handling of "offset" at HEAD in Intel-syntax
assembly. I believe the changes involved may have made it into clang-10,
but am not 100% certain. See https://reviews.llvm.org/D71436.
…On Sun, Jan 19, 2020 at 8:09 AM Jon Chesterfield ***@***.***> wrote:
Last time I looked there was a different feature set working for at&t, so
there's an outside chance that changing dialect would be a workaround.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#99?email_source=notifications&email_token=AAH25N646OWNHEORJFP4GNLQ6RGJTA5CNFSM4KIY4RYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJKRXWI#issuecomment-576003033>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH25NZURZ2O6PZ75VY3B6DQ6RGJTANCNFSM4KIY4RYA>
.
|
As for other assembly dialects - if you can file specific issues here, or
as bugs at http://bugs.llvm.org, people may get to them eventually. The
more specific you can be - reduced test cases that express the precise
issue, explaining the difference between current results and expected
results, etc. - the easier it is for someone to pick it up and fix it.
…On Sun, Jan 19, 2020 at 9:47 AM Eric Astor ***@***.***> wrote:
I've recently improved handling of "offset" at HEAD in Intel-syntax
assembly. I believe the changes involved may have made it into clang-10,
but am not 100% certain. See https://reviews.llvm.org/D71436.
On Sun, Jan 19, 2020 at 8:09 AM Jon Chesterfield ***@***.***>
wrote:
> Last time I looked there was a different feature set working for at&t, so
> there's an outside chance that changing dialect would be a workaround.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#99?email_source=notifications&email_token=AAH25N646OWNHEORJFP4GNLQ6RGJTA5CNFSM4KIY4RYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJKRXWI#issuecomment-576003033>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAH25NZURZ2O6PZ75VY3B6DQ6RGJTANCNFSM4KIY4RYA>
> .
>
|
ericastor Thank you very much for the detailed information! Some functions that worked before do not work today. `C:\msys64\mingw64\bin>echo "mov eax, eax" | llvm-mc -x86-asm-syntax=intel C:\msys64\mingw64\bin>` |
@UnlimitedChild I can't replicate your "mov eax, eax" problem locally on my Linux machine, at least. Can you confirm what version of llvm-mc you're using? Running |
Oh, and please note that clang does not currently compile MASM-syntax assembly directives, etc. - it mostly accepts Intel syntax (omitted size suffixes, I'm working on a MASM-compatible LLVM-based assembler (llvm-ml) in my spare time, but am not sure how long that will take. (llvm-dev posts so far: RFC, and a few other threads) |
C:\msys64\mingw64\bin>llvm-mc -version |
Thank you, everything is clear =)
Great news, I think that there will be no problems with testing. A sufficient number of people are interested in this opportunity. I already found a development branch for macro assembler It's hard to say where the syntax integration should go, there is a very good project that implements support for macro assembler (x32-x64) - https://github.com/Terraspace/UASM, In the project you can see the entire implementation of macro assembler, see the internal logic ... in addition, some documents will be useful and informative - This is the most comprehensive macro assembler documentation. The rest of the description can be found here - https://docs.microsoft.com/en-us/cpp/assembler/masm/microsoft-macro-assembler-reference?view=vs-2017 Is there some kind of UML diagram to describe the expected llvm-ml assembly process? |
@UnlimitedChild That's the documentation I'm referencing, and the "llvm-ml.cpp" you found is in fact the development placeholder I'm working on. I'd certainly like not to be the only one working on it! I'm currently working to land the first commit of substance, though that may take a bit due to it not being my 100% focus while at work. Please note that UASM (and every other open-source MASM project I've found) is released under a license that is generally considered incompatible with LLVM's license, so we cannot reference their code while building this. As for a UML diagram - I'm not sure what you mean. At early stages of this project, we will be testing MASM support by building it through llvm-ml. At later stages (once it's proven to mostly work), it should be possible for clang-cl to build MASM files directly (just as with .s files on other platforms), by defaulting to MASM support when compiling files with the extension ".asm". |
This is what I had in mind, which means it is still under discussion.
Indeed, did not think about it. |
C++ is actually a macro language with inline functions, so macro assembler should use similar processing logic, where the architectural implementation may be similar. Instead of C++ templates, macro operations will be processed. |
@llvm/issue-subscribers-clang-frontend |
…inline/db2da08 Promote develop branch (as of db2da08) to mainline
Adds a TODO for the duplicated utils that we had to copy for do concurrent mapping. Also introduces the duplicate utils in a separate `internal` namespace to avoid naming conflicts.
… unnecessary vtype-preserving sequences (llvm#99) * [LLVM][XTHeadVector] Initial `RedundantVSETVLIElimination` pass * [LLVM][XTHeadVector] `RedundantVSETVLIElimination` This pass removes code sequences like: ``` csrr <r1>, vl csrr <r2>, vtype <a lot of th.vsetvl/th.vsetvli> th.vsetvl zero, <r1>, <r2> ``` * [LLVM][XTHeadVector] Update tests * [LLVM][XTHeadVector] Update tests * [LLVM][XTHeadVector] Fix comments * [LLVM][XTHeadVector] Fix comments * [LLVM][XTHeadVector] More comments * [LLVM][XTHeadVector] Update tests * [LLVM][XTHeadVector] add option `riscv-enable-vsetvli-elim`
Otherwise documentation generation fails due to missing any spellings: ~/dev/llvm/clang/docs/../include/clang/Basic/Attr.td:962:5: error: Attribute has no supported spellings; cannot be documented def CXX26Annotation : InheritableParamAttr { ^
Hello,
why Clang does not support the basic directive - "offset". This topic has been discussed many times
https://lists.llvm.org/pipermail/llvm-bugs/2017-April/054674.html
https://reviews.llvm.org/D37461
https://stackoverflow.com/questions/43223287/why-does-this-simple-assembly-program-work-in-att-syntax-but-not-intel-syntax
https://bugs.llvm.org/show_bug.cgi?id=22511
In general, Сlang does not support many assembler properties, for example, the ability to represent numbers is limited. Should we expect more complete support for assembler dialects in the future?
We can’t live without the offset directive ..
Thanks for the work!
The text was updated successfully, but these errors were encountered: