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

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 2 15:00:57 PST 2021


myhsu added a comment.

In D88385#2476327 <https://reviews.llvm.org/D88385#2476327>, @jrtc27 wrote:

> 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.

Fair enough.

Then I think another way will be reusing step 1~3 in my algorithm but generate a function for MC code to access auxiliary data structures.


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

https://reviews.llvm.org/D88385



More information about the llvm-commits mailing list