[PATCH] D137010: [libunwind][LoongArch] Add 64-bit LoongArch support
Limin Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 30 20:44:49 PDT 2022
Ami-zhang 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
----------------
tangyouling wrote:
> `__loongarch64` was added just for compatibility, does the newly added code still go to use it?
No, i make sure that `__loongarch64` will not be used in the newly added code.
`__loongarch64` is just to be compatible with the previous codes, and after that, the use of `__loongarch_grlen` can come in handy.
================
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)
----------------
tangyouling wrote:
> `__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?
Yes, it can.
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