2002-11-01 00:05:22 +01:00
|
|
|
; test shifts
|
2002-12-13 06:44:21 +01:00
|
|
|
int %main() {
|
2003-01-13 01:57:49 +01:00
|
|
|
%shamt = add ubyte 0, 1
|
|
|
|
|
|
|
|
; Left shifts...
|
|
|
|
%t1 = shl int 1, ubyte %shamt
|
|
|
|
%t2 = shl int 1, ubyte 4
|
|
|
|
|
|
|
|
%t1 = shl uint 1, ubyte %shamt
|
|
|
|
%t2 = shl uint 1, ubyte 5
|
|
|
|
|
|
|
|
;%t1 = shl long 1, ubyte %shamt
|
|
|
|
%t2 = shl long 1, ubyte 4
|
|
|
|
|
|
|
|
;%t1 = shl ulong 1, ubyte %shamt
|
|
|
|
%t2 = shl ulong 1, ubyte 5
|
|
|
|
|
|
|
|
; Right shifts...
|
|
|
|
%t1 = shr int 1, ubyte %shamt
|
|
|
|
%t2 = shr int 1, ubyte 4
|
|
|
|
|
|
|
|
%t1 = shr uint 1, ubyte %shamt
|
|
|
|
%t2 = shr uint 1, ubyte 5
|
|
|
|
|
|
|
|
;%t1 = shr long 1, ubyte %shamt
|
|
|
|
%t2 = shr long 1, ubyte 4
|
|
|
|
|
|
|
|
;%t1 = shr ulong 1, ubyte %shamt
|
|
|
|
%t2 = shr ulong 1, ubyte 5
|
2002-12-13 06:44:21 +01:00
|
|
|
ret int 0
|
2002-11-01 00:05:22 +01:00
|
|
|
}
|