- 438A4D222ED5F2FDFF3F3E4B5E5B5E1BC0017635F455658FE655F9706D77516468DBF3F9086C5BB0EA4E1911F68D6FDB858E0C3C276586028E24654704869428
+ 23437D66C7048DADB0D307D41A30D3DE3C879A107D4804C6C95766CA62CA7F875C7C4CC98EFEFD1EE085D6C2AD7844A3C7CD15DD61ED79F5F7ED0017F8F90262
ffa/libffa/fz_arith.ads
(31 . 19)(31 . 20)
1153 Y : in FZ;
1154 Overflow : out WBool;
1155 OF_In : in WBool := 0);
1156 pragma Precondition(X'Length = Y'Length);
1157 pragma Inline_Always(FZ_Add_D);
1158
1159 -- Destructive Add: X := X + W; Overflow := Carry
1160 procedure FZ_Add_D_W(X : in out FZ;
1161 W : in Word;
1162 Overflow : out WBool);
1163 pragma Inline_Always(FZ_Add_D_W);
1164
1165 -- Sum := X + Y; Overflow := Carry
1166 procedure FZ_Add(X : in FZ;
1167 Y : in FZ;
1168 Sum : out FZ;
1169 Overflow : out WBool);
1170 pragma Precondition(X'Length = Y'Length and X'Length = Sum'Length);
1171 pragma Inline_Always(FZ_Add);
1172
1173 -- Gate = 1: Sum := X + Y; Overflow := Carry
1174 -- Gate = 0: Sum := X; Overflow := 0
(52 . 31)(53 . 32)
1176 Gate : in WBool;
1177 Sum : out FZ;
1178 Overflow : out WBool);
1179 pragma Precondition(X'Length = Y'Length and X'Length = Sum'Length);
1180 pragma Inline_Always(FZ_Add_Gated_O);
1181
1182 -- Same as FZ_Add_Gated_O, but without Overflow output
1183 procedure FZ_Add_Gated(X : in FZ;
1184 Y : in FZ;
1185 Gate : in WBool;
1186 Sum : out FZ);
1187 pragma Precondition(X'Length = Y'Length and X'Length = Sum'Length);
1188 pragma Inline_Always(FZ_Add_Gated);
1189
1190 -- Difference := X - Y; Underflow := Borrow
1191 procedure FZ_Sub(X : in FZ;
1192 Y : in FZ;
1193 Difference : out FZ;
1194 Underflow : out WBool);
1195 pragma Precondition(X'Length = Y'Length and X'Length = Difference'Length);
1196 pragma Inline_Always(FZ_Sub);
1197
1198 -- Destructive: If Cond is 1, NotN := ~N; otherwise NotN := N.
1199 procedure FZ_Not_Cond_D(N : in out FZ;
1200 Cond : in WBool);
1201 pragma Inline_Always(FZ_Not_Cond_D);
1202
1203 -- Subtractor that gets absolute value if underflowed, in const. time
1204 procedure FZ_Sub_Abs(X : in FZ;
1205 Y : in FZ;
1206 Difference : out FZ;
1207 Underflow : out WBool);
1208 pragma Precondition(X'Length = Y'Length and X'Length = Difference'Length);
1209 pragma Inline_Always(FZ_Sub_Abs);
1210
1211 end FZ_Arith;