utility.cc (8706:b1838faf3bcc) utility.cc (8775:1e3ca5d77b53)
1/*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 25 unchanged lines hidden (view full) ---

34#include "arch/mips/utility.hh"
35#include "base/bitfield.hh"
36#include "base/misc.hh"
37#include "config/full_system.hh"
38#include "cpu/static_inst.hh"
39#include "cpu/thread_context.hh"
40#include "sim/serialize.hh"
41
1/*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 25 unchanged lines hidden (view full) ---

34#include "arch/mips/utility.hh"
35#include "base/bitfield.hh"
36#include "base/misc.hh"
37#include "config/full_system.hh"
38#include "cpu/static_inst.hh"
39#include "cpu/thread_context.hh"
40#include "sim/serialize.hh"
41
42#if FULL_SYSTEM
43#include "arch/mips/registers.hh"
44#include "arch/mips/vtophys.hh"
42#include "arch/mips/registers.hh"
43#include "arch/mips/vtophys.hh"
45#include "mem/fs_translating_port_proxy.hh"
46#endif
44#include "mem/vport.hh"
47
48
49using namespace MipsISA;
50using namespace std;
51
52namespace MipsISA {
53
54uint64_t
55getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
56{
45
46
47using namespace MipsISA;
48using namespace std;
49
50namespace MipsISA {
51
52uint64_t
53getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
54{
57#if FULL_SYSTEM
58 if (number < 4) {
59 if (fp)
60 return tc->readFloatRegBits(FirstArgumentReg + number);
61 else
62 return tc->readIntReg(FirstArgumentReg + number);
63 } else {
64 Addr sp = tc->readIntReg(StackPointerReg);
65 FSTranslatingPortProxy* vp = tc->getVirtProxy();
66 uint64_t arg = vp->read<uint64_t>(sp +
67 (number - 4) * sizeof(uint64_t));
68 return arg;
69 }
70#else
71 panic("getArgument() is Full system only\n");
55 panic("getArgument() not implemented\n");
72 M5_DUMMY_RETURN
56 M5_DUMMY_RETURN
73#endif
74}
75
76uint64_t
77fpConvert(ConvertType cvt_type, double fp_val)
78{
79
80 switch (cvt_type)
81 {

--- 167 unchanged lines hidden (view full) ---

249
250void
251startupCPU(ThreadContext *tc, int cpuId)
252{
253 tc->activate(0/*tc->threadId()*/);
254}
255
256void
57}
58
59uint64_t
60fpConvert(ConvertType cvt_type, double fp_val)
61{
62
63 switch (cvt_type)
64 {

--- 167 unchanged lines hidden (view full) ---

232
233void
234startupCPU(ThreadContext *tc, int cpuId)
235{
236 tc->activate(0/*tc->threadId()*/);
237}
238
239void
240initCPU(ThreadContext *tc, int cpuId)
241{}
242
243void
257copyRegs(ThreadContext *src, ThreadContext *dest)
258{
259 panic("Copy Regs Not Implemented Yet\n");
260}
261
262void
263copyMiscRegs(ThreadContext *src, ThreadContext *dest)
264{

--- 12 unchanged lines hidden ---
244copyRegs(ThreadContext *src, ThreadContext *dest)
245{
246 panic("Copy Regs Not Implemented Yet\n");
247}
248
249void
250copyMiscRegs(ThreadContext *src, ThreadContext *dest)
251{

--- 12 unchanged lines hidden ---