Thread overview
DCD v0.5.0 with ldc2 error <inline asm>:40:2 invalid operand for instruction
Feb 20, 2015
Arjan
Feb 20, 2015
Brian Schott
Feb 20, 2015
David Nadlinger
Feb 21, 2015
Kai Nacke
Feb 21, 2015
Arjan
February 20, 2015
LDC - the LLVM D compiler (99c1b9):
  based on DMD v2.066.1 and LLVM 3.2
  Default target: amd64-portbld-freebsd9.1
  Host CPU: core-avx-i

error:
ldc2 libdparse/src/std/d/lexer.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Isrc -J=. -O5 -release  -od=objs -op -c
<inline asm>:40:2: error: invalid operand for instruction
        pmovmskb %xmm7, %rax
        ^
LLVM ERROR: Error parsing inline asm

Is this a ldc2 issue or DCD issue?
February 20, 2015
On Friday, 20 February 2015 at 15:55:00 UTC, Arjan wrote:
> LDC - the LLVM D compiler (99c1b9):
>   based on DMD v2.066.1 and LLVM 3.2
>   Default target: amd64-portbld-freebsd9.1
>   Host CPU: core-avx-i
>
> error:
> ldc2 libdparse/src/std/d/lexer.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Isrc -J=. -O5 -release  -od=objs -op -c
> <inline asm>:40:2: error: invalid operand for instruction
>         pmovmskb %xmm7, %rax
>         ^
> LLVM ERROR: Error parsing inline asm
>
> Is this a ldc2 issue or DCD issue?

I think it's actually an LLVM issue. I'm using a build of LDC that uses LLVM 3.4 and I don't see this issue. XMM7 and RAX are both valid operands for the PMOVMSKB instruction.
February 20, 2015
On 20 Feb 2015, at 21:58, Brian Schott via digitalmars-d-ldc wrote:
> I think it's actually an LLVM issue. I'm using a build of LDC that uses LLVM 3.4 and I don't see this issue. XMM7 and RAX are both valid operands for the PMOVMSKB instruction.

Okay, that would also make sense. I guess that's just one more reason for ditching pre-3.4 support. At this point, there is just too many known issues to bother with them. Especially since the LLVM 3.6 release is imminent, and given that even if there are no distro packages, compiling LLVM locally as part of building LDC is trivial.

 — David
February 21, 2015
On Friday, 20 February 2015 at 20:58:49 UTC, Brian Schott wrote:
> On Friday, 20 February 2015 at 15:55:00 UTC, Arjan wrote:
>> LDC - the LLVM D compiler (99c1b9):
>>  based on DMD v2.066.1 and LLVM 3.2
>>  Default target: amd64-portbld-freebsd9.1
>>  Host CPU: core-avx-i
>>
>> error:
>> ldc2 libdparse/src/std/d/lexer.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Isrc -J=. -O5 -release  -od=objs -op -c
>> <inline asm>:40:2: error: invalid operand for instruction
>>        pmovmskb %xmm7, %rax
>>        ^
>> LLVM ERROR: Error parsing inline asm
>>
>> Is this a ldc2 issue or DCD issue?
>
> I think it's actually an LLVM issue. I'm using a build of LDC that uses LLVM 3.4 and I don't see this issue. XMM7 and RAX are both valid operands for the PMOVMSKB instruction.

I think the LLVM commit is http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131007/190626.html which was committed after 3.2. I did not check if this is included in LLVM 3.3 but it is in LLVM 3.4.

Regards,
Kai
February 21, 2015
On Saturday, 21 February 2015 at 11:13:46 UTC, Kai Nacke wrote:
> On Friday, 20 February 2015 at 20:58:49 UTC, Brian Schott wrote:
>> On Friday, 20 February 2015 at 15:55:00 UTC, Arjan wrote:
>>> LDC - the LLVM D compiler (99c1b9):
>>> based on DMD v2.066.1 and LLVM 3.2
>>> Default target: amd64-portbld-freebsd9.1
>>> Host CPU: core-avx-i
>>>
>>> error:
>>> ldc2 libdparse/src/std/d/lexer.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Isrc -J=. -O5 -release  -od=objs -op -c
>>> <inline asm>:40:2: error: invalid operand for instruction
>>>       pmovmskb %xmm7, %rax
>>>       ^
>>> LLVM ERROR: Error parsing inline asm
>>>
>>> Is this a ldc2 issue or DCD issue?
>>
>> I think it's actually an LLVM issue. I'm using a build of LDC that uses LLVM 3.4 and I don't see this issue. XMM7 and RAX are both valid operands for the PMOVMSKB instruction.
>
> I think the LLVM commit is http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131007/190626.html which was committed after 3.2. I did not check if this is included in LLVM 3.3 but it is in LLVM 3.4.
>
> Regards,
> Kai

Thanx. I will install a more recent version of llvm alongside and try again.