ISA: Simplify various implementations of completeAcc.
This commit is contained in:
parent
bc49381287
commit
29676286c8
6 changed files with 11 additions and 106 deletions
|
@ -354,20 +354,7 @@ def template StoreCompleteAcc {{
|
|||
%(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(fp_enable_check)s;
|
||||
%(op_dest_decl)s;
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(postacc_code)s;
|
||||
}
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(op_wb)s;
|
||||
}
|
||||
|
||||
return fault;
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
|
@ -595,23 +595,11 @@ def template StoreCompleteAcc {{
|
|||
%(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(op_decl)s;
|
||||
%(op_rd)s;
|
||||
|
||||
if (%(predicate_test)s)
|
||||
{
|
||||
if (fault == NoFault) {
|
||||
%(op_wb)s;
|
||||
}
|
||||
}
|
||||
|
||||
if (fault == NoFault && machInst.itstateMask != 0) {
|
||||
if (machInst.itstateMask != 0) {
|
||||
warn_once("Complete acc isn't called on normal stores in O3.");
|
||||
xc->setMiscReg(MISCREG_ITSTATE, machInst.newItstate);
|
||||
}
|
||||
|
||||
return fault;
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
@ -621,23 +609,11 @@ def template NeonStoreCompleteAcc {{
|
|||
PacketPtr pkt, %(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(op_decl)s;
|
||||
%(op_rd)s;
|
||||
|
||||
if (%(predicate_test)s)
|
||||
{
|
||||
if (fault == NoFault) {
|
||||
%(op_wb)s;
|
||||
}
|
||||
}
|
||||
|
||||
if (fault == NoFault && machInst.itstateMask != 0) {
|
||||
if (machInst.itstateMask != 0) {
|
||||
warn_once("Complete acc isn't called on normal stores in O3.");
|
||||
xc->setMiscReg(MISCREG_ITSTATE, machInst.newItstate);
|
||||
}
|
||||
|
||||
return fault;
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
|
@ -387,17 +387,11 @@ def template ClrexCompleteAcc {{
|
|||
%(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(op_decl)s;
|
||||
%(op_rd)s;
|
||||
|
||||
|
||||
if (fault == NoFault && machInst.itstateMask != 0) {
|
||||
if (machInst.itstateMask != 0) {
|
||||
xc->setMiscReg(MISCREG_ITSTATE, machInst.newItstate);
|
||||
}
|
||||
|
||||
return fault;
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
|
@ -420,42 +420,7 @@ def template StoreCompleteAcc {{
|
|||
%(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(fp_enable_check)s;
|
||||
%(op_dest_decl)s;
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(postacc_code)s;
|
||||
}
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(op_wb)s;
|
||||
}
|
||||
|
||||
return fault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
def template StoreCompleteAcc {{
|
||||
Fault %(class_name)s::completeAcc(Packet *pkt,
|
||||
%(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(op_dest_decl)s;
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(postacc_code)s;
|
||||
}
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(op_wb)s;
|
||||
}
|
||||
|
||||
return fault;
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
|
@ -212,15 +212,7 @@ def template StoreCompleteAcc {{
|
|||
%(CPU_exec_context)s *xc,
|
||||
Trace::InstRecord *traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
|
||||
%(op_dest_decl)s;
|
||||
|
||||
if (fault == NoFault) {
|
||||
%(op_wb)s;
|
||||
}
|
||||
|
||||
return fault;
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
||||
|
|
|
@ -272,15 +272,6 @@ def template StoreCompleteAcc {{
|
|||
Fault %(class_name)s::completeAcc(PacketPtr, %(CPU_exec_context)s * xc,
|
||||
Trace::InstRecord * traceData) const
|
||||
{
|
||||
Fault fault = NoFault;
|
||||
%(op_decl)s;
|
||||
|
||||
%(op_rd)s;
|
||||
%(postacc_code)s;
|
||||
if (fault == NoFault)
|
||||
{
|
||||
%(op_wb)s;
|
||||
}
|
||||
return NoFault;
|
||||
}
|
||||
}};
|
||||
|
|
Loading…
Reference in a new issue