blob: 566681016e10d1d687eb134e709b9baeb70446dc [file] [log] [blame]
John Porto2fea26c2015-07-28 16:28:07 -07001//===- subzero/src/IceAssemblerX8664.h - Assembler for x86-64 ---*- C++ -*-===//
2//
3// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4// for details. All rights reserved. Use of this source code is governed by a
5// BSD-style license that can be found in the LICENSE file.
6//
7// Modified by the Subzero authors.
8//
9//===----------------------------------------------------------------------===//
John Porto7e93c622015-06-23 10:58:57 -070010//
11// The Subzero Code Generator
12//
13// This file is distributed under the University of Illinois Open Source
14// License. See LICENSE.TXT for details.
15//
16//===----------------------------------------------------------------------===//
Andrew Scull9612d322015-07-06 14:53:25 -070017///
18/// \file
19/// This file implements the Assembler class for x86-64.
20///
John Porto7e93c622015-06-23 10:58:57 -070021//===----------------------------------------------------------------------===//
22
23#ifndef SUBZERO_SRC_ICEASSEMBLERX8664_H
24#define SUBZERO_SRC_ICEASSEMBLERX8664_H
25
26#include "IceAssembler.h"
John Porto2fea26c2015-07-28 16:28:07 -070027#include "IceAssemblerX86Base.h"
John Portod58f01c2015-06-23 15:55:17 -070028#include "IceDefs.h"
John Porto2fea26c2015-07-28 16:28:07 -070029#include "IceOperand.h"
30#include "IceTargetLoweringX8664Traits.h"
31#include "IceTypes.h"
32#include "IceUtils.h"
John Porto7e93c622015-06-23 10:58:57 -070033
34namespace Ice {
John Porto2fea26c2015-07-28 16:28:07 -070035
36class TargetX8664;
37
John Porto7e93c622015-06-23 10:58:57 -070038namespace X8664 {
39
John Porto2fea26c2015-07-28 16:28:07 -070040using Immediate = ::Ice::X86Internal::Immediate;
41using Label = ::Ice::X86Internal::Label;
42
43class AssemblerX8664 : public X86Internal::AssemblerX86Base<TargetX8664> {
John Porto7e93c622015-06-23 10:58:57 -070044 AssemblerX8664(const AssemblerX8664 &) = delete;
45 AssemblerX8664 &operator=(const AssemblerX8664 &) = delete;
46
47public:
John Porto2da710c2015-06-29 07:57:02 -070048 explicit AssemblerX8664(bool use_far_branches = false)
John Porto2fea26c2015-07-28 16:28:07 -070049 : X86Internal::AssemblerX86Base<TargetX8664>(Asm_X8664,
50 use_far_branches) {}
John Portod58f01c2015-06-23 15:55:17 -070051 ~AssemblerX8664() override = default;
John Porto7e93c622015-06-23 10:58:57 -070052
John Porto2da710c2015-06-29 07:57:02 -070053 static bool classof(const Assembler *Asm) {
54 return Asm->getKind() == Asm_X8664;
55 }
John Porto7e93c622015-06-23 10:58:57 -070056};
57
58} // end of namespace X8664
59} // end of namespace Ice
60
61#endif // SUBZERO_SRC_ICEASSEMBLERX8664_H