#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;
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
// for checking if an argument is NULL
bool operator!() {
- return getArg(TheISA::MachineBytes) == 0;
+ return getArg() == 0;
}
Arguments &operator++() {
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;
}
};