-
+ 00E146D70BDF4BC40B8E5B4687470F7A35132EABA708C8F04494121572E9675852087D2869FAA5759749DD3D2F14AEDE6259A115C1C2DFDF2D1551A49DF2C176
ffa/libffa/fz_bitop.adb
(0 . 0)(1 . 67)
415 package body FZ_BitOp is
416
417 -- Result := X & Y
418 procedure FZ_And(X : in FZ; Y : in FZ; Result : out FZ) is
419 begin
420 for i in X'Range loop
421 Result(i) := X(i) and Y(i);
422 end loop;
423 end FZ_And;
424 pragma Inline_Always(FZ_And);
425
426
427 -- N := N & W, W is a word
428 procedure FZ_And_W(N : in out FZ; W : in Word) is
429 begin
430 N(N'First) := N(N'First) and W;
431 end FZ_And_W;
432 pragma Inline_Always(FZ_And_W);
433
434
435 -- Result := X | Y
436 procedure FZ_Or(X : in FZ; Y : in FZ; Result : out FZ) is
437 begin
438 for i in X'Range loop
439 Result(i) := X(i) or Y(i);
440 end loop;
441 end FZ_Or;
442 pragma Inline_Always(FZ_Or);
443
444
445 -- N := N | W, W is a word
446 procedure FZ_Or_W(N : in out FZ; W : in Word) is
447 begin
448 N(N'First) := N(N'First) or W;
449 end FZ_Or_W;
450 pragma Inline_Always(FZ_Or_W);
451
452
453 -- Result := X ^ Y
454 procedure FZ_Xor(X : in FZ; Y : in FZ; Result : out FZ) is
455 begin
456 for i in X'Range loop
457 Result(i) := X(i) xor Y(i);
458 end loop;
459 end FZ_Xor;
460 pragma Inline_Always(FZ_Xor);
461
462
463 -- N := N ^ W, W is a word
464 procedure FZ_Xor_W(N : in out FZ; W : in Word) is
465 begin
466 N(N'First) := N(N'First) xor W;
467 end FZ_Xor_W;
468 pragma Inline_Always(FZ_Xor_W);
469
470
471 -- NotN := ~N
472 procedure FZ_Neg(N : in FZ;
473 NotN : out FZ) is
474 begin
475 for i in N'Range loop
476 NotN(i) := not N(i);
477 end loop;
478 end FZ_Neg;
479 pragma Inline_Always(FZ_Neg);
480
481 end FZ_BitOp;