ruby: set: corrects csprintf() call introduced by 7d95b650c9b6
[gem5.git] / src / sim / arguments.hh
index 97b848e03046c26db82f9b1cf3f971e37dbbe9a7..fad95599968396eb7ba5a80f646a04f7f45b1849 100644 (file)
@@ -36,7 +36,7 @@
 #include "arch/vtophys.hh"
 #include "base/refcnt.hh"
 #include "base/types.hh"
-#include "mem/vport.hh"
+#include "mem/fs_translating_port_proxy.hh"
 
 class ThreadContext;
 
@@ -45,7 +45,7 @@ class Arguments
   protected:
     ThreadContext *tc;
     int number;
-    uint64_t getArg(uint8_t size, bool fp = false);
+    uint64_t getArg(uint16_t size = (uint16_t)(-1), bool fp = false);
 
   protected:
     class Data : public RefCounted
@@ -82,7 +82,7 @@ class Arguments
 
     // for checking if an argument is NULL
     bool operator!() {
-        return getArg(TheISA::MachineBytes) == 0;
+        return getArg() == 0;
     }
 
     Arguments &operator++() {
@@ -130,20 +130,20 @@ class Arguments
     template <class T>
     operator T() {
         assert(sizeof(T) <= sizeof(uint64_t));
-        T data = static_cast<T>(getArg(sizeof(T)));
-        return data;
+        T d = static_cast<T>(getArg(sizeof(T)));
+        return d;
     }
 
     template <class T>
     operator T *() {
         T *buf = (T *)data->alloc(sizeof(T));
-        CopyData(tc, buf, getArg(sizeof(T)), sizeof(T));
+        CopyOut(tc, buf, getArg(sizeof(T)), sizeof(T));
         return buf;
     }
 
     operator char *() {
         char *buf = data->alloc(2048);
-        CopyStringOut(tc, buf, getArg(TheISA::MachineBytes), 2048);
+        CopyStringOut(tc, buf, getArg(), 2048);
         return buf;
     }
 };