Skip to content
Snippets Groups Projects
Commit e77e1c06 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot
Browse files

Revert "Remove use of inline ASM in insert_string_sse"

This reverts commit ea6b9281bbf3ca08ccef8f5266f88de6f56c5ff6.

Reason for revert: It turns out the V8 team needs the MSVC build. :)

I tried installing the Clang compiler as part of Visual Studio 2017 and 2019 but neither of them became options in the toolchain. I'll need to spend more time figuring out how to get Clang on Windows.

Original change's description:
> Remove use of inline ASM in insert_string_sse
> 
> It seems that some years ago clang@Windows didn't have the
> proper intrinsic required, which prompted the use of inline
> ASM.
> 
> It has a side effect in that it will allow compilation of the
> optimized function within the same compilation unit while using regular
> compiler flags (i.e. 'crc32' instruction on x86 requires some special
> compiler flags).
> 
> Main issue is that inline ASM is blocked on dependencies (e.g. 'base')
> that will be linked to NaCl.
> 
> The main idea here is to allow the whole Chromium code base to use the
> highly optimized checksums in zlib (e.g. crc32 and Adler-32), exported
> through an interface (i.e. base::Crc32()).
> 
> This patch fixes this issue by removing the use of inline ASM.
> 
> The workaround is to use clang/gcc 'target attributes' to instruct the
> backend to use different code generation options for the optimized
> function, see:
> https://clang.llvm.org/docs/AttributeReference.html#target
> 
> Bug: 902789
> Change-Id: I0d139268aefb8335310c0e3f6533006be9af6470
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1931272


> Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#718788}

TBR=cavalcantii@chromium.org,cblume@chromium.org,mtklein@chromium.org,adenilson.cavalcanti@arm.com

Change-Id: I6b3fcce10197121b548300855710e99f7048f1ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 902789
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936189


Reviewed-by: default avatarChris Blume <cblume@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#719105}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 80c2a793b4ba20d9638fbdd030a1687dc26242a3
parent ae16db55
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment