www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - DCD v0.5.0 with ldc2 error <inline asm>:40:2 invalid operand for

reply "Arjan" <arjan ask.me.to> writes:
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?
Feb 20 2015
parent reply "Brian Schott" <briancschott gmail.com> writes:
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.
Feb 20 2015
next sibling parent David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
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
Feb 20 2015
prev sibling parent reply "Kai Nacke" <kai redstar.de> writes:
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- 0131007/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
Feb 21 2015
parent "Arjan" <arjan ask.me.to> writes:
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- 0131007/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.
Feb 21 2015