static_inst.cc revision 12326
112326Sar4jc@virginia.edu/*
212326Sar4jc@virginia.edu * Copyright (c) 2015 RISC-V Foundation
312326Sar4jc@virginia.edu * Copyright (c) 2016 The University of Virginia
412326Sar4jc@virginia.edu * All rights reserved.
512326Sar4jc@virginia.edu *
612326Sar4jc@virginia.edu * Redistribution and use in source and binary forms, with or without
712326Sar4jc@virginia.edu * modification, are permitted provided that the following conditions are
812326Sar4jc@virginia.edu * met: redistributions of source code must retain the above copyright
912326Sar4jc@virginia.edu * notice, this list of conditions and the following disclaimer;
1012326Sar4jc@virginia.edu * redistributions in binary form must reproduce the above copyright
1112326Sar4jc@virginia.edu * notice, this list of conditions and the following disclaimer in the
1212326Sar4jc@virginia.edu * documentation and/or other materials provided with the distribution;
1312326Sar4jc@virginia.edu * neither the name of the copyright holders nor the names of its
1412326Sar4jc@virginia.edu * contributors may be used to endorse or promote products derived from
1512326Sar4jc@virginia.edu * this software without specific prior written permission.
1612326Sar4jc@virginia.edu *
1712326Sar4jc@virginia.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1812326Sar4jc@virginia.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1912326Sar4jc@virginia.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2012326Sar4jc@virginia.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2112326Sar4jc@virginia.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2212326Sar4jc@virginia.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2312326Sar4jc@virginia.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2412326Sar4jc@virginia.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2512326Sar4jc@virginia.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2612326Sar4jc@virginia.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2712326Sar4jc@virginia.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2812326Sar4jc@virginia.edu *
2912326Sar4jc@virginia.edu * Authors: Maxwell Walter
3012326Sar4jc@virginia.edu *          Alec Roelke
3112326Sar4jc@virginia.edu */
3212326Sar4jc@virginia.edu
3312309Sar4jc@virginia.edu#include "arch/riscv/insts/static_inst.hh"
3412309Sar4jc@virginia.edu
3512309Sar4jc@virginia.edu#include "arch/riscv/types.hh"
3612309Sar4jc@virginia.edu#include "cpu/static_inst.hh"
3712309Sar4jc@virginia.edu
3812309Sar4jc@virginia.edunamespace RiscvISA
3912309Sar4jc@virginia.edu{
4012309Sar4jc@virginia.edu
4112309Sar4jc@virginia.eduvoid
4212309Sar4jc@virginia.eduRiscvMicroInst::advancePC(PCState &pcState) const
4312309Sar4jc@virginia.edu{
4412309Sar4jc@virginia.edu    if (flags[IsLastMicroop]) {
4512309Sar4jc@virginia.edu        pcState.uEnd();
4612309Sar4jc@virginia.edu    } else {
4712309Sar4jc@virginia.edu        pcState.uAdvance();
4812309Sar4jc@virginia.edu    }
4912309Sar4jc@virginia.edu}
5012309Sar4jc@virginia.edu
5112309Sar4jc@virginia.edu} // namespace RiscvISA