1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 if (cpu_arch == "x86" || cpu_arch == "x64") {
6 import("//third_party/yasm/yasm_assemble.gni")
9 assert(cpu_arch == "x86" || cpu_arch == "x64")
11 sources = [ "SaveRegisters_x86.asm" ]
15 # Necessary to ensure symbols end up with a _ prefix; added by
16 # yasm_compile.gypi for Windows, but not Mac.
17 yasm_flags += [ "-DPREFIX" ]
19 if (cpu_arch == "x64") {
21 yasm_flags += [ "-DX64WIN=1" ]
23 yasm_flags += [ "-DX64POSIX=1" ]
25 } else { # cpu_arch == "x86"
26 yasm_flags += [ "-DIA32=1" ]
30 } else { # cpu_arch == "x86" || cpu_arch == "x64"
33 if (cpu_arch == "arm") {
34 sources = [ "SaveRegisters_arm.S" ]
35 } else if (cpu_arch == "arm64") {
36 sources = [ "SaveRegisters_arm64.S" ]
37 } else if (cpu_arch == "mipsel") {
38 sources = [ "SaveRegisters_mips.S" ]
41 if (cpu_arch == "arm") {
46 } # cpu_arch == "x86" || cpu_arch == "x64"