process.cc (13028:9a09c342891e) | process.cc (13617:34a793c681ce) |
---|---|
1/* 2 * Copyright (c) 2007-2008 The Florida State University 3 * Copyright (c) 2009 The University of Edinburgh 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 263 unchanged lines hidden (view full) --- 272 tc->setIntReg(StackPointerReg, stack_min); 273 274 tc->pcState(getStartPC()); 275 276 //Align the "stack_min" to a page boundary. 277 memState->setStackMin(roundDown(stack_min, pageSize)); 278} 279 | 1/* 2 * Copyright (c) 2007-2008 The Florida State University 3 * Copyright (c) 2009 The University of Edinburgh 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 263 unchanged lines hidden (view full) --- 272 tc->setIntReg(StackPointerReg, stack_min); 273 274 tc->pcState(getStartPC()); 275 276 //Align the "stack_min" to a page boundary. 277 memState->setStackMin(roundDown(stack_min, pageSize)); 278} 279 |
280PowerISA::IntReg | 280RegVal |
281PowerProcess::getSyscallArg(ThreadContext *tc, int &i) 282{ 283 assert(i < 5); 284 return tc->readIntReg(ArgumentReg0 + i++); 285} 286 287void | 281PowerProcess::getSyscallArg(ThreadContext *tc, int &i) 282{ 283 assert(i < 5); 284 return tc->readIntReg(ArgumentReg0 + i++); 285} 286 287void |
288PowerProcess::setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val) | 288PowerProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val) |
289{ 290 assert(i < 5); 291 tc->setIntReg(ArgumentReg0 + i, val); 292} 293 294void 295PowerProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret) 296{ 297 Cr cr = tc->readIntReg(INTREG_CR); 298 if (sysret.successful()) { 299 cr.cr0.so = 0; 300 } else { 301 cr.cr0.so = 1; 302 } 303 tc->setIntReg(INTREG_CR, cr); 304 tc->setIntReg(ReturnValueReg, sysret.encodedValue()); 305} | 289{ 290 assert(i < 5); 291 tc->setIntReg(ArgumentReg0 + i, val); 292} 293 294void 295PowerProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret) 296{ 297 Cr cr = tc->readIntReg(INTREG_CR); 298 if (sysret.successful()) { 299 cr.cr0.so = 0; 300 } else { 301 cr.cr0.so = 1; 302 } 303 tc->setIntReg(INTREG_CR, cr); 304 tc->setIntReg(ReturnValueReg, sysret.encodedValue()); 305} |