This is an archive of the discontinued LLVM Phabricator instance.

[M68k] Basic FP register files and FMOVE implementations
ClosedPublic

Authored by myhsu on Apr 3 2023, 3:59 PM.

Details

Summary
  • FP registers and register classes definitions
  • MC support for FP registers
  • MC support for the FPDR -> FPDR variant of FMOVE/FSMOVE/FDSMOVE

Note that we don't implement 32/64-bit FP registers with subregisters since f32/f64 values will be converted to f80 upon storing into a register, rather than occupying part of the register. So we only use register classes with different value types to distinguish them.

Diff Detail

Event Timeline

myhsu created this revision.Apr 3 2023, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 3:59 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
myhsu requested review of this revision.Apr 3 2023, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 3:59 PM
0x59616e accepted this revision.Apr 7 2023, 1:34 AM
0x59616e added inline comments.
llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp
666

nit: Can "starts_with" do better in terms of readability ?

666–672

nit: Maybe use early exist to reduce indentation ?

This revision is now accepted and ready to land.Apr 7 2023, 1:34 AM
myhsu updated this revision to Diff 511733.Apr 7 2023, 10:59 AM
myhsu marked an inline comment as done.

Update the register name parsing logics.

myhsu added inline comments.Apr 7 2023, 11:01 AM
llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp
666–672

I wrote in this way so that we can easily plug in the parsing logics for floating point control registers (e.g. fpcr, fpiar) in the future. Please take a look again

myhsu updated this revision to Diff 511740.Apr 7 2023, 11:11 AM

minor updates.

0x59616e added inline comments.Apr 7 2023, 5:19 PM
llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp
666–672

It looks even better now.

0x59616e added a comment.EditedApr 8 2023, 5:44 AM

It seems that we still lack the memory operand for floating point, e.g. something like "MxPCIFP32". Am I correct ? What is your plan of this ?

myhsu marked an inline comment as done.Apr 8 2023, 10:42 AM

It seems that we still lack the memory operand for floating point, e.g. something like "MxPCIFP32". Am I correct ? What is your plan of this ?

Right, those are currently absent and will be added in subsequent patches, along with variants of FMOVE between data and fp registers.

This revision was landed with ongoing or failed builds.Apr 8 2023, 10:44 AM
This revision was automatically updated to reflect the committed changes.