<div dir="ltr">Hi all,<div>  I stumbled upon either a bug, or we are emitting wrong inline asm code.</div><div><br></div><div>The testcase is:</div><div>```</div><div><div><font face="monospace, monospace">source_filename = "testcase.d"</font></div><div><font face="monospace, monospace">target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"</font></div><div><font face="monospace, monospace">target triple = "x86_64-apple-macosx"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">define void @_D7asanasm3fooFZv() {</font></div><div><font face="monospace, monospace">  %a = alloca [4 x i32], align 32</font></div><div><font face="monospace, monospace">  call void asm sideeffect "movl %ebx, 4+$0", "=*m,~{memory}"([4 x i32]* %a)</font></div><div><font face="monospace, monospace">  ret void</font></div><div><font face="monospace, monospace">}</font></div></div><div>```</div><div><br></div><div>When I try to compile this to assembly code with llc, llc errors.</div><div><font face="monospace, monospace">> llc testcase.ll -o testcase.s -O0</font></div><div><div><font face="monospace, monospace"><inline asm>:1:16: error: unknown token in expression</font></div><div><font face="monospace, monospace">        movl %ebx, 4+(%rsp)</font></div></div><div><font face="monospace, monospace">                      ^</font></div><div><br></div><div>The explicit `-O0` is required for the error to arise.</div><div><br></div><div>The error is gone after removing (or reducing) the alignment of `%a`. This makes me believe that our inline asm syntax is correct to add an offset to a pointer: " 4+$0 ".</div><div><br></div><div>Is this a bug in the asm parser?</div><div><br></div><div>Thanks,</div><div>  Johan</div><div><br></div><div><br></div></div>