[PATCH] D52985: [mips][micromips] Fix how values in .gcc_except_table are calculated

Aleksandar Beserminji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 8 07:57:29 PDT 2018


abeserminji created this revision.
abeserminji added reviewers: petarj, atanasyan, resistor, ddunbar.
Herald added subscribers: jrtc27, arichardson, sdardis.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D52985

Files:
  include/llvm/MC/MCAsmBackend.h
  lib/MC/MCExpr.cpp
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
  test/CodeGen/Mips/micromips-gcc-except-table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52985.168649.patch
Type: text/x-patch
Size: 4373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181008/0395ab33/attachment.bin>


More information about the llvm-commits mailing list