[all-commits] [llvm/llvm-project] 8f45b5: RISCV: permit unaligned nop-slide padding emission

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Wed Aug 24 13:27:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f45b5a7a90f24ae1dabeff161e22594039a8b0a
      https://github.com/llvm/llvm-project/commit/8f45b5a7a90f24ae1dabeff161e22594039a8b0a
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2022-08-24 (Wed, 24 Aug 2022)

  Changed paths:
    M lld/test/ELF/riscv-relax-align-rvc.s
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
    M llvm/test/MC/RISCV/align.s
    A llvm/test/MC/RISCV/nop-slide.s

  Log Message:
  -----------
  RISCV: permit unaligned nop-slide padding emission

We may be requested to emit an unaligned nop sequence (e.g. 7-bytes or
3-bytes).  These should be 0-filled even though that is not a valid
instruction.  This matches the behaviour on other architectures like
ARM, X86, and MIPS.  When a custom section is emitted, it may be
classified as text even though it may be a data section or we may be
emitting data into a text segment (e.g. a literal pool).  In such cases,
we should be resilient to the emission request.

This was originally identified by the Linux kernel build and reported on
D131270 by Nathan Chancellor.

Differential Revision: https://reviews.llvm.org/D132482
Reviewed By: luismarques
Tested By: Nathan Chancellor




More information about the All-commits mailing list