29#ifndef __BASE_CONDCODE_HH__
30#define __BASE_CONDCODE_HH__
87 return ((~(dest >>
shift) & 1) +
88 ((src1 >>
shift) & 1) +
89 ((src2 >>
shift) & 1)) & 0x2;
101 return ((src1 ^ ~src2) & (src1 ^ dest)) & (1ULL <<
shift);
126 dest ^= (dest >> 32);
127 dest ^= (dest >> 16);
static bool findNegative(int width, uint64_t dest)
Calculate the negative flag.
static bool findOverflow(int width, uint64_t dest, uint64_t src1, uint64_t src2)
Calculate the overflow flag from an addition.
static bool findZero(int width, uint64_t dest)
Calculate the zero flag.
static bool findParity(int width, uint64_t dest)
Calculate the parity of a value.
static bool findCarry(int width, uint64_t dest, uint64_t src1, uint64_t src2)
Calculate the carry flag from an addition.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.