This is an archive of the discontinued LLVM Phabricator instance.

[VE] Implements minimum MC layer for VE
AbandonedPublic

Authored by kaz7 on Apr 23 2020, 1:58 AM.

Details

Summary

This patch includes following items.

  • Defines ELF binary code for VE
  • Adds AsmParser and minimum AsmBackend/ELFObjectWriter/MCCodeEmitter.
  • Corrects bitfield defined in VEInstrFormats.td
  • Adds regression test of MC layer for a LEA instruction.

Diff Detail

Event Timeline

kaz7 created this revision.Apr 23 2020, 1:58 AM
kaz7 planned changes to this revision.Apr 23 2020, 4:58 PM

I've not recognized several errors related to lld. I'll revise this patch to fix those errors.

kaz7 updated this revision to Diff 260191.Apr 26 2020, 5:40 PM

I guess lld error is caused by build server.
This time, I've rebased to the latest and updated.

I guess this is ok from the technical side. However, as it is, this patch is quite large and fixes bugs in existing code and adds new functionality at the same time. How about we split this up into three patches:

  1. Fixes for the instruction bit encoding.
  2. The 'EM_VE' ELF changes
  3. The VEAsmParser and tests.
llvm/lib/Target/VE/VEInstrInfo.td
246

typo

261

Is this a related change? (same in l265).

kaz7 added a comment.Apr 28 2020, 2:47 AM

Thank you for the comments. I'm also considering the size of this patch. I'll split it as you suggested after a week and half holidays. How should I leave this patch? Close this and open divided patches newly? Let me know the recommended way. Thanks in advance.

kaz7 marked 2 inline comments as done.Apr 28 2020, 2:52 AM

Thanks for the comments.

llvm/lib/Target/VE/VEInstrInfo.td
246

Thanks. I'll fix it in divided patch.

261

Kind of. EncoderMethod will be called from MC layer. However, we merged not-defined encoder method like this, so I needed to remove it once until we add actual encoder function in following patches. I will divide patches like below.

  1. Fixes for the instruction bit encoding.
  2. The 'EM_VE' ELF changes
  3. Fixes for undefined methods like this.
  4. The VEAsmParser and tests.

Thank you for the comments. I'm also considering the size of this patch. I'll split it as you suggested after a week and half holidays. How should I leave this patch? Close this and open divided patches newly? Let me know the recommended way. Thanks in advance.

It's up to you really. I'd keep this patch open and add its parts as related revisions. Once all the child patches are committed, this diff can be closed/abandoned.

llvm/lib/Target/VE/VEInstrInfo.td
261

Sounds good.

kaz7 planned changes to this revision.May 6 2020, 4:26 PM
kaz7 abandoned this revision.May 31 2020, 3:41 PM

Closing this ticket since I divided this to 4 patches, and all of them are reviewed and landed well. Thank you!