Esempio n. 1
0
    def div_unsigned_bitmap_unsigned():
        '''0x10000000 / 0x10 = 0x1000000'''

        x = (0x10000000,32)
        res = bitmap.div(x,0x10)
        if bitmap.value(res) == 0x1000000:
            raise Success
Esempio n. 2
0
 def div_signed_bitmap_unsigned():
     '''-0x10/-0x10 = 1'''
     x = (0xfffffffffffffff0,-64)
     res = bitmap.div(x, -0x10)
     if bitmap.value(res) == 1:
         raise Success
Esempio n. 3
0
 def div_signed_bitmap_signed_2():
     x = (0xffffffffffff1634,-64)
     res = bitmap.div(x, 0xad)
     if bitmap.value(res) == -345:
         raise Success
Esempio n. 4
0
 def div_signed_bitmap_signed_1():
     x = (0xffffffffffffa251,-64)
     res = bitmap.div(x, 0xc1)
     if bitmap.value(res) == -124:
         raise Success
Esempio n. 5
0
 def div_unsigned_bitmap_signed():
     '''0x10 / -0x10 = -1'''
     x = (0x10,-32)
     res = bitmap.div(x,-0x10)
     if bitmap.value(res) == -1:
         raise Success