[llvm-bugs] [Bug 32528] New: no way to specify inteldialect for module level inline assembly
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 4 21:10:02 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32528
Bug ID: 32528
Summary: no way to specify inteldialect for module level inline
assembly
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: superjoe30 at gmail.com
CC: llvm-bugs at lists.llvm.org
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170405/c39069c7/attachment-0001.html>
More information about the llvm-bugs
mailing list