2c2
< * Copyright (c) 2011 ARM Limited
---
> * Copyright (c) 2011, 2016 ARM Limited
484,485c484,485
< uint64_t checker_val;
< uint64_t inst_val;
---
> InstResult checker_val;
> InstResult inst_val;
487a488
> bool scalar_mismatch = false;
493c494
< copyResult(inst, 0, idx);
---
> copyResult(inst, InstResult(0ul, InstResult::ResultType::Scalar), idx);
498c499
< result.front().get(checker_val);
---
> checker_val = result.front();
500,501c501,502
< inst_val = 0;
< inst->template popResult<uint64_t>(inst_val);
---
> inst_val = inst->popResult(
> InstResult(0ul, InstResult::ResultType::Scalar));
504a506
> scalar_mismatch = true;
515,517c517,522
< warn("%lli: Instruction results do not match! (Values may not "
< "actually be integers) Inst: %#x, checker: %#x",
< curTick(), inst_val, checker_val);
---
> if (scalar_mismatch) {
> warn("%lli: Instruction results (%i) do not match! (Values may"
> " not actually be integers) Inst: %#x, checker: %#x",
> curTick(), idx, inst_val.asIntegerNoAssert(),
> checker_val.asInteger());
> }
592c597
< Checker<Impl>::copyResult(DynInstPtr &inst, uint64_t mismatch_val,
---
> Checker<Impl>::copyResult(DynInstPtr &inst, const InstResult& mismatch_val,
601c606,607
< thread->setIntReg(idx.index(), mismatch_val);
---
> panic_if(!mismatch_val.isScalar(), "Unexpected type of result");
> thread->setIntReg(idx.index(), mismatch_val.asInteger());
604c610,611
< thread->setFloatRegBits(idx.index(), mismatch_val);
---
> panic_if(!mismatch_val.isScalar(), "Unexpected type of result");
> thread->setFloatRegBits(idx.index(), mismatch_val.asInteger());
607c614,615
< thread->setCCReg(idx.index(), mismatch_val);
---
> panic_if(!mismatch_val.isScalar(), "Unexpected type of result");
> thread->setCCReg(idx.index(), mismatch_val.asInteger());
610c618,619
< thread->setMiscReg(idx.index(), mismatch_val);
---
> panic_if(!mismatch_val.isScalar(), "Unexpected type of result");
> thread->setMiscReg(idx.index(), mismatch_val.asInteger());
615c624
< uint64_t res = 0;
---
> InstResult res;
618c627
< inst->template popResult<uint64_t>(res);
---
> res = inst->popResult();
621c630,631
< thread->setIntReg(idx.index(), res);
---
> panic_if(!res.isScalar(), "Unexpected type of result");
> thread->setIntReg(idx.index(), res.asInteger());
624c634,635
< thread->setFloatRegBits(idx.index(), res);
---
> panic_if(!res.isScalar(), "Unexpected type of result");
> thread->setFloatRegBits(idx.index(), res.asInteger());
627c638,639
< thread->setCCReg(idx.index(), res);
---
> panic_if(!res.isScalar(), "Unexpected type of result");
> thread->setCCReg(idx.index(), res.asInteger());
629a642
> panic_if(res.isValid(), "MiscReg expecting invalid result");
631c644
< thread->setMiscReg(idx.index(), res);
---
> thread->setMiscReg(idx.index(), 0);