[Lldb-commits] [PATCH] D138407: [LLDB] Add LoongArch register definitions and operations

WÁNG Xuěruì via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 23 22:38:59 PST 2022


xen0n added inline comments.


================
Comment at: lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h:98
+    DEFINE_GPR64_ALT(r20, t8, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64_ALT(r21, u0, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64_ALT(r22, fp, LLDB_REGNUM_GENERIC_FP),
----------------
SixWeining wrote:
> `u0` is a unknown alias. Could we just use `DEFINE_GPR64`?
FYI the `u0` name is [[ https://www.kernel.org/doc/html/latest/loongarch/introduction.html | a non-standard alias only seen in the Linux kernel ]]. It should be harmless to just support `r21` but not `u0`, much like how we don't support `v0/v1` any more.

While at it, `s9` in addition to `fp` may be supported too. (Arguably `s9` is a better description of `r22` than `fp`, because FP usage can be disabled while generating code, in which case it's just another ordinary callee-saved register. But it seems some people believe so deeply that this usage is acceptable that the name persisted into the final ABI document...)


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

https://reviews.llvm.org/D138407



More information about the lldb-commits mailing list