decoder.isa (3467:497be1067705) decoder.isa (3468:cf23ad1ceef2)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2006 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

--- 615 unchanged lines hidden (view full) ---

624 }
625
626 format BasicOperate {
627 0xc000: rpcc({{
628#if FULL_SYSTEM
629 /* Rb is a fake dependency so here is a fun way to get
630 * the parser to understand that.
631 */
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2006 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

--- 615 unchanged lines hidden (view full) ---

624 }
625
626 format BasicOperate {
627 0xc000: rpcc({{
628#if FULL_SYSTEM
629 /* Rb is a fake dependency so here is a fun way to get
630 * the parser to understand that.
631 */
632 Ra = xc->readMiscRegWithEffect(AlphaISA::IPR_CC, fault) + (Rb & 0);
632 Ra = xc->readMiscRegWithEffect(AlphaISA::IPR_CC) + (Rb & 0);
633
634#else
635 Ra = curTick;
636#endif
637 }}, IsUnverifiable);
638
639 // All of the barrier instructions below do nothing in
640 // their execute() methods (hence the empty code blocks).

--- 35 unchanged lines hidden (view full) ---

676 }
677#endif
678 }
679
680#if FULL_SYSTEM
681 0x00: CallPal::call_pal({{
682 if (!palValid ||
683 (palPriv
633
634#else
635 Ra = curTick;
636#endif
637 }}, IsUnverifiable);
638
639 // All of the barrier instructions below do nothing in
640 // their execute() methods (hence the empty code blocks).

--- 35 unchanged lines hidden (view full) ---

676 }
677#endif
678 }
679
680#if FULL_SYSTEM
681 0x00: CallPal::call_pal({{
682 if (!palValid ||
683 (palPriv
684 && xc->readMiscRegWithEffect(AlphaISA::IPR_ICM, fault) != AlphaISA::mode_kernel)) {
684 && xc->readMiscRegWithEffect(AlphaISA::IPR_ICM) != AlphaISA::mode_kernel)) {
685 // invalid pal function code, or attempt to do privileged
686 // PAL call in non-kernel mode
687 fault = new UnimplementedOpcodeFault;
688 }
689 else {
690 // check to see if simulator wants to do something special
691 // on this PAL call (including maybe suppress it)
692 bool dopal = xc->simPalCheck(palFunc);
693
694 if (dopal) {
695 xc->setMiscRegWithEffect(AlphaISA::IPR_EXC_ADDR, NPC);
685 // invalid pal function code, or attempt to do privileged
686 // PAL call in non-kernel mode
687 fault = new UnimplementedOpcodeFault;
688 }
689 else {
690 // check to see if simulator wants to do something special
691 // on this PAL call (including maybe suppress it)
692 bool dopal = xc->simPalCheck(palFunc);
693
694 if (dopal) {
695 xc->setMiscRegWithEffect(AlphaISA::IPR_EXC_ADDR, NPC);
696 NPC = xc->readMiscRegWithEffect(AlphaISA::IPR_PAL_BASE, fault) + palOffset;
696 NPC = xc->readMiscRegWithEffect(AlphaISA::IPR_PAL_BASE) + palOffset;
697 }
698 }
699 }}, IsNonSpeculative);
700#else
701 0x00: decode PALFUNC {
702 format EmulatedCallPal {
703 0x00: halt ({{
704 exitSimLoop("halt instruction encountered");

--- 41 unchanged lines hidden (view full) ---

746 format HwMoveIPR {
747 1: hw_mfpr({{
748 int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
749 IprToMiscRegIndex[ipr_index] : -1;
750 if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
751 miscRegIndex >= NumInternalProcRegs)
752 fault = new UnimplementedOpcodeFault;
753 else
697 }
698 }
699 }}, IsNonSpeculative);
700#else
701 0x00: decode PALFUNC {
702 format EmulatedCallPal {
703 0x00: halt ({{
704 exitSimLoop("halt instruction encountered");

--- 41 unchanged lines hidden (view full) ---

746 format HwMoveIPR {
747 1: hw_mfpr({{
748 int miscRegIndex = (ipr_index < NumInternalProcRegs) ?
749 IprToMiscRegIndex[ipr_index] : -1;
750 if(miscRegIndex < 0 || !IprIsReadable(miscRegIndex) ||
751 miscRegIndex >= NumInternalProcRegs)
752 fault = new UnimplementedOpcodeFault;
753 else
754 Ra = xc->readMiscRegWithEffect(miscRegIndex, fault);
754 Ra = xc->readMiscRegWithEffect(miscRegIndex);
755 }}, IsIprAccess);
756 }
757 }
758
759 0x1d: decode PALMODE {
760 0: OpcdecFault::hw_mtpr();
761 format HwMoveIPR {
762 1: hw_mtpr({{

--- 88 unchanged lines hidden ---
755 }}, IsIprAccess);
756 }
757 }
758
759 0x1d: decode PALMODE {
760 0: OpcdecFault::hw_mtpr();
761 format HwMoveIPR {
762 1: hw_mtpr({{

--- 88 unchanged lines hidden ---