[PATCH] D77851: [X86][MC] Make -x86-pad-max-prefix-size compatible with --mc-relax-all
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 03:44:43 PDT 2020
skan updated this revision to Diff 256541.
skan added a comment.
Nothing changed, just to trigger a new remote build
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77851/new/
https://reviews.llvm.org/D77851
Files:
llvm/lib/MC/MCObjectStreamer.cpp
llvm/test/MC/X86/align-branch-64-relax-all.s
Index: llvm/test/MC/X86/align-branch-64-relax-all.s
===================================================================
--- llvm/test/MC/X86/align-branch-64-relax-all.s
+++ llvm/test/MC/X86/align-branch-64-relax-all.s
@@ -1,4 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu --x86-align-branch-boundary=32 --x86-align-branch=fused+jcc --mc-relax-all %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s
+ # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu --x86-align-branch-boundary=32 --x86-align-branch=fused+jcc --x86-pad-max-prefix-size=5 --mc-relax-all %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s
# Check instructions can be aligned correctly along with option --mc-relax-all
Index: llvm/lib/MC/MCObjectStreamer.cpp
===================================================================
--- llvm/lib/MC/MCObjectStreamer.cpp
+++ llvm/lib/MC/MCObjectStreamer.cpp
@@ -399,8 +399,7 @@
// fragment.
if (Assembler.getRelaxAll() ||
(Assembler.isBundlingEnabled() && Sec->isBundleLocked())) {
- MCInst Relaxed;
- getAssembler().getBackend().relaxInstruction(Inst, STI, Relaxed);
+ MCInst Relaxed = Inst;
while (getAssembler().getBackend().mayNeedRelaxation(Relaxed, STI))
getAssembler().getBackend().relaxInstruction(Relaxed, STI, Relaxed);
EmitInstToData(Relaxed, STI);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77851.256541.patch
Type: text/x-patch
Size: 1357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200410/d03fe639/attachment.bin>
More information about the llvm-commits
mailing list