Commit f53580b0 by Nicolas Capens Committed by Nicolas Capens

Don't emit address size prefixes for native x86-64 ABI.

Address size prefixes are used in 64-bit x86 for PNaCl's use of the x32 ABI with ILP32 data model. Don't emit them for any other ABI. BUG=swiftshader:9 Change-Id: I1351db086d44ce4b144b3428866a54e84637b9a4 Reviewed-on: https://chromium-review.googlesource.com/390409Reviewed-by: 's avatarJim Stichnoth <stichnot@chromium.org> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent fe93fdd5
...@@ -42,7 +42,9 @@ public: ...@@ -42,7 +42,9 @@ public:
} }
std::unique_ptr<::Ice::Assembler> createAssembler() const override { std::unique_ptr<::Ice::Assembler> createAssembler() const override {
const bool EmitAddrSizeOverridePrefix = !NeedSandboxing; const bool EmitAddrSizeOverridePrefix =
!NeedSandboxing &&
getFlags().getApplicationBinaryInterface() == ABI_PNaCl;
return makeUnique<X8664::AssemblerX8664>(EmitAddrSizeOverridePrefix); return makeUnique<X8664::AssemblerX8664>(EmitAddrSizeOverridePrefix);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment