[all-commits] [llvm/llvm-project] 1d3baf: [LoongArch] Allow writing unaligned nop sequences

wanglei via All-commits all-commits at lists.llvm.org
Thu Dec 8 02:44:54 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d3baf21b673db0c99a3560ec0653e63e0e4b01a
      https://github.com/llvm/llvm-project/commit/1d3baf21b673db0c99a3560ec0653e63e0e4b01a
  Author: wanglei <wanglei at loongson.cn>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
    M llvm/test/MC/LoongArch/Misc/unaligned-nops.s

  Log Message:
  -----------
  [LoongArch] Allow writing unaligned nop sequences

In case of unaligned nop sequences, pad to the nearest 4-byte boundary
with zeros before filling with `nop` instructions. This is consistent
with gas behavior, and is necessary to compile the Linux kernel with
LLVM IAS.

Replace `support::endian::write` with `OS.write` while at it. This is
simpler and correct because we only have little endian.

Reviewed By: SixWeining, xen0n

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




More information about the All-commits mailing list