> Will these be fixed in future revisions?
>>
>
> I finally was able to clear some time and deep dive this issue.
>
> The answer to "will they be fix" is Yes.
>
> There are four or five issues in play. Three or four stem from LLVM and 
> the integrated assembler. The last  is undecided, but I *think* it has to 
> do with the incompatibility discussed 
> http://clang.llvm.org/compatibility.html#inline-asm.
>
> Regarding the integrated assembler, there are two assemblers available: 
> one is the integrated assembler built into Clang. The second is the 
> traditional assembler, like GNU AS (GAS). The former is giving us the 
> trouble at the moment (not the latter)
>
> Issue 1: Crypto++ misidentifies the opportunity to provide ASM 
> implementation because Clang returns an error rather than a version string. 
> You see the misidentification by way of -DCRYPTOPP_DISABLE_ASM. A bug 
> report was filed at https://llvm.org/bugs/show_bug.cgi?id=24200. This 
> will become an issue in the future, but its OK for now.
>
> Issue 2: LLVM Bug 18916 - "don't err on '.att_syntax prefix'", 
> https://llvm.org/bugs/show_bug.cgi?id=18916. Right now we are keying on a 
> config.h define called WORKAROUND_LLVM_BUG_18916. We use it to fixup the 
> string literals with the {prefix|noprefix} part. This issue is effectively 
> cleared now.
>
> Issue 3: We have no way to tell when the integrated assembler is being 
> used at the source level (think preprocessor macros). That's going to 
> create problems later, when the 18916 bug is fixed. Right now we are keying 
> on a config.h define called WORKAROUND_LLVM_BUG_18916. I have an idea of 
> how to fix it. I'll take it to the list when the time is right.
>
> Issue 4: the integrated assembler requires each ASM statement to be on a 
> separate line; while GCC effectively allows them to be concatenated with a 
> semi-colon. Remember WORKAROUND_LLVM_BUG_18916? When it get fixed and 
> WORKAROUND_LLVM_BUG_18916 goes away, we won't know when to add the 
> newlines. This issue is effectively cleared now.
>
> Issue 5: I suspect this issue is related to 
> http://clang.llvm.org/compatibility.html#inline-asm. With the other 
> issues cleared, that's all I have remaining to clear and then we can review 
> and check-in. The issues are like the following, and produce an "Illegal 
> operand size" or similar.
>
>     movd rdi, mmx0
>

Add two more LLVM/Clang issues:

    * LLVM Bug 24232 - "[X86] Inline assembly operands don't work with 
.intel_syntax", https://llvm.org/bugs/show_bug.cgi?id=24232
    * LLVM Bug 24226, "Constant not propagated into inline assembly, 
results in "constraint 'I' expects an integer constant expression"", 
https://llvm.org/bugs/show_bug.cgi?id=24226

I have not seen Crypto++ break a compiler like this since the 1990s...

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to