| 1 |
/*========================== begin_copyright_notice ============================ |
| 2 |
|
| 3 |
Copyright (C) 2018-2021 Intel Corporation |
| 4 |
|
| 5 |
SPDX-License-Identifier: MIT |
| 6 |
|
| 7 |
============================= end_copyright_notice ===========================*/ |
| 8 |
|
| 9 |
#include "GEDBitProcessor.hpp" |
| 10 |
#include "ged.h" |
| 11 |
|
| 12 |
using namespace iga; |
| 13 |
|
| 14 |
GEDBitProcessor::GEDBitProcessor(const Model &model, ErrorHandler &errHandler) |
| 15 |
: BitProcessor(errHandler), m_model(model) {} |
| 16 |
|
| 17 |
bool GEDBitProcessor::isAlign16MathMacroRegisterCsrOperand( |
| 18 |
Operand::Kind opKind, RegName regName, uint16_t regNum) const { |
| 19 |
return isAlign16MathMacroRegisterCsrPlatform() && |
| 20 |
opKind == Operand::Kind::DIRECT && regName == RegName::ARF_MME && |
| 21 |
// on the above platforms mme0 is acc2 and from the spec we have |
| 22 |
// for save: |
| 23 |
// mov(8) r113:ud acc2:ud {NoMask} //acc2 <<< ALIGN1 IMPLIED! |
| 24 |
// mov(8) r114:ud acc2.yx:ud {NoMask, Align16} //acc3 |
| 25 |
// ... on up to acc9 with different ChSel |
| 26 |
// and for restore: |
| 27 |
// mov(8) acc2:ud r100:ud {NoMask} //acc2 <<< ALIGN1 IMPLIED! |
| 28 |
// mov(8) acc2.x:ud r101:ud {NoMask, Align16} //acc3 |
| 29 |
// ... on up to acc9 with different ChEn |
| 30 |
regNum > 0; |
| 31 |
} |
| 32 |
|
| 33 |
bool GEDBitProcessor::isAlign16MathMacroRegisterCsrPlatform() const { |
| 34 |
return m_model.platform >= Platform::GEN8 && |
| 35 |
m_model.platform <= Platform::GEN9; |
| 36 |
} |