From 35aa48a4a4e423968c08ba98c545142c011ffa2d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 16 Nov 2018 05:16:44 +0000 Subject: Merging r344591: ------------------------------------------------------------------------ r344591 | abeserminji | 2018-10-16 01:27:28 -0700 (Tue, 16 Oct 2018) | 11 lines [mips][micromips] Fix how values in .gcc_except_table are calculated When a landing pad is calculated in a program that is compiled for micromips, it will point to an even address. Such an error will cause a segmentation fault, as the instructions in micromips are aligned on odd addresses. This patch sets the last bit of the offset where a landing pad is, to 1, which will effectively be an odd address and point to the instruction exactly. Differential Revision: https://reviews.llvm.org/D52985 ------------------------------------------------------------------------ llvm-svn: 347028 --- llvm/include/llvm/MC/MCAsmBackend.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/include/llvm') diff --git a/llvm/include/llvm/MC/MCAsmBackend.h b/llvm/include/llvm/MC/MCAsmBackend.h index 030d3c05aa5..07835c21fce 100644 --- a/llvm/include/llvm/MC/MCAsmBackend.h +++ b/llvm/include/llvm/MC/MCAsmBackend.h @@ -165,6 +165,11 @@ public: return 0; } + /// Check whether a given symbol has been flagged with MICROMIPS flag. + virtual bool isMicroMips(const MCSymbol *Sym) const { + return false; + } + /// Handles all target related code padding when starting to write a new /// basic block to an object file. /// -- cgit v1.2.1