gem5  v20.1.0.0
Functions
bitfield.test.cc File Reference
#include <gtest/gtest.h>
#include "base/bitfield.hh"

Go to the source code of this file.

Functions

 TEST (BitfieldTest, Mask0Bits)
 
 TEST (BitfieldTest, Mask1Bit)
 
 TEST (BitfieldTest, Mask8Bits)
 
 TEST (BitfieldTest, Mask16Bits)
 
 TEST (BitfieldTest, Mask32Bits)
 
 TEST (BitfieldTest, MaskAllBits)
 
 TEST (BitfieldTest, MaskAllBitsGreaterThan64)
 
 TEST (BitfieldTest, MaskOneBit)
 
 TEST (BitfieldTest, MaskTwoBits)
 
 TEST (BitfieldTest, MaskThreeBits)
 
 TEST (BitfieldTest, MaskEntireRange)
 
 TEST (BitfieldTest, MaskOutsideOfRange)
 
 TEST (BitfieldTest, ExtractOneBit)
 
 TEST (BitfieldTest, Extract63rdBit)
 
 TEST (BitfieldTest, ExtractFirstBit)
 
 TEST (BitfieldTest, ExtractFirstBitFirstBitZero)
 
 TEST (BitfieldTest, ExtractThreeBits)
 
 TEST (BitfieldTest, MbitsStandardCase)
 
 TEST (BitfieldTest, MbitsEntireRange)
 
 TEST (BitfieldTest, SignExtendPositiveInput)
 
 TEST (BitfieldTest, SignExtendNegativeInput)
 
 TEST (BitfieldTest, SignExtendPositiveInputOutsideRange)
 
 TEST (BitfieldTest, SignExtendNegativeInputOutsideRange)
 
 TEST (BitfieldTest, InsertOneBitTo3)
 
 TEST (BitfieldTest, InsertOneBitTo18)
 
 TEST (BitfieldTest, InsertOneBitTo3LsbZero)
 
 TEST (BitfieldTest, InsertOneBitTo18LsbZero)
 
 TEST (BitfieldTest, InsertOnBitTo8LsbZero)
 
 TEST (BitfieldTest, InsertMultipleBits)
 
 TEST (BitfieldTest, InsertMultipleBitsOverwrite)
 
 TEST (BitfieldTest, ReverseBits8Bit)
 
 TEST (BitfieldTest, ReverseBits64Bit)
 
 TEST (BitfieldTest, FindMsb29)
 
 TEST (BitfieldTest, FindMsb63)
 
 TEST (BitfieldTest, FindMsbZero)
 
 TEST (BitfieldTest, FindLsb)
 
 TEST (BitfieldTest, FindLsbZero)
 
 TEST (BitfieldTest, IsPow2)
 
 TEST (BitfieldTest, IsNotPow2)
 
 TEST (BitfieldTest, IsPow2Zero)
 
 TEST (BitfieldTest, PopCountNoBits)
 
 TEST (BitfieldTest, PopCountOneBit)
 
 TEST (BitfieldTest, PopCountManyBits)
 
 TEST (BitfieldTest, PopCountAllOnes)
 
 TEST (BitfieldTest, AlignToPowerOfTwo0)
 
 TEST (BitfieldTest, AlignToPowerOfTwo3)
 
 TEST (BitfieldTest, AlignToPowerOfTwo5)
 
 TEST (BitfieldTest, AlignToPowerOfTwo10)
 
 TEST (BitfieldTest, AlignToPowerOfTwo16)
 
 TEST (BitfieldTest, AlignToPowerOfTwo31)
 
 TEST (BitfieldTest, CountTrailingZeros32BitsNoTrailing)
 
 TEST (BitfieldTest, CountTrailingZeros32Bits)
 
 TEST (BitfieldTest, CountTrailingZeros64BitsNoTrailing)
 
 TEST (BitfieldTest, CountTrailingZeros64Bits)
 
 TEST (BitfieldTest, CountTrailingZero64AllZeros)
 

Function Documentation

◆ TEST() [1/55]

TEST ( BitfieldTest  ,
AlignToPowerOfTwo0   
)

Definition at line 343 of file bitfield.test.cc.

References alignToPowerOfTwo(), and EXPECT_EQ.

◆ TEST() [2/55]

TEST ( BitfieldTest  ,
AlignToPowerOfTwo10   
)

Definition at line 358 of file bitfield.test.cc.

References alignToPowerOfTwo(), and EXPECT_EQ.

◆ TEST() [3/55]

TEST ( BitfieldTest  ,
AlignToPowerOfTwo16   
)

Definition at line 363 of file bitfield.test.cc.

References alignToPowerOfTwo(), and EXPECT_EQ.

◆ TEST() [4/55]

TEST ( BitfieldTest  ,
AlignToPowerOfTwo3   
)

Definition at line 348 of file bitfield.test.cc.

References alignToPowerOfTwo(), and EXPECT_EQ.

◆ TEST() [5/55]

TEST ( BitfieldTest  ,
AlignToPowerOfTwo31   
)

Definition at line 368 of file bitfield.test.cc.

References alignToPowerOfTwo(), and EXPECT_EQ.

◆ TEST() [6/55]

TEST ( BitfieldTest  ,
AlignToPowerOfTwo5   
)

Definition at line 353 of file bitfield.test.cc.

References alignToPowerOfTwo(), and EXPECT_EQ.

◆ TEST() [7/55]

TEST ( BitfieldTest  ,
CountTrailingZero64AllZeros   
)

Definition at line 403 of file bitfield.test.cc.

References ctz64(), and EXPECT_EQ.

◆ TEST() [8/55]

TEST ( BitfieldTest  ,
CountTrailingZeros32Bits   
)

Definition at line 385 of file bitfield.test.cc.

References ctz32(), and EXPECT_EQ.

◆ TEST() [9/55]

TEST ( BitfieldTest  ,
CountTrailingZeros32BitsNoTrailing   
)

Definition at line 379 of file bitfield.test.cc.

References ctz32(), and EXPECT_EQ.

◆ TEST() [10/55]

TEST ( BitfieldTest  ,
CountTrailingZeros64Bits   
)

Definition at line 397 of file bitfield.test.cc.

References ctz64(), EXPECT_EQ, and ULL.

◆ TEST() [11/55]

TEST ( BitfieldTest  ,
CountTrailingZeros64BitsNoTrailing   
)

Definition at line 391 of file bitfield.test.cc.

References ctz64(), and EXPECT_EQ.

◆ TEST() [12/55]

TEST ( BitfieldTest  ,
Extract63rdBit   
)

Definition at line 124 of file bitfield.test.cc.

References bits(), EXPECT_EQ, ULL, and RiscvISA::x.

◆ TEST() [13/55]

TEST ( BitfieldTest  ,
ExtractFirstBit   
)

Definition at line 130 of file bitfield.test.cc.

References bits(), EXPECT_EQ, and RiscvISA::x.

◆ TEST() [14/55]

TEST ( BitfieldTest  ,
ExtractFirstBitFirstBitZero   
)

Definition at line 136 of file bitfield.test.cc.

References bits(), EXPECT_EQ, and RiscvISA::x.

◆ TEST() [15/55]

TEST ( BitfieldTest  ,
ExtractOneBit   
)

Definition at line 118 of file bitfield.test.cc.

References bits(), EXPECT_EQ, and RiscvISA::x.

◆ TEST() [16/55]

TEST ( BitfieldTest  ,
ExtractThreeBits   
)

Definition at line 142 of file bitfield.test.cc.

References bits(), EXPECT_EQ, and RiscvISA::x.

◆ TEST() [17/55]

TEST ( BitfieldTest  ,
FindLsb   
)

Definition at line 282 of file bitfield.test.cc.

References EXPECT_EQ, findLsbSet(), ULL, and X86ISA::val.

◆ TEST() [18/55]

TEST ( BitfieldTest  ,
FindLsbZero   
)

Definition at line 288 of file bitfield.test.cc.

References EXPECT_EQ, and findLsbSet().

◆ TEST() [19/55]

TEST ( BitfieldTest  ,
FindMsb29   
)

Definition at line 264 of file bitfield.test.cc.

References EXPECT_EQ, findMsbSet(), and X86ISA::val.

◆ TEST() [20/55]

TEST ( BitfieldTest  ,
FindMsb63   
)

Definition at line 270 of file bitfield.test.cc.

References EXPECT_EQ, findMsbSet(), ULL, and X86ISA::val.

◆ TEST() [21/55]

TEST ( BitfieldTest  ,
FindMsbZero   
)

Definition at line 277 of file bitfield.test.cc.

References EXPECT_EQ, and findMsbSet().

◆ TEST() [22/55]

TEST ( BitfieldTest  ,
InsertMultipleBits   
)

Definition at line 234 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), ULL, and X86ISA::val.

◆ TEST() [23/55]

TEST ( BitfieldTest  ,
InsertMultipleBitsOverwrite   
)

Definition at line 241 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), and X86ISA::val.

◆ TEST() [24/55]

TEST ( BitfieldTest  ,
InsertOnBitTo8LsbZero   
)

Definition at line 227 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), and X86ISA::val.

◆ TEST() [25/55]

TEST ( BitfieldTest  ,
InsertOneBitTo18   
)

Definition at line 206 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), and X86ISA::val.

◆ TEST() [26/55]

TEST ( BitfieldTest  ,
InsertOneBitTo18LsbZero   
)

Definition at line 220 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), and X86ISA::val.

◆ TEST() [27/55]

TEST ( BitfieldTest  ,
InsertOneBitTo3   
)

Definition at line 199 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), and X86ISA::val.

◆ TEST() [28/55]

TEST ( BitfieldTest  ,
InsertOneBitTo3LsbZero   
)

Definition at line 213 of file bitfield.test.cc.

References bits(), EXPECT_EQ, insertBits(), and X86ISA::val.

◆ TEST() [29/55]

TEST ( BitfieldTest  ,
IsNotPow2   
)

Definition at line 301 of file bitfield.test.cc.

References EXPECT_FALSE, and isPow2().

◆ TEST() [30/55]

TEST ( BitfieldTest  ,
IsPow2   
)

Definition at line 296 of file bitfield.test.cc.

References EXPECT_TRUE, and isPow2().

◆ TEST() [31/55]

TEST ( BitfieldTest  ,
IsPow2Zero   
)

Definition at line 306 of file bitfield.test.cc.

References EXPECT_TRUE, and isPow2().

◆ TEST() [32/55]

TEST ( BitfieldTest  ,
Mask0Bits   
)

Definition at line 46 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [33/55]

TEST ( BitfieldTest  ,
Mask16Bits   
)

Definition at line 61 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [34/55]

TEST ( BitfieldTest  ,
Mask1Bit   
)

Definition at line 51 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [35/55]

TEST ( BitfieldTest  ,
Mask32Bits   
)

Definition at line 66 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [36/55]

TEST ( BitfieldTest  ,
Mask8Bits   
)

Definition at line 56 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [37/55]

TEST ( BitfieldTest  ,
MaskAllBits   
)

Definition at line 71 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [38/55]

TEST ( BitfieldTest  ,
MaskAllBitsGreaterThan64   
)

Definition at line 76 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [39/55]

TEST ( BitfieldTest  ,
MaskEntireRange   
)

Definition at line 103 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [40/55]

TEST ( BitfieldTest  ,
MaskOneBit   
)

Definition at line 88 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [41/55]

TEST ( BitfieldTest  ,
MaskOutsideOfRange   
)

Definition at line 108 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [42/55]

TEST ( BitfieldTest  ,
MaskThreeBits   
)

Definition at line 98 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [43/55]

TEST ( BitfieldTest  ,
MaskTwoBits   
)

Definition at line 93 of file bitfield.test.cc.

References EXPECT_EQ, and ArmISA::mask.

◆ TEST() [44/55]

TEST ( BitfieldTest  ,
MbitsEntireRange   
)

Definition at line 159 of file bitfield.test.cc.

References EXPECT_EQ, mbits(), ULL, and RiscvISA::x.

◆ TEST() [45/55]

TEST ( BitfieldTest  ,
MbitsStandardCase   
)

Definition at line 153 of file bitfield.test.cc.

References EXPECT_EQ, mbits(), and RiscvISA::x.

◆ TEST() [46/55]

TEST ( BitfieldTest  ,
PopCountAllOnes   
)

Definition at line 332 of file bitfield.test.cc.

References EXPECT_EQ, popCount(), and X86ISA::val.

◆ TEST() [47/55]

TEST ( BitfieldTest  ,
PopCountManyBits   
)

Definition at line 326 of file bitfield.test.cc.

References EXPECT_EQ, popCount(), and X86ISA::val.

◆ TEST() [48/55]

TEST ( BitfieldTest  ,
PopCountNoBits   
)

Definition at line 315 of file bitfield.test.cc.

References EXPECT_EQ, and popCount().

◆ TEST() [49/55]

TEST ( BitfieldTest  ,
PopCountOneBit   
)

Definition at line 320 of file bitfield.test.cc.

References EXPECT_EQ, popCount(), and X86ISA::val.

◆ TEST() [50/55]

TEST ( BitfieldTest  ,
ReverseBits64Bit   
)

Definition at line 255 of file bitfield.test.cc.

References EXPECT_EQ, and reverseBits().

◆ TEST() [51/55]

TEST ( BitfieldTest  ,
ReverseBits8Bit   
)

Definition at line 249 of file bitfield.test.cc.

References EXPECT_EQ, and reverseBits().

◆ TEST() [52/55]

TEST ( BitfieldTest  ,
SignExtendNegativeInput   
)

Definition at line 176 of file bitfield.test.cc.

References EXPECT_EQ, output(), and X86ISA::val.

◆ TEST() [53/55]

TEST ( BitfieldTest  ,
SignExtendNegativeInputOutsideRange   
)

Definition at line 188 of file bitfield.test.cc.

References EXPECT_EQ, output(), and X86ISA::val.

◆ TEST() [54/55]

TEST ( BitfieldTest  ,
SignExtendPositiveInput   
)

Definition at line 169 of file bitfield.test.cc.

References EXPECT_EQ, output(), and X86ISA::val.

◆ TEST() [55/55]

TEST ( BitfieldTest  ,
SignExtendPositiveInputOutsideRange   
)

Definition at line 183 of file bitfield.test.cc.

References EXPECT_EQ.


Generated on Wed Sep 30 2020 14:02:18 for gem5 by doxygen 1.8.17