summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2018-10-23 17:23:31 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2018-10-23 17:23:31 +0000
commitd300ba1ed7040c0d3271271d7217f682e6eb4656 (patch)
treeb8a23d474a146b1dd0406b6ae3396d12ef00e448 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parenta3e2ea1c4a200338229464fe6f34337e36cb3fbe (diff)
[tblgen] Allow FixedLenDecoderEmitter to use APInt-like objects as InsnType
Summary: Some targets have very long encodings and uint64_t isn't sufficient. uint128_t isn't portable so such targets need to use an object instead. There is one catch with this at the moment, no string of bits extracted from the encoding may exceeed 64-bits. Fields are still permitted to exceed 64-bits so long as they aren't one contiguous string of bits. If this proves to be a problem then we can modify the generation of fieldFromInstruction() calls to account for it but for now I've added an assertion for this. InsnType must either be integral or an APInt-like object that must: * Have a static const max_size_in_bits equal to the number of bits in the encoding. * be default-constructible and copy-constructible * be constructible from a uint64_t (this is the key area the interface deviates from APInt since this constructor does not take the bit width) * be constructible from an APInt (this can be private) * be convertible to uint64_t * Support the ~, &,, ==, !=, and |= operators with other objects of the same type * Support shift (<<, >>) with signed and unsigned integers on the RHS * Support put (<<) to raw_ostream& Reviewers: bogner, charukcs Subscribers: nhaehnle, llvm-commits Differential Revision: https://reviews.llvm.org/D52100 llvm-svn: 345056
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions