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

Lu Weining via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 23 20:41:41 PST 2022


SixWeining added inline comments.


================
Comment at: lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h:21
+#define GPR_OFFSET(idx) ((idx)*8 + 0)
+#define FPR_OFFSET(idx) ((idx)*8 + sizeof(RegisterInfoPOSIX_loongarch64::GPR))
+#define FCC_OFFSET(idx) ((idx)*1 + 32 * 8 + sizeof(RegisterInfoPOSIX_loongarch64::GPR))
----------------
I'm not sure whether you could use `RegisterInfoPOSIX_loongarch64` in this file directly because I think this file is a `common` file. What do you think? @DavidSpickett


================
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),
----------------
`u0` is a unknown alias. Could we just use `DEFINE_GPR64`?


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

https://reviews.llvm.org/D138407



More information about the lldb-commits mailing list