2002-11-17 21:06:13 +00:00
|
|
|
|
2003-01-13 00:57:04 +00:00
|
|
|
void %test(sbyte* %P, short* %P, int* %P, long* %P) {
|
2002-11-17 21:06:13 +00:00
|
|
|
%V = load sbyte* %P
|
|
|
|
store sbyte %V, sbyte* %P
|
|
|
|
|
|
|
|
%V = load short* %P
|
|
|
|
store short %V, short* %P
|
|
|
|
|
|
|
|
%V = load int* %P
|
|
|
|
store int %V, int* %P
|
2003-01-13 00:57:04 +00:00
|
|
|
|
|
|
|
%V = load long* %P
|
|
|
|
store long %V, long* %P
|
|
|
|
|
2002-11-17 21:06:13 +00:00
|
|
|
ret void
|
|
|
|
}
|
2002-12-04 17:15:07 +00:00
|
|
|
|
2002-12-28 20:00:33 +00:00
|
|
|
uint %varalloca(uint %Size) {
|
|
|
|
%X = alloca uint, uint %Size ;; Variable sized alloca
|
|
|
|
store uint %Size, uint* %X
|
|
|
|
%Y = load uint* %X
|
|
|
|
ret uint %Y
|
|
|
|
}
|
|
|
|
|
2002-12-13 09:28:50 +00:00
|
|
|
int %main() {
|
2002-12-04 17:15:07 +00:00
|
|
|
%A = alloca sbyte
|
|
|
|
%B = alloca short
|
|
|
|
%C = alloca int
|
2003-01-13 00:57:04 +00:00
|
|
|
%D = alloca long
|
|
|
|
call void %test(sbyte* %A, short* %B, int* %C, long* %D)
|
2002-12-28 20:00:33 +00:00
|
|
|
call uint %varalloca(uint 7)
|
|
|
|
|
2002-12-13 09:28:50 +00:00
|
|
|
ret int 0
|
2002-12-04 17:15:07 +00:00
|
|
|
}
|