<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - no way to specify inteldialect for module level inline assembly"
href="https://bugs.llvm.org/show_bug.cgi?id=32528">32528</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>no way to specify inteldialect for module level inline assembly
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>superjoe30@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The following IR module works correctly, which uses AT&T syntax for
module-level inline assembly:
source_filename = "./hello.asm"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
module asm ".text"
module asm ".globl _start"
module asm ""
module asm "_start:"
module asm " mov $1, %rax"
module asm " mov $1, %rdi"
module asm " mov $msg, %rsi"
module asm " mov $14, %rdx"
module asm " syscall"
module asm ""
module asm " mov $60, %rax"
module asm " mov $0, %rdi"
module asm " syscall"
module asm ""
module asm ".data"
module asm ""
module asm "msg:"
module asm " .ascii \22Hello, world!\5Cn\22"
However the following IR module does not work, since there is no way to specify
Intel dialect for module-level inline assembly:
source_filename = "./hello.asm"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
module asm inteldialect ".text"
module asm inteldialect ".globl _start"
module asm inteldialect ""
module asm inteldialect "_start:"
module asm inteldialect " mov rax, 1"
module asm inteldialect " mov rdi, 1"
module asm inteldialect " mov rsi, msg"
module asm inteldialect " mov rdx, 14"
module asm inteldialect " syscall"
module asm inteldialect ""
module asm inteldialect " mov rax, 60"
module asm inteldialect " mov rdi, 0"
module asm inteldialect " syscall"
module asm inteldialect ""
module asm inteldialect ".data"
module asm inteldialect ""
module asm inteldialect "msg:"
module asm inteldialect " .ascii \22Hello, world!\5Cn\22"
hello.ll:5:12: error: expected string constant
module asm inteldialect ".text"
^
inline assembly supports inteldialect, so module-level inline assembly should
support it too.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>