[all-commits] [llvm/llvm-project] 94fac0: [DebugInfo][ARM] Not readonly check for RWPI globals

walkerkd via All-commits all-commits at lists.llvm.org
Wed Jun 15 03:52:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94fac097ad409a5c48f9987f925794bf1d4eac21
      https://github.com/llvm/llvm-project/commit/94fac097ad409a5c48f9987f925794bf1d4eac21
  Author: Keith Walker <keith.walker at arm.com>
  Date:   2022-06-15 (Wed, 15 Jun 2022)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    A llvm/test/DebugInfo/ARM/ropi.ll

  Log Message:
  -----------
  [DebugInfo][ARM] Not readonly check for RWPI globals

When compiling for the RWPI relocation model [1], the debug information
is wrong for readonly global variables.

Writable global variables are accessed by the static base register (R9
on ARM) in the RWPI relocation model.  This is being correctly generated

Readonly global variables are not accessed by the static base register
in the RWPI relocation model. This case is incorrectly generating the
same debugging information as for writable global variables.

References:
[1] ARM Read-Write Position Independence: https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#read-write-position-independence-rwpi

Differential Revision: https://reviews.llvm.org/D126361




More information about the All-commits mailing list