X86: Use a smaller 'mov' instruction for stack probe calls
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 23 Feb 2015 21:50:30 +0000 (21:50 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 23 Feb 2015 21:50:30 +0000 (21:50 +0000)
commitad6622575cea014762be787c4b1d34bc40254415
tree8a21b3d145421cb94e00885494fbcb125e5d2d8a
parentd71e4c6218bf658e247b20ad16bf3201f99dcc2f
X86: Use a smaller 'mov' instruction for stack probe calls

Prologue emission, in some cases, requires calls to a stack probe helper
function.  The amount of stack to probe is passed as a register
argument in the Win64 ABI but the instruction sequence used is
pessimistic: it assumes that the number of bytes to probe is greater
than 4 GB.

Instead, select a more appropriate opcode depending on the number of
bytes we are going to probe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230270 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FrameLowering.cpp
test/CodeGen/X86/win64_alloca_dynalloca.ll
test/CodeGen/X86/win64_eh.ll