diff options
author | John Criswell <criswell@uiuc.edu> | 2004-04-12 16:42:43 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2004-04-12 16:42:43 +0000 |
commit | f8d57a51ad7517771c71dad46c9158ef70adf2ad (patch) | |
tree | a8c17663275901fdf2f0defa1a49090581ec7830 /test/CodeGen | |
parent | 96db6fcb2e81aa310b76b10a6aa3fce94b58ad75 (diff) | |
download | external_llvm-f8d57a51ad7517771c71dad46c9158ef70adf2ad.zip external_llvm-f8d57a51ad7517771c71dad46c9158ef70adf2ad.tar.gz external_llvm-f8d57a51ad7517771c71dad46c9158ef70adf2ad.tar.bz2 |
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
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/ioport.llx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/ioport.llx b/test/CodeGen/X86/ioport.llx new file mode 100644 index 0000000..37f80d2 --- /dev/null +++ b/test/CodeGen/X86/ioport.llx @@ -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 +} + |