OSDN Git Service

Support 16-byte aligned stack on 32-bit Windows.
authorNicolas Capens <capn@google.com>
Thu, 12 Jan 2017 22:01:06 +0000 (17:01 -0500)
committerNicolas Capens <nicolascapens@google.com>
Tue, 17 Jan 2017 18:40:29 +0000 (18:40 +0000)
commit4e679e51f645b99940f43c80fec7f146d59eb00f
tree2811ec154a3e4a11093b51639aac2ee13b617579
parenta551dfce9bd44034b4fd588cd4b06b3b0435df8d
Support 16-byte aligned stack on 32-bit Windows.

On Windows x86-32, the ABI only guarantees the stack to be 4-byte
aligned. We therefore need the stack pointer to be explicitly
aligned when using vectors. This demands using a frame pointer (to
access function arguments). Also, we had to change accessing spilled
variables from the stack pointer instead of the frame pointer so they
are also aligned. This change does not affect PNaCl. Projects using
the Microsoft ABI should define SUBZERO_USE_MICROSOFT_ABI.

BUG=swiftshader:29

Change-Id: I186ce9435244d6fa9494ec514a91122b6be130b3
Reviewed-on: https://chromium-review.googlesource.com/427348
Reviewed-by: Jim Stichnoth <stichnot@chromium.org>
src/IceCfg.cpp
src/IceInstX8664.def
src/IceTargetLowering.h
src/IceTargetLoweringMIPS32.cpp
src/IceTargetLoweringX8632.cpp
src/IceTargetLoweringX8664Traits.h
src/IceTargetLoweringX86Base.h
src/IceTargetLoweringX86BaseImpl.h