[PATCH] D20830: Fix branch relaxation in 16-bit mode.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 18:20:17 PDT 2016

craig.topper added a comment.

Are there cases where 16-bit mode may need a full 32-bit offset that we need to support here? Or would that wrap the segment boundary for 16-bit mode and be illegal?

Comment at: lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:138
@@ -137,2 +137,3 @@
-static unsigned getRelaxedOpcodeBranch(unsigned Op) {
+static unsigned getRelaxedOpcodeBranch(const MCInst &Inst, bool is16BitMode) {
+  unsigned Op = Inst.getOpcode();
Why are we no longer passing just the Opcode to this function?


More information about the llvm-commits mailing list