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>
"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" ]
}
}
}
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",
]
; This file is generated semi-automatically with this command:
; $ src/jumper/build_stages.py
+IFDEF RAX
_text SEGMENT
PUBLIC _sk_start_pipeline_hsw
DB 72,173 ; lods %ds:(%rsi),%rax
DB 65,15,40,192 ; movaps %xmm8,%xmm0
DB 255,224 ; jmpq *%rax
+ENDIF
END
; $ 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'