[llvm-commits] [llvm] r78255 - in /llvm/trunk/lib/Target/X86: X86ISelDAGToDAG.cpp X86ISelLowering.cpp X86ISelLowering.h
Anton Korobeynikov
asl at math.spbu.ru
Thu Aug 6 05:35:42 PDT 2009
Hello, Evan
> What exactly is the subtle bug?
It should be clear from the testcase & comments in that function. But
in short: in small code model the globals are placed in low (positive)
32 bit space AND 16 megabytes (2^24) below the top of this space.
That's why when we have global + offset we can allow fold negative
offsets and small (<2^24) positive offsets into imm field. Otherwise
stuff might wrap and thus we shouldn't fold such offsets.
Similar applies for the kernel code model - we can allow arbitrary
positive offsets, but not negative, because globals are in high
(negative) 32 bit space.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list