Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sts=4 et sw=4 tw=99:
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "jit/Disassembler.h"
8 :
9 : using namespace js;
10 : using namespace js::jit;
11 : using namespace js::jit::Disassembler;
12 :
13 : #ifdef DEBUG
14 : bool
15 0 : Disassembler::ComplexAddress::operator==(const ComplexAddress& other) const
16 : {
17 0 : return base_ == other.base_ &&
18 0 : index_ == other.index_ &&
19 0 : scale_ == other.scale_ &&
20 0 : disp_ == other.disp_ &&
21 0 : isPCRelative_ == other.isPCRelative_;
22 : }
23 :
24 : bool
25 0 : Disassembler::ComplexAddress::operator!=(const ComplexAddress& other) const
26 : {
27 0 : return !operator==(other);
28 : }
29 :
30 : bool
31 0 : Disassembler::OtherOperand::operator==(const OtherOperand& other) const
32 : {
33 0 : if (kind_ != other.kind_)
34 0 : return false;
35 0 : switch (kind_) {
36 0 : case Imm: return u_.imm == other.u_.imm;
37 0 : case GPR: return u_.gpr == other.u_.gpr;
38 0 : case FPR: return u_.fpr == other.u_.fpr;
39 : }
40 0 : MOZ_CRASH("Unexpected OtherOperand kind");
41 : }
42 :
43 : bool
44 0 : Disassembler::OtherOperand::operator!=(const OtherOperand& other) const
45 : {
46 0 : return !operator==(other);
47 : }
48 :
49 : bool
50 0 : Disassembler::HeapAccess::operator==(const HeapAccess& other) const
51 : {
52 0 : return kind_ == other.kind_ &&
53 0 : size_ == other.size_ &&
54 0 : address_ == other.address_ &&
55 0 : otherOperand_ == other.otherOperand_;
56 : }
57 :
58 : bool
59 0 : Disassembler::HeapAccess::operator!=(const HeapAccess& other) const
60 : {
61 0 : return !operator==(other);
62 : }
63 :
64 : #endif
|