The 32-bit displacement field in an x86 address is signed. Arrange for it
authorDan Gohman <gohman@apple.com>
Tue, 11 Nov 2008 15:52:29 +0000 (15:52 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 11 Nov 2008 15:52:29 +0000 (15:52 +0000)
commit27cae7b01b2102ce06c355701987eafb5047a2c0
treea6d045ed019eb30f916d34dea42785acfaadd5a8
parentcfd15cf7bfd17f9d9e1502761b5869dba2736005
The 32-bit displacement field in an x86 address is signed. Arrange for it
to be sign-extended when it is promoted to 64 bits for intermediate
offset calculations. The offset calculations are done as uint64_t so that
overflow conditions are well defined.

This fixes a problem which is currently hidden by the x86 AsmPrinter but
which was exposed by r58917 (which is temporarily reverted).  See PR3027
for details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59044 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp