John Porto | 5d0acff | 2015-06-30 15:29:21 -0700 | [diff] [blame] | 1 | //===- subzero/src/IceAssemblerX8632.h - Assembler for x86-32 ---*- C++ -*-===// |
Jan Voung | b36ad9b | 2015-04-21 17:01:49 -0700 | [diff] [blame] | 2 | // |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 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 | // |
Jan Voung | f76fd37 | 2014-10-16 15:39:22 -0700 | [diff] [blame] | 9 | //===----------------------------------------------------------------------===// |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 10 | // |
| 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 Scull | 9612d32 | 2015-07-06 14:53:25 -0700 | [diff] [blame] | 17 | /// |
| 18 | /// \file |
| 19 | /// This file implements the Assembler class for x86-32. |
| 20 | /// |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 21 | //===----------------------------------------------------------------------===// |
| 22 | |
John Porto | aff4ccf | 2015-06-10 16:35:06 -0700 | [diff] [blame] | 23 | #ifndef SUBZERO_SRC_ICEASSEMBLERX8632_H |
| 24 | #define SUBZERO_SRC_ICEASSEMBLERX8632_H |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 25 | |
John Porto | aff4ccf | 2015-06-10 16:35:06 -0700 | [diff] [blame] | 26 | #include "IceAssembler.h" |
John Porto | 5d0acff | 2015-06-30 15:29:21 -0700 | [diff] [blame] | 27 | #include "IceAssemblerX86Base.h" |
Jan Voung | fe14fb8 | 2014-10-13 15:56:32 -0700 | [diff] [blame] | 28 | #include "IceDefs.h" |
| 29 | #include "IceOperand.h" |
John Porto | 5d0acff | 2015-06-30 15:29:21 -0700 | [diff] [blame] | 30 | #include "IceTargetLoweringX8632Traits.h" |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 31 | #include "IceTypes.h" |
| 32 | #include "IceUtils.h" |
| 33 | |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 34 | namespace Ice { |
| 35 | |
John Porto | 5d0acff | 2015-06-30 15:29:21 -0700 | [diff] [blame] | 36 | class TargetX8632; |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 37 | |
Jan Voung | 90ccc3f | 2015-04-30 14:15:10 -0700 | [diff] [blame] | 38 | namespace X8632 { |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 39 | |
John Porto | 921856d | 2015-07-07 11:56:26 -0700 | [diff] [blame] | 40 | using Immediate = ::Ice::X86Internal::Immediate; |
Jan Voung | c2ec581 | 2015-08-05 09:35:18 -0700 | [diff] [blame] | 41 | using Label = ::Ice::X86Internal::Label; |
John Porto | 921856d | 2015-07-07 11:56:26 -0700 | [diff] [blame] | 42 | |
John Porto | 5d0acff | 2015-06-30 15:29:21 -0700 | [diff] [blame] | 43 | class AssemblerX8632 : public X86Internal::AssemblerX86Base<TargetX8632> { |
Jan Voung | 90ccc3f | 2015-04-30 14:15:10 -0700 | [diff] [blame] | 44 | AssemblerX8632(const AssemblerX8632 &) = delete; |
| 45 | AssemblerX8632 &operator=(const AssemblerX8632 &) = delete; |
Jan Voung | f76fd37 | 2014-10-16 15:39:22 -0700 | [diff] [blame] | 46 | |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 47 | public: |
John Porto | 2da710c | 2015-06-29 07:57:02 -0700 | [diff] [blame] | 48 | explicit AssemblerX8632(bool use_far_branches = false) |
John Porto | 5d0acff | 2015-06-30 15:29:21 -0700 | [diff] [blame] | 49 | : X86Internal::AssemblerX86Base<TargetX8632>(Asm_X8632, |
| 50 | use_far_branches) {} |
| 51 | ~AssemblerX8632() override = default; |
Jan Voung | ec27073 | 2015-01-12 17:00:22 -0800 | [diff] [blame] | 52 | |
John Porto | 2da710c | 2015-06-29 07:57:02 -0700 | [diff] [blame] | 53 | static bool classof(const Assembler *Asm) { |
| 54 | return Asm->getKind() == Asm_X8632; |
| 55 | } |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 56 | }; |
| 57 | |
Jan Voung | 90ccc3f | 2015-04-30 14:15:10 -0700 | [diff] [blame] | 58 | } // end of namespace X8632 |
Jan Voung | 8acded0 | 2014-09-22 18:02:25 -0700 | [diff] [blame] | 59 | } // end of namespace Ice |
| 60 | |
John Porto | aff4ccf | 2015-06-10 16:35:06 -0700 | [diff] [blame] | 61 | #endif // SUBZERO_SRC_ICEASSEMBLERX8632_H |