mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
Add support in the EmitMSInlineAsmStr() function for handling integer consts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163645 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
712 B
LLVM
27 lines
712 B
LLVM
; RUN: llc < %s -march=x86 | FileCheck %s
|
|
|
|
define i32 @t1() nounwind {
|
|
entry:
|
|
%0 = tail call i32 asm sideeffect inteldialect "mov eax, $1\0A\09mov $0, eax", "=r,r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32 1) nounwind
|
|
ret i32 %0
|
|
; CHECK: t1
|
|
; CHECK: {{## InlineAsm Start|#APP}}
|
|
; CHECK: .intel_syntax
|
|
; CHECK: mov eax, ecx
|
|
; CHECK: mov ecx, eax
|
|
; CHECK: .att_syntax
|
|
; CHECK: {{## InlineAsm End|#NO_APP}}
|
|
}
|
|
|
|
define void @t2() nounwind {
|
|
entry:
|
|
call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() nounwind
|
|
ret void
|
|
; CHECK: t2
|
|
; CHECK: {{## InlineAsm Start|#APP}}
|
|
; CHECK: .intel_syntax
|
|
; CHECK: mov eax, 1
|
|
; CHECK: .att_syntax
|
|
; CHECK: {{## InlineAsm End|#NO_APP}}
|
|
}
|