summaryrefslogtreecommitdiff
path: root/src/arch/mips/remote_gdb.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2014-12-05 01:44:24 -0800
committerGabe Black <gabeblack@google.com>2014-12-05 01:44:24 -0800
commitfe48c0a32bf749358eeb95e748f9fc2247cc5480 (patch)
tree25e64817703c264bf09fa884db7eb187927870f7 /src/arch/mips/remote_gdb.hh
parent7540656fc5b8ce0cafb54f41b913a7e81cbfb4b3 (diff)
downloadgem5-fe48c0a32bf749358eeb95e748f9fc2247cc5480.tar.xz
misc: Make the GDB register cache accessible in various sized chunks.
Not all ISAs have 64 bit sized registers, so it's not always very convenient to access the GDB register cache in 64 bit sized chunks. This change makes it accessible in 8, 16, 32, or 64 bit chunks. The MIPS and ARM implementations were working around that limitation by bundling and unbundling 32 bit values into 64 bit values. That code has been removed.
Diffstat (limited to 'src/arch/mips/remote_gdb.hh')
-rw-r--r--src/arch/mips/remote_gdb.hh27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/arch/mips/remote_gdb.hh b/src/arch/mips/remote_gdb.hh
index b9a227607..157276dcf 100644
--- a/src/arch/mips/remote_gdb.hh
+++ b/src/arch/mips/remote_gdb.hh
@@ -1,4 +1,5 @@
/*
+ * Copyright 2014 Google, Inc.
* Copyright (c) 2007 The Regents of The University of Michigan
* All rights reserved.
*
@@ -42,11 +43,10 @@ namespace MipsISA
{
// The number of special regs depends on gdb.
- // Two 32-bit regs are packed into one 64-bit reg.
- const int GdbIntArchRegs = NumIntArchRegs / 2;
- const int GdbIntSpecialRegs = 6 / 2;
- const int GdbFloatArchRegs = NumFloatArchRegs / 2;
- const int GdbFloatSpecialRegs = 2 / 2;
+ const int GdbIntArchRegs = NumIntArchRegs;
+ const int GdbIntSpecialRegs = 6;
+ const int GdbFloatArchRegs = NumFloatArchRegs;
+ const int GdbFloatSpecialRegs = 2;
const int GdbIntRegs = GdbIntArchRegs + GdbIntSpecialRegs;
const int GdbFloatRegs = GdbFloatArchRegs + GdbFloatSpecialRegs;
@@ -69,23 +69,6 @@ namespace MipsISA
void clearSingleStep();
void setSingleStep();
-
- private:
- uint64_t
- pack(uint32_t lo, uint32_t hi)
- {
- return static_cast<uint64_t>(hi) << 32 | lo;
- }
- uint32_t
- unpackLo(uint64_t val)
- {
- return bits(val, 31, 0);
- }
- uint32_t
- unpackHi(uint64_t val)
- {
- return bits(val, 63, 32);
- }
};
}