1- #![ allow( unused_macros) ]
2-
31use crate :: bid_decimal_data:: * ;
42use crate :: bid_functions:: * ;
53use crate :: { BidUint64 , BidUint128 , BidUint256 , IdecFlags , IdecRound } ;
@@ -60,7 +58,9 @@ pub(crate) use dec;
6058//======================================
6159
6260macro_rules! set_status_flags {
63- ( $fpsc: expr, $status: expr) => { { * $fpsc |= $status } } ;
61+ ( $fpsc: expr, $status: expr) => {
62+ * $fpsc |= $status
63+ } ;
6464}
6565
6666pub ( crate ) use set_status_flags;
@@ -926,6 +926,7 @@ macro_rules! mul_128x128_full {
926926 $ql. w[ 1 ] = qm2. w[ 0 ] ;
927927 } ;
928928}
929+ pub ( crate ) use mul_128x128_full;
929930
930931macro_rules! mul_128x128_low {
931932 ( $ql: expr, $a: expr, $b: expr) => {
@@ -938,27 +939,6 @@ macro_rules! mul_128x128_low {
938939}
939940pub ( crate ) use mul_128x128_low;
940941
941- macro_rules! mul_128x128_full {
942- ( $qh: expr, $ql: expr, $a: expr, $b: expr) => {
943- let mut albl: BidUint128 = Default :: default ( ) ;
944- let mut albh: BidUint128 = Default :: default ( ) ;
945- let mut ahbl: BidUint128 = Default :: default ( ) ;
946- let mut ahbh: BidUint128 = Default :: default ( ) ;
947- let mut qm: BidUint128 = Default :: default ( ) ;
948- let mut qm2: BidUint128 = Default :: default ( ) ;
949- mul_64x64_to_128!( albh, ( $a) . w[ 0 ] , ( $b) . w[ 1 ] ) ;
950- mul_64x64_to_128!( ahbl, ( $b) . w[ 0 ] , ( $a) . w[ 1 ] ) ;
951- mul_64x64_to_128!( albl, ( $a) . w[ 0 ] , ( $b) . w[ 0 ] ) ;
952- mul_64x64_to_128!( ahbh, ( $a) . w[ 1 ] , ( $b) . w[ 1 ] ) ;
953- add_128_128!( qm, albh, ahbl) ;
954- $ql. w[ 0 ] = albl. w[ 0 ] ;
955- add_128_64!( qm2, qm, albl. w[ 1 ] ) ;
956- add_128_64!( $qh, ahbh, qm2. w[ 1 ] ) ;
957- $ql. w[ 1 ] = qm2. w[ 0 ] ;
958- } ;
959- }
960- pub ( crate ) use mul_128x128_full;
961-
962942/// Get full 64x64-bit product.
963943/// Note that this macro is used for `CX < 2^61`, `CY < 2^61`.
964944macro_rules! mul_64x64_to_128_fast {
0 commit comments