[PATCH] D147480: [M68k] Basic FP register files and FMOVE implementations
Sheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 7 01:34:44 PDT 2023
0x59616e accepted this revision.
0x59616e added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp:645
+ // Floating point data register.
+ if (StringRef(RegisterNameLower).take_front(2) == "fp") {
+ auto RegIndex = unsigned(RegisterNameLower[2] - '0');
----------------
0x59616e wrote:
> nit: Maybe use early exist to reduce indentation ?
>
>
nit: Can "starts_with" do better in terms of readability ?
================
Comment at: llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp:645-651
+ if (StringRef(RegisterNameLower).take_front(2) == "fp") {
+ auto RegIndex = unsigned(RegisterNameLower[2] - '0');
+ if (RegIndex < 8) {
+ RegNo = getRegisterByIndex(16 + RegIndex);
+ return true;
+ }
+ }
----------------
nit: Maybe use early exist to reduce indentation ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147480/new/
https://reviews.llvm.org/D147480
More information about the llvm-commits
mailing list