mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
19 lines
326 B
Plaintext
19 lines
326 B
Plaintext
|
; 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
|
||
|
}
|
||
|
|