linux.hh (11414:cfad34a15729) linux.hh (13536:77e19417e723)
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 */
30
31#ifndef __ARCH_SPARC_LINUX_LINUX_HH__
32#define __ARCH_SPARC_LINUX_LINUX_HH__
33
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 */
30
31#ifndef __ARCH_SPARC_LINUX_LINUX_HH__
32#define __ARCH_SPARC_LINUX_LINUX_HH__
33
34#include "arch/sparc/utility.hh"
34#include "kern/linux/linux.hh"
35
36class SparcLinux : public Linux
37{
38 public:
39
40 typedef struct {
41 uint32_t st_dev;

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

177 case TGT_TCGETS:
178 case TGT_TCGETA:
179 case TGT_TCSETAW:
180 return true;
181 default:
182 return false;
183 }
184 }
35#include "kern/linux/linux.hh"
36
37class SparcLinux : public Linux
38{
39 public:
40
41 typedef struct {
42 uint32_t st_dev;

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

178 case TGT_TCGETS:
179 case TGT_TCGETA:
180 case TGT_TCSETAW:
181 return true;
182 default:
183 return false;
184 }
185 }
186
187 static void
188 archClone(uint64_t flags,
189 Process *pp, Process *cp,
190 ThreadContext *ptc, ThreadContext *ctc,
191 uint64_t stack, uint64_t tls)
192 {
193 SparcISA::copyRegs(ptc, ctc);
194 ctc->setIntReg(SparcISA::NumIntArchRegs + 6, 0);
195 ctc->setIntReg(SparcISA::NumIntArchRegs + 4, 0);
196 ctc->setIntReg(SparcISA::NumIntArchRegs + 3, SparcISA::NWindows - 2);
197 ctc->setIntReg(SparcISA::NumIntArchRegs + 5, SparcISA::NWindows);
198 ctc->setMiscReg(SparcISA::MISCREG_CWP, 0);
199 ctc->setIntReg(SparcISA::NumIntArchRegs + 7, 0);
200 ctc->setMiscRegNoEffect(SparcISA::MISCREG_TL, 0);
201 ctc->setMiscReg(SparcISA::MISCREG_ASI, SparcISA::ASI_PRIMARY);
202 for (int y = 8; y < 32; y++)
203 ctc->setIntReg(y, ptc->readIntReg(y));
204
205 if (stack)
206 ctc->setIntReg(SparcISA::StackPointerReg, stack);
207 }
185};
186
187class Sparc32Linux : public SparcLinux
188{
189 public:
190
191 typedef struct {
192 uint64_t st_dev;

--- 42 unchanged lines hidden ---
208};
209
210class Sparc32Linux : public SparcLinux
211{
212 public:
213
214 typedef struct {
215 uint64_t st_dev;

--- 42 unchanged lines hidden ---