namespace AlphaISA {
uint64_t
-getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp)
+getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
{
#if FULL_SYSTEM
const int NumArgumentRegs = 6;
namespace AlphaISA {
-uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp);
+uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp);
inline bool
inUserMode(ThreadContext *tc)
#include "arch/arm/faults.hh"
+#include "arch/arm/isa_traits.hh"
#include "arch/arm/utility.hh"
#include "cpu/thread_context.hh"
reset->invoke(tc);
}
-uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp) {
+uint64_t
+getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
+{
#if FULL_SYSTEM
+ if (size == (uint16_t)(-1))
+ size = ArmISA::MachineBytes;
if (fp)
panic("getArgument(): Floating point arguments not implemented\n");
return !cpacr.asedis && vfpEnabled(cpacr, cpsr, fpexc);
}
-uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp);
+uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp);
Fault setCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2);
Fault readCp15Register(uint32_t &Rd, int CRn, int opc1, int CRm, int opc2);
namespace MipsISA {
uint64_t
-getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp)
+getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
{
#if FULL_SYSTEM
if (number < 4) {
namespace MipsISA {
-uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp);
+uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp);
////////////////////////////////////////////////////////////////////////
//
//the sixth are passed on the stack past the 16 word window save area,
//space for the struct/union return pointer, and space reserved for the
//first 6 arguments which the caller may use but doesn't have to.
-uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp) {
+uint64_t
+getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
+{
#if FULL_SYSTEM
const int NumArgumentRegs = 6;
if (number < NumArgumentRegs) {
namespace SparcISA
{
- uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp);
+ uint64_t
+ getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp);
static inline bool
inUserMode(ThreadContext *tc)
namespace X86ISA {
-uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp) {
+uint64_t
+getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
+{
#if FULL_SYSTEM
panic("getArgument() not implemented for x86!\n");
#else
namespace X86ISA
{
- uint64_t getArgument(ThreadContext *tc, int &number, uint8_t size, bool fp);
+ uint64_t
+ getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp);
static inline bool
inUserMode(ThreadContext *tc)
}
uint64_t
-Arguments::getArg(uint8_t size, bool fp)
+Arguments::getArg(uint16_t size, bool fp)
{
return TheISA::getArgument(tc, number, size, fp);
}
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++() {
operator char *() {
char *buf = data->alloc(2048);
- CopyStringOut(tc, buf, getArg(TheISA::MachineBytes), 2048);
+ CopyStringOut(tc, buf, getArg(), 2048);
return buf;
}
};