@@ -1753,6 +1753,38 @@ btorsim_bv_sra (const BtorSimBitVector *a, const BtorSimBitVector *b)
1753
1753
return res ;
1754
1754
}
1755
1755
1756
+ BtorSimBitVector *
1757
+ btorsim_bv_rol (const BtorSimBitVector * a , const BtorSimBitVector * b ) {
1758
+ BtorSimBitVector * width = btorsim_bv_uint64_to_bv (a -> width , a -> width );
1759
+ BtorSimBitVector * rev = btorsim_bv_sub (width , b );
1760
+
1761
+ BtorSimBitVector * sll_part = btorsim_bv_sll (a , b );
1762
+ BtorSimBitVector * srl_part = btorsim_bv_srl (a , rev );
1763
+ BtorSimBitVector * res = btorsim_bv_or (sll_part , srl_part );
1764
+
1765
+ btorsim_bv_free (width );
1766
+ btorsim_bv_free (rev );
1767
+ btorsim_bv_free (sll_part );
1768
+ btorsim_bv_free (srl_part );
1769
+ return res ;
1770
+ }
1771
+
1772
+ BtorSimBitVector *
1773
+ btorsim_bv_ror (const BtorSimBitVector * a , const BtorSimBitVector * b ) {
1774
+ BtorSimBitVector * width = btorsim_bv_uint64_to_bv (a -> width , a -> width );
1775
+ BtorSimBitVector * rev = btorsim_bv_sub (width , b );
1776
+
1777
+ BtorSimBitVector * srl_part = btorsim_bv_srl (a , b );
1778
+ BtorSimBitVector * sll_part = btorsim_bv_sll (a , rev );
1779
+ BtorSimBitVector * res = btorsim_bv_or (srl_part , sll_part );
1780
+
1781
+ btorsim_bv_free (width );
1782
+ btorsim_bv_free (rev );
1783
+ btorsim_bv_free (srl_part );
1784
+ btorsim_bv_free (sll_part );
1785
+ return res ;
1786
+ }
1787
+
1756
1788
BtorSimBitVector *
1757
1789
btorsim_bv_mul (const BtorSimBitVector * a , const BtorSimBitVector * b )
1758
1790
{
0 commit comments