mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-30 15:32:52 +01:00
43d7449301
llvm-svn: 12943
22 lines
383 B
Plaintext
22 lines
383 B
Plaintext
; RUN: llvm-as < %s | llc -march=x86
|
|
|
|
implementation
|
|
|
|
declare int %llvm.readio (int *)
|
|
declare void %llvm.writeio (int, int *)
|
|
|
|
int %in(int * %p1) {
|
|
%p2 = alloca int
|
|
%i1 = call int %llvm.readio (int* %p1)
|
|
%i2 = call int %llvm.readio (int* %p2)
|
|
%r = add int %i1, %i2
|
|
ret int %r
|
|
}
|
|
|
|
|
|
void %out(int* %p) {
|
|
call void(int, int*)* %llvm.writeio (int 1, int * %p)
|
|
ret void
|
|
}
|
|
|