dyn_inst_impl.hh (5639:67cc7f0427e7) | dyn_inst_impl.hh (5640:c811ced9efc1) |
---|---|
1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 116 unchanged lines hidden (view full) --- 125 126#if FULL_SYSTEM 127template <class Impl> 128void 129BaseO3DynInst<Impl>::trap(Fault fault) 130{ 131 this->cpu->trap(fault, this->threadNumber); 132} | 1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 116 unchanged lines hidden (view full) --- 125 126#if FULL_SYSTEM 127template <class Impl> 128void 129BaseO3DynInst<Impl>::trap(Fault fault) 130{ 131 this->cpu->trap(fault, this->threadNumber); 132} |
133 134template <class Impl> 135bool 136BaseO3DynInst<Impl>::simPalCheck(int palFunc) 137{ 138#if THE_ISA != ALPHA_ISA 139 panic("simPalCheck called, but PAL only exists in Alpha!\n"); 140#endif 141 return this->cpu->simPalCheck(palFunc, this->threadNumber); 142} | |
143#else 144template <class Impl> 145void 146BaseO3DynInst<Impl>::syscall(int64_t callnum) 147{ 148 // HACK: check CPU's nextPC before and after syscall. If it 149 // changes, update this instruction's nextPC because the syscall 150 // must have changed the nextPC. 151 Addr cpu_next_pc = this->cpu->readNextPC(this->threadNumber); 152 this->cpu->syscall(callnum, this->threadNumber); 153 Addr new_next_pc = this->cpu->readNextPC(this->threadNumber); 154 if (cpu_next_pc != new_next_pc) { 155 this->setNextPC(new_next_pc); 156 } 157} 158#endif 159 | 133#else 134template <class Impl> 135void 136BaseO3DynInst<Impl>::syscall(int64_t callnum) 137{ 138 // HACK: check CPU's nextPC before and after syscall. If it 139 // changes, update this instruction's nextPC because the syscall 140 // must have changed the nextPC. 141 Addr cpu_next_pc = this->cpu->readNextPC(this->threadNumber); 142 this->cpu->syscall(callnum, this->threadNumber); 143 Addr new_next_pc = this->cpu->readNextPC(this->threadNumber); 144 if (cpu_next_pc != new_next_pc) { 145 this->setNextPC(new_next_pc); 146 } 147} 148#endif 149 |