[Openmp-commits] [PATCH] D138785: [OMPT][test] Fix mismatch error between the current address and the return address

Limin Zhang via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 28 04:38:22 PST 2022


Ami-zhang added a comment.

On LoongArch64,  the following failures happened when i perform `check-openmp`:

              4: 0: ompt_event_master_end: codeptr_ra=0x555556134c40
  check:89'0                                                        X error: no match found
  check:89'1                                                          with "MASTER_ID" equal to "0"
  check:89'2                                                          with "RETURN_ADDRESS_END" equal to "0x555556134c40"
              5: 0: current_address=0x555556134c48 or 0x555556134c44

The macro `print_current_address(id)` prints the exact address that a previously called runtime function returns to.
 As the above shown, the values of curren_address can not match the value of codeptr_ra (that is return address ) .
Disassemble it and generate the following codes:

  0000000000000b98 <.omp_outlined.>:
  ...
   c3c:   57fc97ff        bl              -876(0xffffc94) # 8d0 <__kmpc_end_master at plt>
   c40:   50000400        b               4(0x4)  # c44 <.omp_outlined.+0xac>
   c44:   03400000        andi            $zero, $zero, 0x0
   c48:   50000400        b               4(0x4)  # c4c <.omp_outlined.+0xb4>
   c4c:   1a000104        pcalau12i       $a0, 8(0x8)
   c50:   02c2c084        addi.d          $a0, $a0, 176(0xb0)

And here the value of codeptr_ra is `c40`,  the value of `current_address` is `c48` or `c44` caused by  previously `((char *)addr) - 4 or ((char *)addr) - 8)` wrong calculation.
But in D132925 <https://reviews.llvm.org/D132925> which follows D59880 <https://reviews.llvm.org/D59880> for RISCV64,  why doesn't the `current_address` follow ` ((char *)addr) - 8 or ((char *)addr) - 12` in RISCV64?  @prcups


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138785



More information about the Openmp-commits mailing list