[PATCH] D44928: [MC] Pass MCSubtargetInfo to fixupNeedsRelaxation and applyFixup

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 09:38:41 PDT 2018


peter.smith updated this revision to Diff 142952.
peter.smith added a comment.

I've updated the diff to account for instruction bundling. When an instruction must be put in the same fragment for the purposes of bundling we now check that the MCSubtargetInfo for the fragment is consistent. I've added some tests to check that we detect an attempt to change subtarget within a bundle.

My understanding is that instruction bundling was implemented for Arm and X86 NaCl targets https://developer.chrome.com/native-client/reference/sandbox_internals/arm-32-bit-sandbox . Given that NaCl on Arm is only supported on Arm V7 ARM only I think it is very unlikely that anyone has attempted to do this in production. On X86 I think that switching between 32-bit/64-bit mode within a bundle is also highly unlikely.


https://reviews.llvm.org/D44928

Files:
  include/llvm/MC/MCAsmBackend.h
  include/llvm/MC/MCFragment.h
  include/llvm/MC/MCObjectStreamer.h
  include/llvm/MC/MCStreamer.h
  lib/MC/MCAsmStreamer.cpp
  lib/MC/MCAssembler.cpp
  lib/MC/MCELFStreamer.cpp
  lib/MC/MCMachOStreamer.cpp
  lib/MC/MCObjectStreamer.cpp
  lib/MC/MCParser/AsmParser.cpp
  lib/MC/MCWasmStreamer.cpp
  lib/MC/MCWinCOFFStreamer.cpp
  lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
  lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
  lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
  lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
  lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
  lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
  lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
  lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
  lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
  test/CodeGen/ARM/relax-per-target-feature.ll
  test/MC/ARM/AlignedBundling/illegal-subtarget-change.s
  test/MC/ARM/AlignedBundling/subtarget-change.s
  test/MC/ARM/fixup-per-fragment.s
  test/MC/X86/AlignedBundling/bundle-subtarget-change-error.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44928.142952.patch
Type: text/x-patch
Size: 44961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180418/d5dc1294/attachment.bin>


More information about the llvm-commits mailing list