prog8/compiler/test/arithmetic/bitshift.p8

889 lines
20 KiB
Plaintext
Raw Normal View History

%import textio
2020-08-27 16:10:22 +00:00
%zeropage basicsafe
2019-08-05 19:01:41 +00:00
2019-08-05 19:01:41 +00:00
main {
str inputbuffer = "?" * 20
2020-04-03 19:45:52 +00:00
sub start() {
2020-12-21 22:45:26 +00:00
ubyte a
2020-08-27 16:10:22 +00:00
txt.print("ubyte shift left\n")
2020-12-21 22:45:26 +00:00
a = shiftlb0()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb1()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb2()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb3()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb4()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb5()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb6()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb7()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb8()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftlb9()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("ubyte shift right\n")
2020-12-21 22:45:26 +00:00
a = shiftrb0()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb1()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb2()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb3()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb4()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb5()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb6()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb7()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb8()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-12-21 22:45:26 +00:00
a = shiftrb9()
txt.print_ubbin(a, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("signed byte shift left\n")
2020-04-03 19:45:52 +00:00
byte signedb
signedb = shiftlsb0()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb1()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb2()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb3()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb4()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb5()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb6()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb7()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb8()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftlsb9()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("signed byte shift right\n")
2020-04-03 19:45:52 +00:00
signedb = shiftrsb0()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb1()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb2()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb3()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb4()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb5()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb6()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb7()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb8()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
signedb = shiftrsb9()
2020-08-27 16:10:22 +00:00
txt.print_ubbin(signedb as ubyte, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("uword shift left\n")
2020-04-03 19:45:52 +00:00
uword uw
uw = shiftluw0()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw1()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw2()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw3()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw4()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw5()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw6()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw7()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw8()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw9()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw10()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw11()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw12()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw13()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw14()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw15()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw16()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftluw17()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("uword shift right\n")
2020-04-03 19:45:52 +00:00
uw = shiftruw0()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw1()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw2()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw3()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw4()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw5()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw6()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw7()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw8()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw9()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw10()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw11()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw12()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw13()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw14()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
uw = shiftruw15()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(uw, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("signed word shift left\n")
2020-04-03 19:45:52 +00:00
word sw
sw = shiftlsw0()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw1()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw2()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw3()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw4()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw5()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw6()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw7()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw8()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw9()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw10()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw11()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw12()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw13()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw14()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw15()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw16()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftlsw17()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-08-27 16:10:22 +00:00
txt.print("enter to continue:\n")
void txt.input_chars(inputbuffer)
2020-04-03 19:45:52 +00:00
2020-08-27 16:10:22 +00:00
txt.print("signed word shift right\n")
2020-04-03 19:45:52 +00:00
sw = shiftrsw0()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw1()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw2()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw3()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw4()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw5()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw6()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw7()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw8()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw9()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw10()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw11()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw12()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw13()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw14()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
sw = shiftrsw15()
2020-08-27 16:10:22 +00:00
txt.print_uwbin(sw as uword, true)
txt.chrout('\n')
2020-04-03 19:45:52 +00:00
2019-08-29 20:31:29 +00:00
}
2020-04-03 19:45:52 +00:00
sub shiftruw0() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 0
}
sub shiftruw1() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 1
}
sub shiftruw2() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 2
}
sub shiftruw3() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 3
}
sub shiftruw4() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 4
}
sub shiftruw5() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 5
}
sub shiftruw6() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 6
}
sub shiftruw7() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q >> 7
}
sub shiftruw8() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 8)
}
sub shiftruw9() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 9)
}
sub shiftruw10() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 10)
}
sub shiftruw11() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 11)
}
sub shiftruw12() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 12)
}
sub shiftruw13() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 13)
}
sub shiftruw14() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 14)
}
sub shiftruw15() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return (q >> 15)
}
sub shiftrsw0() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 0
}
sub shiftrsw1() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 1
}
sub shiftrsw2() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 2
}
sub shiftrsw3() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 3
}
sub shiftrsw4() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 4
}
sub shiftrsw5() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 5
}
sub shiftrsw6() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 6
}
sub shiftrsw7() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q >> 7
}
sub shiftrsw8() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 8)
}
sub shiftrsw9() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 9)
}
sub shiftrsw10() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 10)
}
sub shiftrsw11() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 11)
}
sub shiftrsw12() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 12)
}
sub shiftrsw13() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 13)
}
sub shiftrsw14() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 14)
}
sub shiftrsw15() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return (q >> 15)
}
sub shiftluw0() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 0
}
sub shiftluw1() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 1
}
sub shiftluw2() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 2
}
sub shiftluw3() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 3
}
sub shiftluw4() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 4
}
sub shiftluw5() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 5
}
sub shiftluw6() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 6
}
sub shiftluw7() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 7
}
sub shiftluw8() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 8
}
sub shiftluw9() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 9
}
sub shiftluw10() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 10
}
sub shiftluw11() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 11
}
sub shiftluw12() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 12
}
sub shiftluw13() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 13
}
sub shiftluw14() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 14
}
sub shiftluw15() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 15
}
sub shiftluw16() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 16
}
sub shiftluw17() -> uword {
uword @shared q = $a49f
2020-04-03 19:45:52 +00:00
return q << 17
}
sub shiftlsw0() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 0
}
2020-04-03 19:45:52 +00:00
sub shiftlsw1() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 1
}
sub shiftlsw2() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 2
}
sub shiftlsw3() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 3
}
sub shiftlsw4() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 4
}
sub shiftlsw5() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 5
}
sub shiftlsw6() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 6
}
sub shiftlsw7() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 7
}
sub shiftlsw8() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 8
}
sub shiftlsw9() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 9
}
sub shiftlsw10() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 10
}
sub shiftlsw11() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 11
}
sub shiftlsw12() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 12
}
sub shiftlsw13() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 13
}
sub shiftlsw14() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 14
}
sub shiftlsw15() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 15
}
sub shiftlsw16() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 16
}
sub shiftlsw17() -> word {
word @shared q = -12345
2020-04-03 19:45:52 +00:00
return q << 17
}
sub shiftlb0() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 0
}
sub shiftlb1() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 1
}
sub shiftlb2() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 2
}
sub shiftlb3() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 3
}
sub shiftlb4() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 4
}
sub shiftlb5() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 5
}
sub shiftlb6() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 6
}
sub shiftlb7() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 7
}
sub shiftlb8() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 8
}
sub shiftlb9() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy << 9
}
sub shiftrb0() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 0
}
sub shiftrb1() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 1
}
sub shiftrb2() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 2
}
sub shiftrb3() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 3
}
sub shiftrb4() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 4
}
sub shiftrb5() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 5
}
sub shiftrb6() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 6
}
sub shiftrb7() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 7
}
sub shiftrb8() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 8
}
sub shiftrb9() -> ubyte {
ubyte @shared yy=$ed
2020-04-03 19:45:52 +00:00
return yy >> 9
}
sub shiftlsb0() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 0
}
sub shiftlsb1() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 1
}
sub shiftlsb2() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 2
}
sub shiftlsb3() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 3
}
sub shiftlsb4() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 4
}
sub shiftlsb5() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 5
}
sub shiftlsb6() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 6
}
sub shiftlsb7() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 7
}
sub shiftlsb8() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 8
}
sub shiftlsb9() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy << 9
}
sub shiftrsb0() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 0
}
sub shiftrsb1() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 1
}
sub shiftrsb2() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 2
}
sub shiftrsb3() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 3
}
sub shiftrsb4() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 4
}
sub shiftrsb5() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 5
}
sub shiftrsb6() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 6
}
sub shiftrsb7() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 7
}
sub shiftrsb8() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 8
}
sub shiftrsb9() -> byte {
byte @shared yy=-123
2020-04-03 19:45:52 +00:00
return yy >> 9
}
2019-08-05 19:01:41 +00:00
}