mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Added testcase for the llvm.readport and llvm.writeport intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
96db6fcb2e
commit
f8d57a51ad
18
test/CodeGen/X86/ioport.llx
Normal file
18
test/CodeGen/X86/ioport.llx
Normal file
@ -0,0 +1,18 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86
|
||||
|
||||
implementation
|
||||
|
||||
declare int %llvm.readport (ushort)
|
||||
declare void %llvm.writeport (int, ushort)
|
||||
|
||||
uint %in (uint %p) {
|
||||
%i1 = call int(ushort)* %llvm.readport (ushort 255)
|
||||
ret uint 5
|
||||
}
|
||||
|
||||
|
||||
uint %out (uint %p) {
|
||||
call void(int, ushort)* %llvm.writeport (int 1, ushort 255)
|
||||
ret uint 5
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user