summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/CodeGen/X86/ioport.llx
blob: 37f80d2fb8543390bc0062d0fedb53df5bad76e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}

OpenPOWER on IntegriCloud