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

Limin Zhang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 4 01:44:07 PDT 2022


Ami-zhang added inline comments.


================
Comment at: libunwind/src/Registers.hpp:5109
+  if (regNum == UNW_LOONGARCH_R0)
+    return 0;
+  if (regNum > 0 && regNum < 32)
----------------
MQ-mengqing wrote:
> It is not appreciated to return 0 directly. Generally we don't get dwarf NO.0 because $zero always is 0. As that it allows the user to use NO.0 as magic to do things like '.cfi_return_column $zero'.
> 
Thanks for your advice.
I have modified it.


================
Comment at: libunwind/src/UnwindRegistersRestore.S:1337
+
+  // $r0 is zero
+  ld.d    $r1, $a0, (8 * 1)
----------------
MQ-mengqing wrote:
> Neither uwn_setcontext nor uwn_getcontext use the 0 position. Besides, is there no needed to save or restore the fscr and the fcc?
Yes, this takes no account of `fcsr` and `fcc`.
Maybe they will be added later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137010



More information about the libcxx-commits mailing list