[PATCH] D137010: [libunwind][LoongArch] Add 64-bit LoongArch support

Youling Tang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 19:14:52 PDT 2022


tangyouling added inline comments.


================
Comment at: libunwind/include/__libunwind_config.h:170
 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_S390X
+#elif defined(__loongarch64)
+#define _LIBUNWIND_TARGET_LOONGARCH 1
----------------
`__loongarch64` was added just for compatibility, does the newly added code still go to use it?


================
Comment at: libunwind/src/UnwindRegistersRestore.S:1302
+DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind19Registers_loongarch6jumptoEv)
+# if defined(__loongarch_frlen) && __loongarch_frlen == 64
+  fld.d    $f0, $r4, (8 * 33 + 8 * 0)
----------------
`__loongarch_frlen` values may be `0, 32, 64`, Bit-width of floating-point registers (0 if there is no FPU).
So can `__loongarch_frlen` be dropped?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137010



More information about the llvm-commits mailing list