2018-08-25 20:16:37 -03:00
|
|
|
/* This file is part of the sirit project.
|
|
|
|
|
* Copyright (c) 2018 ReinUsesLisp
|
|
|
|
|
* This software may be used and distributed according to the terms of the GNU
|
2018-11-16 04:10:10 -03:00
|
|
|
* Lesser General Public License version 3 or any later version.
|
2018-08-25 20:16:37 -03:00
|
|
|
*/
|
|
|
|
|
|
2018-10-03 00:32:45 -03:00
|
|
|
#include <cassert>
|
2019-03-11 03:26:21 -03:00
|
|
|
#include "operand.h"
|
2018-08-25 20:16:37 -03:00
|
|
|
|
|
|
|
|
namespace Sirit {
|
|
|
|
|
|
2019-03-14 02:50:05 -04:00
|
|
|
Operand::Operand() = default;
|
2018-08-25 20:16:37 -03:00
|
|
|
|
|
|
|
|
Operand::~Operand() = default;
|
|
|
|
|
|
2019-03-14 17:34:28 -04:00
|
|
|
void Operand::Fetch([[maybe_unused]] Stream& stream) const {
|
2018-08-25 20:16:37 -03:00
|
|
|
assert(!"Fetching unimplemented operand");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u16 Operand::GetWordCount() const {
|
|
|
|
|
assert(!"Fetching unimplemented operand");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-14 17:34:28 -04:00
|
|
|
bool Operand::operator==([[maybe_unused]] const Operand& other) const {
|
2019-03-11 03:26:21 -03:00
|
|
|
return false;
|
|
|
|
|
}
|
2018-08-25 20:16:37 -03:00
|
|
|
|
|
|
|
|
bool Operand::operator!=(const Operand& other) const {
|
|
|
|
|
return !(*this == other);
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-08 05:23:15 -03:00
|
|
|
std::size_t Operand::Hash() const {
|
|
|
|
|
return static_cast<std::size_t>(operand_type) << 30;
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-11 03:26:21 -03:00
|
|
|
OperandType Operand::GetType() const {
|
|
|
|
|
return operand_type;
|
|
|
|
|
}
|
2018-08-25 20:16:37 -03:00
|
|
|
|
|
|
|
|
} // namespace Sirit
|