summaryrefslogtreecommitdiff
path: root/src/mem/ruby/storebuffer
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-07-06 15:49:47 -0700
committerNathan Binkert <nate@binkert.org>2009-07-06 15:49:47 -0700
commitda704f52e55dd2649e53bf233f948c897727f13d (patch)
tree150514b6e67a108c56ad771adeb908713b06df65 /src/mem/ruby/storebuffer
parenta7904e2cf341d5452c5622adfcbdcd268d4ab7d1 (diff)
downloadgem5-da704f52e55dd2649e53bf233f948c897727f13d.tar.xz
ruby: Fix RubyMemory to work with the newer ruby.
Diffstat (limited to 'src/mem/ruby/storebuffer')
-rw-r--r--src/mem/ruby/storebuffer/storebuffer.cc20
-rw-r--r--src/mem/ruby/storebuffer/storebuffer.hh8
2 files changed, 14 insertions, 14 deletions
diff --git a/src/mem/ruby/storebuffer/storebuffer.cc b/src/mem/ruby/storebuffer/storebuffer.cc
index 865a31820..ed97b216c 100644
--- a/src/mem/ruby/storebuffer/storebuffer.cc
+++ b/src/mem/ruby/storebuffer/storebuffer.cc
@@ -36,7 +36,7 @@
#include "mem/ruby/storebuffer/storebuffer.hh"
#include "mem/ruby/common/Global.hh"
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
#include "TsoChecker.hh"
#endif
@@ -46,7 +46,7 @@
// global map of request id_s to map them back to storebuffer pointers
map <uint64_t, StoreBuffer *> request_map;
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
Tso::TsoChecker * g_tsoChecker;
#endif
@@ -65,7 +65,7 @@ void hit(int64_t id) {
//*****************************************************************************************
StoreBuffer::StoreBuffer(uint32 id, uint32 block_bits, int storebuffer_size) {
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
if (id == 0) {
g_tsoChecker = new Tso::TsoChecker();
g_tsoChecker->init(64);
@@ -99,7 +99,7 @@ StoreBuffer::StoreBuffer(uint32 id, uint32 block_bits, int storebuffer_size) {
//******************************************************************************************
StoreBuffer::~StoreBuffer(){
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
if (m_id == 0) {
delete g_tsoChecker;
}
@@ -272,7 +272,7 @@ void StoreBuffer::returnMatchedData(struct RubyRequest request) {
ASSERT(checkForLoadHit(request) != NO_MATCH);
physical_address_t lineaddr = physical_address & m_block_mask;
bool found = false;
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
Tso::TsoCheckerCmd * cmd;
#endif
deque<struct SBEntry>::iterator satisfying_store;
@@ -280,7 +280,7 @@ void StoreBuffer::returnMatchedData(struct RubyRequest request) {
if ((it->m_request.paddr & m_block_mask) == lineaddr) {
if (!found) {
found = true;
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
satisfying_store = it;
cmd = new Tso::TsoCheckerCmd(m_id, // this thread id
iseq, // instruction sequence
@@ -313,7 +313,7 @@ void StoreBuffer::returnMatchedData(struct RubyRequest request) {
}
}
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
uint64_t tso_data = 0;
memcpy(&tso_data, request.data, request.len);
cmd->setData(tso_data);
@@ -400,7 +400,7 @@ void StoreBuffer::complete(uint64_t id) {
m_buffer_size--;
ASSERT(m_buffer_size >= 0);
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
int len = outstanding_requests.find(id)->second.len;
uint64_t data = 0;
memcpy(&data, from_buffer.m_request.data, 4);
@@ -462,7 +462,7 @@ void StoreBuffer::complete(uint64_t id) {
#endif
} // end if (type == ST)
else if (type == RubyRequestType_LD) {
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
RubyRequest request = outstanding_requests.find(id)->second;
uint64_t data = 0;
memcpy(&data, request.data, request.len);
@@ -511,7 +511,7 @@ void StoreBuffer::complete(uint64_t id) {
}
}
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
void StoreBuffer::insertTsoLL(Tso::TsoCheckerCmd * cmd) {
uint64_t count = cmd->getIseq();
Tso::TsoCheckerCmd * current = NULL;
diff --git a/src/mem/ruby/storebuffer/storebuffer.hh b/src/mem/ruby/storebuffer/storebuffer.hh
index 4117a8f38..67555f48f 100644
--- a/src/mem/ruby/storebuffer/storebuffer.hh
+++ b/src/mem/ruby/storebuffer/storebuffer.hh
@@ -36,7 +36,7 @@
#include "mem/ruby/storebuffer/hfa.hh"
#include "mem/ruby/libruby.hh"
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
#include "TsoCheckerCmd.hh"
#endif
@@ -53,13 +53,13 @@ enum load_match { NO_MATCH, PARTIAL_MATCH, FULL_MATCH };
struct SBEntry {
struct RubyRequest m_request;
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
Tso::TsoCheckerCmd * m_next_ptr;
#endif
SBEntry(struct RubyRequest request, void * ptr)
: m_request(request)
{
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
m_next_ptr = (Tso::TsoCheckerCmd*) ptr;
#endif
}
@@ -101,7 +101,7 @@ class StoreBuffer {
/// prints out the contents of the Write Buffer
void print();
-#ifdef RUBY_TSO_CHECKER
+#if RUBY_TSO_CHECKER
/// if load completes before store, insert correctly to be issued to TSOChecker
void insertTsoLL(Tso::TsoCheckerCmd * cmd);
#endif