[PATCH] D135417: [AArch64][Windows] Add MC support for save_any_reg.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 04:25:42 PDT 2022
mstorsjo added a comment.
> Representing this as 12 separate operations is a bit ugly, but trying to represent the different modes using a bitfield seemed worse.
Yup, and there's a fairly limited amount of info you can store in the `WinEH::Instruction` class today, so I guess this looks reasonable.
Technically there's no need to have the assembly level directives mirror exactly the same 12 separate opcodes - we could consider e.g. checking whether the provided register name is in the range of x0-x30, d0-d31 or q0-q31 and pick the right opcode based on that - that would reduce the number of assembly directives down to 4 instead of 12. (That's the only aspect of this which is a public interface.) What do you think of that? Internally throughout the rest of the interfaces (AArch64TargetStreamer) it's probably easiest to keep all 12 separate entrypoints in any case.
================
Comment at: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:6108
parseDirectiveSEHClearUnwoundToCall(Loc);
+ else if (IDVal ==".seh_save_any_reg_i")
+ parseDirectiveSEHSaveAnyRegI(Loc, false);
----------------
Nit: Missing space after `==`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135417/new/
https://reviews.llvm.org/D135417
More information about the llvm-commits
mailing list