Deleted Added
sdiff udiff text old ( 8706:b1838faf3bcc ) new ( 8767:e575781f71b8 )
full compact
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
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;

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

26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Gabe Black
29 * Ali Saidi
30 */
31
32#include "arch/sparc/faults.hh"
33#include "arch/sparc/utility.hh"
34#include "arch/sparc/vtophys.hh"
35#include "mem/vport.hh"
36
37namespace SparcISA {
38
39
40// The caller uses %o0-%05 for the first 6 arguments even if their floating
41// point. Double precision floating point values take two registers/args.
42// Quads, structs, and unions are passed as pointers. All arguments beyond
43// the sixth are passed on the stack past the 16 word window save area,
44// space for the struct/union return pointer, and space reserved for the
45// first 6 arguments which the caller may use but doesn't have to.
46uint64_t
47getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
48{
49 if (FullSystem) {
50 const int NumArgumentRegs = 6;
51 if (number < NumArgumentRegs) {
52 return tc->readIntReg(8 + number);
53 } else {
54 Addr sp = tc->readIntReg(StackPointerReg);
55 VirtualPort *vp = tc->getVirtPort();
56 uint64_t arg = vp->read<uint64_t>(sp + 92 +
57 (number-NumArgumentRegs) * sizeof(uint64_t));
58 return arg;
59 }
60 } else {
61 panic("getArgument() only implemented for full system\n");
62 M5_DUMMY_RETURN
63 }
64}
65
66void
67copyMiscRegs(ThreadContext *src, ThreadContext *dest)
68{
69
70 uint8_t tl = src->readMiscRegNoEffect(MISCREG_TL);
71

--- 190 unchanged lines hidden ---