process.cc (5216:6f0fb48aff9e) process.cc (5231:240f304b5195)
1/*
2 * Copyright (c) 2003-2004 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;

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

424 initVirtMem->writeBlob(spillStart, (uint8_t*)spillHandler64, spillSize);
425
426 //Set up the thread context to start running the process
427 assert(NumArgumentRegs >= 2);
428 threadContexts[0]->setIntReg(ArgumentReg[0], argc);
429 threadContexts[0]->setIntReg(ArgumentReg[1], argv_array_base);
430 threadContexts[0]->setIntReg(StackPointerReg, stack_min - StackBias);
431
1/*
2 * Copyright (c) 2003-2004 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;

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

424 initVirtMem->writeBlob(spillStart, (uint8_t*)spillHandler64, spillSize);
425
426 //Set up the thread context to start running the process
427 assert(NumArgumentRegs >= 2);
428 threadContexts[0]->setIntReg(ArgumentReg[0], argc);
429 threadContexts[0]->setIntReg(ArgumentReg[1], argv_array_base);
430 threadContexts[0]->setIntReg(StackPointerReg, stack_min - StackBias);
431
432 // %g1 is a pointer to a function that should be run at exit. Since we
433 // don't have anything like that, it should be set to 0.
434 threadContexts[0]->setIntReg(1, 0);
435
432 Addr prog_entry = objFile->entryPoint();
433 threadContexts[0]->setPC(prog_entry);
434 threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
435 threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst)));
436
437 //Align the "stack_min" to a page boundary.
438 stack_min = roundDown(stack_min, pageSize);
439

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

653 initVirtMem->writeBlob(spillStart, (uint8_t*)spillHandler32, spillSize);
654
655 //Set up the thread context to start running the process
656 //assert(NumArgumentRegs >= 2);
657 //threadContexts[0]->setIntReg(ArgumentReg[0], argc);
658 //threadContexts[0]->setIntReg(ArgumentReg[1], argv_array_base);
659 threadContexts[0]->setIntReg(StackPointerReg, stack_min);
660
436 Addr prog_entry = objFile->entryPoint();
437 threadContexts[0]->setPC(prog_entry);
438 threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
439 threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst)));
440
441 //Align the "stack_min" to a page boundary.
442 stack_min = roundDown(stack_min, pageSize);
443

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

657 initVirtMem->writeBlob(spillStart, (uint8_t*)spillHandler32, spillSize);
658
659 //Set up the thread context to start running the process
660 //assert(NumArgumentRegs >= 2);
661 //threadContexts[0]->setIntReg(ArgumentReg[0], argc);
662 //threadContexts[0]->setIntReg(ArgumentReg[1], argv_array_base);
663 threadContexts[0]->setIntReg(StackPointerReg, stack_min);
664
665 // %g1 is a pointer to a function that should be run at exit. Since we
666 // don't have anything like that, it should be set to 0.
667 threadContexts[0]->setIntReg(1, 0);
668
661 uint32_t prog_entry = objFile->entryPoint();
662 threadContexts[0]->setPC(prog_entry);
663 threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
664 threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst)));
665
666 //Align the "stack_min" to a page boundary.
667 stack_min = roundDown(stack_min, pageSize);
668

--- 72 unchanged lines hidden ---
669 uint32_t prog_entry = objFile->entryPoint();
670 threadContexts[0]->setPC(prog_entry);
671 threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
672 threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst)));
673
674 //Align the "stack_min" to a page boundary.
675 stack_min = roundDown(stack_min, pageSize);
676

--- 72 unchanged lines hidden ---