[PATCH] D36228: Don't pass the code model to MC

Lei Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 30 02:04:38 PDT 2018


lliu0 added a comment.
Herald added a reviewer: javed.absar.
Herald added subscribers: atanasyan, JDevlieghere, arichardson.
Herald added a reviewer: JDevlieghere.
Herald added a reviewer: espindola.

Hi Rafael,

This change caused a regression with -mcmodel=kernel.  In several places of lib/MC/MCObjectFileInfo.cpp, the logic changed from
(CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
to
(!CMModel == CodeModel::Large)
which changes the behavior of CodeModel::Kernel case.

While I do agree that we shouldn't pass CodeModel command line option to llvm-mc, but in MCObjectFileInfo::InitMCObjectFileInfo, it looks that we still need a full CodeModel parameter to generate different x86_64 exception table encodings for different code models.

I can start a review for this if you agree.

Thanks,
Lei


https://reviews.llvm.org/D36228





More information about the llvm-commits mailing list