[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
Wed Dec 30 13:37:40 PST 2020


myhsu added a comment.

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

> I still don't understand what problem code beads are trying to solve that isn't already solved by existing backends like X86. Why can't you just assign operands to instruction encoding bits like a normal backend?

Currently X86 - probably the only Target that shares a similar problem - uses `MCInstrDesc::TSFlags` to carry complex encoding info (maybe @craig.topper can shed some lights here).

`TSFlags` is only 64-bits wide. But some of the M68k instructions need 24 //bytes// to carry its encoding info. Frankly speaking, this is simply because we didn't come up with a optimal way to fit every info into 64 bits when we first created this code base long time ago (I don't think M68k has much more complex instruction formats than X86).

I'm happy to find if there is a way to fit all encoding info into `TSFlags` - and that will bring major code changes to this patch series for sure - if everyone here think this is the approach we should take.


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

https://reviews.llvm.org/D88385



More information about the llvm-commits mailing list