]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common header file not applicable to open-vm-tools.
authorKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:26 +0000 (10:35 -0700)
committerKaty Feng <fkaty@vmware.com>
Thu, 5 Oct 2023 17:35:26 +0000 (10:35 -0700)
open-vm-tools/lib/include/vm_basic_asm_arm64.h

index 2cd7c5dce49d0b6bf2dbbe26544b560e753b19c5..88a709c172c39f29ad6cca1fa5e2b83894d96aec 100644 (file)
@@ -336,16 +336,15 @@ GET_CURRENT_PC(void)
 /*
  * GET_CURRENT_LOCATION --
  *
- * Updates the arguments with the values of the pc, x29, sp and x30
- * registers at the current code location where the macro is invoked.
+ * Updates the arguments with the values of the pc, fp, sp and the
+ * return address at the current code location where the macro is invoked.
  */
 
-#define GET_CURRENT_LOCATION(pc, fp, sp, lr) do {                             \
+#define GET_CURRENT_LOCATION(pc, fp, sp, retAddr) do {                        \
    _GET_CURRENT_PC(pc);                                                       \
-   asm volatile("mov %0, x29" "\n\t"                                          \
-                "mov %1, sp"  "\n\t"                                          \
-                "mov %2, x30"                                                 \
-                : "=r" (fp), "=r" (sp), "=r" (lr));                           \
+   asm volatile("mov %0, sp" : "=r" (sp));                                    \
+   fp = (uint64)GetFrameAddr();                                               \
+   retAddr = (uint64)GetReturnAddress();                                      \
 } while (0)