[x86] Fix isOffsetSuitableForCodeModel kernel code model offset

Offset == 0 is a valid offset for kernel code model according to the
x86_64 System V ABI. Found by inspection, no testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes 2014-12-04 20:36:06 +00:00
parent 1b77bb5628
commit 9eb2a386c7

View File

@ -3673,7 +3673,7 @@ bool X86::isOffsetSuitableForCodeModel(int64_t Offset, CodeModel::Model M,
// For kernel code model we know that all object resist in the negative half
// of 32bits address space. We may not accept negative offsets, since they may
// be just off and we may accept pretty large positive ones.
if (M == CodeModel::Kernel && Offset > 0)
if (M == CodeModel::Kernel && Offset >= 0)
return true;
return false;