process.cc (4762:c94e103c83ad) process.cc (4772:f08370a81812)
1/*
2 * Copyright (c) 2001-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;

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

400 else
401 panic("Unknown int size");
402
403 initVirtMem->writeBlob(stack_min, (uint8_t*)&argc, intSize);
404
405 copyStringArray(argv, argv_array_base, arg_data_base, initVirtMem);
406 copyStringArray(envp, envp_array_base, env_data_base, initVirtMem);
407
1/*
2 * Copyright (c) 2001-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;

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

400 else
401 panic("Unknown int size");
402
403 initVirtMem->writeBlob(stack_min, (uint8_t*)&argc, intSize);
404
405 copyStringArray(argv, argv_array_base, arg_data_base, initVirtMem);
406 copyStringArray(envp, envp_array_base, env_data_base, initVirtMem);
407
408 threadContexts[0]->setIntReg(ArgumentReg0, argc);
409 threadContexts[0]->setIntReg(ArgumentReg1, argv_array_base);
408 assert(NumArgumentRegs >= 2);
409 threadContexts[0]->setIntReg(ArgumentReg[0], argc);
410 threadContexts[0]->setIntReg(ArgumentReg[1], argv_array_base);
410 threadContexts[0]->setIntReg(StackPointerReg, stack_min);
411
412 Addr prog_entry = objFile->entryPoint();
413 threadContexts[0]->setPC(prog_entry);
414 threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
415
416#if THE_ISA != ALPHA_ISA //e.g. MIPS or Sparc
417 threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst)));

--- 157 unchanged lines hidden ---
411 threadContexts[0]->setIntReg(StackPointerReg, stack_min);
412
413 Addr prog_entry = objFile->entryPoint();
414 threadContexts[0]->setPC(prog_entry);
415 threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
416
417#if THE_ISA != ALPHA_ISA //e.g. MIPS or Sparc
418 threadContexts[0]->setNextNPC(prog_entry + (2 * sizeof(MachInst)));

--- 157 unchanged lines hidden ---