cpu: Remove alpha specialized code.

Change-Id: I770132af2f11ed232a100ab8bef942f17789ef36
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24648
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-01-22 21:36:09 -08:00
parent 67273d65ed
commit d1fd4311b4
9 changed files with 8 additions and 43 deletions

View File

@@ -62,11 +62,7 @@ from m5.objects.Platform import Platform
default_tracer = ExeTracer()
if buildEnv['TARGET_ISA'] == 'alpha':
from m5.objects.AlphaTLB import AlphaDTB as ArchDTB, AlphaITB as ArchITB
from m5.objects.AlphaInterrupts import AlphaInterrupts as ArchInterrupts
from m5.objects.AlphaISA import AlphaISA as ArchISA
elif buildEnv['TARGET_ISA'] == 'sparc':
if buildEnv['TARGET_ISA'] == 'sparc':
from m5.objects.SparcTLB import SparcTLB as ArchDTB, SparcTLB as ArchITB
from m5.objects.SparcInterrupts import SparcInterrupts as ArchInterrupts
from m5.objects.SparcISA import SparcISA as ArchISA

View File

@@ -207,9 +207,6 @@ Checker<Impl>::verify(const DynInstPtr &completed_inst)
// maintain $r0 semantics
thread->setIntReg(ZeroReg, 0);
#if THE_ISA == ALPHA_ISA
thread->setFloatReg(ZeroReg, 0);
#endif
// Check if any recent PC changes match up with anything we
// expect to happen. This is mostly to check if traps or

View File

@@ -99,9 +99,6 @@ class ExecContext : public ::ExecContext
setPredicate(inst->readPredicate());
setMemAccPredicate(inst->readMemAccPredicate());
thread.setIntReg(TheISA::ZeroReg, 0);
#if THE_ISA == ALPHA_ISA
thread.setFloatReg(TheISA::ZeroReg, 0);
#endif
}
~ExecContext()

View File

@@ -196,15 +196,7 @@ Fetch1::fetchLine(ThreadID tid)
/* Step the PC for the next line onto the line aligned next address.
* Note that as instructions can span lines, this PC is only a
* reliable 'new' PC if the next line has a new stream sequence number. */
#if THE_ISA == ALPHA_ISA
/* Restore the low bits of the PC used as address space flags */
Addr pc_low_bits = thread.pc.instAddr() &
((Addr) (1 << sizeof(TheISA::MachInst)) - 1);
thread.pc.set(aligned_pc + request_size + pc_low_bits);
#else
thread.pc.set(aligned_pc + request_size);
#endif
}
std::ostream &

View File

@@ -1053,11 +1053,8 @@ DefaultCommit<Impl>::commitInsts()
// Set the doneSeqNum to the youngest committed instruction.
toIEW->commitInfo[tid].doneSeqNum = head_inst->seqNum;
if (tid == 0) {
canHandleInterrupts = (!head_inst->isDelayedCommit()) &&
((THE_ISA != ALPHA_ISA) ||
(!(pc[0].instAddr() & 0x3)));
}
if (tid == 0)
canHandleInterrupts = !head_inst->isDelayedCommit();
// at this point store conditionals should either have
// been completed or predicated false

View File

@@ -68,12 +68,6 @@
#include "sim/stat_control.hh"
#include "sim/system.hh"
#if THE_ISA == ALPHA_ISA
#include "arch/alpha/osfpal.hh"
#include "debug/Activity.hh"
#endif
struct BaseCPUParams;
using namespace TheISA;
@@ -231,14 +225,11 @@ FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params)
// use an invalid FP register index to avoid special treatment
// of any valid FP reg.
RegIndex invalidFPReg = TheISA::NumFloatRegs + 1;
RegIndex fpZeroReg =
(THE_ISA == ALPHA_ISA) ? TheISA::ZeroReg : invalidFPReg;
commitRenameMap[tid].init(&regFile, TheISA::ZeroReg, fpZeroReg,
&freeList,
vecMode);
commitRenameMap[tid].init(&regFile, TheISA::ZeroReg, invalidFPReg,
&freeList, vecMode);
renameMap[tid].init(&regFile, TheISA::ZeroReg, fpZeroReg,
renameMap[tid].init(&regFile, TheISA::ZeroReg, invalidFPReg,
&freeList, vecMode);
}

View File

@@ -325,7 +325,7 @@ class DefaultFetch
bool
checkInterrupt(Addr pc)
{
return (interruptPending && (THE_ISA != ALPHA_ISA || !(pc & 0x3)));
return interruptPending;
}
/** Squashes a specific thread and resets the PC. */

View File

@@ -140,9 +140,7 @@ class RegId {
inline bool isZeroReg() const
{
return ((regClass == IntRegClass && regIdx == TheISA::ZeroReg) ||
(THE_ISA == ALPHA_ISA && regClass == FloatRegClass &&
regIdx == TheISA::ZeroReg));
return regClass == IntRegClass && regIdx == TheISA::ZeroReg;
}
/** @return true if it is an integer physical register. */

View File

@@ -486,9 +486,6 @@ BaseSimpleCPU::preExecute()
// maintain $r0 semantics
thread->setIntReg(ZeroReg, 0);
#if THE_ISA == ALPHA_ISA
thread->setFloatReg(ZeroReg, 0);
#endif // ALPHA_ISA
// resets predicates
t_info.setPredicate(true);