X86: correct tail return address calculation
authorTim Northover <tnorthover@apple.com>
Sun, 4 Aug 2013 09:35:57 +0000 (09:35 +0000)
committerTim Northover <tnorthover@apple.com>
Sun, 4 Aug 2013 09:35:57 +0000 (09:35 +0000)
commita54b66277e5d4bdd55825eb9378f07334692020c
tree5d9f1babbb49983272cccba01697f21af0b8a281
parenta2b0c335d8218e08e5014ce59cb52011f4d3bd55
X86: correct tail return address calculation

Due to the weird and wondeful usual arithmetic conversions, some
calculations involving negative values were getting performed in
uint32_t and then promoted to int64_t, which is really not a good
idea.

Patch by Katsuhiro Ueno.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187703 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/tailcall-calleesave.ll [new file with mode: 0644]