blob: fb9eedf9a81e0d5255d508cb5f7fead37c4dc0a6 [file] [log] [blame]
John Porto5d0acff2015-06-30 15:29:21 -07001//===- subzero/src/IceAssemblerX8632.h - Assembler for x86-32 ---*- C++ -*-===//
Jan Voungb36ad9b2015-04-21 17:01:49 -07002//
Jan Voung8acded02014-09-22 18:02:25 -07003// 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//
Jan Voungf76fd372014-10-16 15:39:22 -07009//===----------------------------------------------------------------------===//
Jan Voung8acded02014-09-22 18:02:25 -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-32.
20///
Jan Voung8acded02014-09-22 18:02:25 -070021//===----------------------------------------------------------------------===//
22
John Portoaff4ccf2015-06-10 16:35:06 -070023#ifndef SUBZERO_SRC_ICEASSEMBLERX8632_H
24#define SUBZERO_SRC_ICEASSEMBLERX8632_H
Jan Voung8acded02014-09-22 18:02:25 -070025
John Portoaff4ccf2015-06-10 16:35:06 -070026#include "IceAssembler.h"
John Porto5d0acff2015-06-30 15:29:21 -070027#include "IceAssemblerX86Base.h"
Jan Voungfe14fb82014-10-13 15:56:32 -070028#include "IceDefs.h"
29#include "IceOperand.h"
John Porto5d0acff2015-06-30 15:29:21 -070030#include "IceTargetLoweringX8632Traits.h"
Jan Voung8acded02014-09-22 18:02:25 -070031#include "IceTypes.h"
32#include "IceUtils.h"
33
Jan Voung8acded02014-09-22 18:02:25 -070034namespace Ice {
35
John Porto5d0acff2015-06-30 15:29:21 -070036class TargetX8632;
Jan Voung8acded02014-09-22 18:02:25 -070037
Jan Voung90ccc3f2015-04-30 14:15:10 -070038namespace X8632 {
Jan Voung8acded02014-09-22 18:02:25 -070039
John Porto921856d2015-07-07 11:56:26 -070040using Immediate = ::Ice::X86Internal::Immediate;
Jan Voungc2ec5812015-08-05 09:35:18 -070041using Label = ::Ice::X86Internal::Label;
John Porto921856d2015-07-07 11:56:26 -070042
John Porto5d0acff2015-06-30 15:29:21 -070043class AssemblerX8632 : public X86Internal::AssemblerX86Base<TargetX8632> {
Jan Voung90ccc3f2015-04-30 14:15:10 -070044 AssemblerX8632(const AssemblerX8632 &) = delete;
45 AssemblerX8632 &operator=(const AssemblerX8632 &) = delete;
Jan Voungf76fd372014-10-16 15:39:22 -070046
Jan Voung8acded02014-09-22 18:02:25 -070047public:
John Porto2da710c2015-06-29 07:57:02 -070048 explicit AssemblerX8632(bool use_far_branches = false)
John Porto5d0acff2015-06-30 15:29:21 -070049 : X86Internal::AssemblerX86Base<TargetX8632>(Asm_X8632,
50 use_far_branches) {}
51 ~AssemblerX8632() override = default;
Jan Voungec270732015-01-12 17:00:22 -080052
John Porto2da710c2015-06-29 07:57:02 -070053 static bool classof(const Assembler *Asm) {
54 return Asm->getKind() == Asm_X8632;
55 }
Jan Voung8acded02014-09-22 18:02:25 -070056};
57
Jan Voung90ccc3f2015-04-30 14:15:10 -070058} // end of namespace X8632
Jan Voung8acded02014-09-22 18:02:25 -070059} // end of namespace Ice
60
John Portoaff4ccf2015-06-10 16:35:06 -070061#endif // SUBZERO_SRC_ICEASSEMBLERX8632_H