• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package main
6
7import (
8	"strings"
9)
10
11func processX86Flags(builder *commandBuilder) {
12	arch := builder.target.arch
13	if strings.HasPrefix(arch, "x86_64") || startswithI86(arch) {
14		builder.addPostUserArgs("-mno-movbe")
15	}
16}
17
18// Returns true if s starts with i.86.
19func startswithI86(s string) bool {
20	return len(s) >= 4 && s[0] == 'i' && s[2:4] == "86"
21}
22