diff options
author | Nirav Dave <niravd@google.com> | 2016-07-11 14:23:53 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2016-07-11 14:23:53 +0000 |
commit | 8603062ee4904af2a7258c2e551096d84c243e0e (patch) | |
tree | 3ae88b821eecac8c0bf2dfcf95854b3573b56e91 /llvm/lib/MC/MCAssembler.cpp | |
parent | b42895199065078ce424bc4f328bae533de50576 (diff) | |
download | llvm-8603062ee4904af2a7258c2e551096d84c243e0e.zip llvm-8603062ee4904af2a7258c2e551096d84c243e0e.tar.gz llvm-8603062ee4904af2a7258c2e551096d84c243e0e.tar.bz2 |
Fix branch relaxation in 16-bit mode.
Thread through MCSubtargetInfo to relaxInstruction function allowing relaxation
to generate jumps with 16-bit sized immediates in 16-bit mode.
This fixes PR22097.
Reviewers: dwmw2, tstellarAMD, craig.topper, jyknight
Subscribers: jfb, arsenm, jyknight, llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D20830
llvm-svn: 275068
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index fdcd8c7..7a42108 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -765,7 +765,7 @@ bool MCAssembler::relaxInstruction(MCAsmLayout &Layout, // Relax the fragment. MCInst Relaxed; - getBackend().relaxInstruction(F.getInst(), Relaxed); + getBackend().relaxInstruction(F.getInst(), F.getSubtargetInfo(), Relaxed); // Encode the new instruction. // |