[PATCH] D88385: [TableGen][M68K] (Patch 1/8) Utilities for complex instruction addressing modes: CodeBeads and logical operand helper functions

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 2 14:52:55 PST 2021


jrtc27 added a comment.

In D88385#2476326 <https://reviews.llvm.org/D88385#2476326>, @myhsu wrote:

> In D88385#2476220 <https://reviews.llvm.org/D88385#2476220>, @Paul-C-Anagnostopoulos wrote:
>
>> If it isn't possible to encode the information in TSFlags, another possibility is to add a pointer to the MCInstrDesc class that points to some kind of auxiliary class/struct.
>
> This actually gives me an idea to directly use the `MCInstrDesc::TSFlags` as a //pointer// to auxiliary data structures. That is:
>
>   auto* AuxTable =  reinterpret_cast<uint8_t*>(MD.TSFlags);

Definitely not. Integers are not pointers, and will break on CHERI. You would need to make TSFlags a uintptr_t if you want that to work, but then you only get 32 bits on 32-bit architectures.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88385/new/

https://reviews.llvm.org/D88385



More information about the llvm-commits mailing list