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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/MC/MCExpr.cpp | ||
---|---|---|
10 ↗ | (On Diff #168649) | Is it really necessary to include MCAsmBackend.h and at the same time add forward declaration of class MCAsmBackend below? |
532 ↗ | (On Diff #168649) | Let's add a comment for these lines (like for lines above). |
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h | ||
21 ↗ | (On Diff #168649) | Is it really necessary to include MCSymbolELF.h and at the same time add forward declaration of class MCSymbolELF below? |
Comment Actions
And the test case failed:
test/CodeGen/Mips/micromips-gcc-except-table.ll:4:15: error: CHECK-NEXT: expected string not foundin input ; CHECK-NEXT: 0000 ff9b1501 0c010f00 000f1025 011f1e00 ^ <stdin>:5:2: note: scanning from here 0000 ff9b1501 0c011100 00110e1f 011f1800 ................ ^
Comment Actions
Comments addressed.
Test fixed. I have one other patch in progress which affects this test, and forgot to remove it before the submission.
Comment Actions
The patch special cased .uleb128 A-B for both direct object file emission and assembling, but changing assembling is not correct.
GNU assembler does not special case .uleb128 A-B to set the least significant bit.