make _win.S know if it's 64-bit

I think this is the root of my Windows / Chrome problems.
Even on 32-bit builds, Chrome compiles nacl64.exe in 64-bit mode.

So to make things simple, always put _win.S in the sources,
and no-op it away when assembling for 32-bit.

Change-Id: I19f163491739a6c0cbdedd0ce353f1d2289907ae
Reviewed-on: https://skia-review.googlesource.com/10637
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Mike Klein 2017-03-29 19:29:13 -04:00 committed by Skia Commit-Bot
parent bcf35f86d5
commit 5f80485a53
4 changed files with 11 additions and 3 deletions

View File

@ -520,9 +520,9 @@ optional("jumper") {
"src/jumper/SkJumper.cpp",
"src/jumper/SkJumper_stages.cpp",
]
if (is_win && target_cpu == "x64") {
if (is_win) {
sources += [ "src/jumper/SkJumper_generated_win.S" ]
} else if (!is_win) {
} else {
sources += [ "src/jumper/SkJumper_generated.S" ]
}
}

View File

@ -502,7 +502,11 @@ toolchain("msvc") {
}
tool("asm") {
command = "$env_setup$bin/ml64.exe /nologo /c /Fo {{output}} {{source}}"
_ml = "ml"
if (target_cpu == "x64") {
_ml += "64"
}
command = "$env_setup$bin/$_ml.exe /nologo /c /Fo {{output}} {{source}}"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
]

View File

@ -6,6 +6,7 @@
; This file is generated semi-automatically with this command:
; $ src/jumper/build_stages.py
IFDEF RAX
_text SEGMENT
PUBLIC _sk_start_pipeline_hsw
@ -5550,4 +5551,5 @@ _sk_linear_gradient_2stops_sse2 LABEL PROC
DB 72,173 ; lods %ds:(%rsi),%rax
DB 65,15,40,192 ; movaps %xmm8,%xmm0
DB 255,224 ; jmpq *%rax
ENDIF
END

View File

@ -167,9 +167,11 @@ print '''; Copyright 2017 Google Inc.
; $ src/jumper/build_stages.py
'''
print 'IFDEF RAX'
print '_text SEGMENT'
parse_object_file('win_hsw.o', 'DB')
parse_object_file('win_avx.o', 'DB')
parse_object_file('win_sse41.o', 'DB')
parse_object_file('win_sse2.o', 'DB')
print 'ENDIF'
print 'END'