diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-02-15 23:24:35 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-02-15 23:24:35 -0500 |
commit | 7f17f1f2df7dc7123448ec624a345ee7c0e996b5 (patch) | |
tree | b410a8b5e1b80e119cc374cb9d7822d46b274ef8 /sim/process.cc | |
parent | aee1bf58734c2146eb048dc4833881886ce68cf8 (diff) | |
parent | 2d04f186748c70b3d8afecd39b94436c33848d93 (diff) | |
download | gem5-7f17f1f2df7dc7123448ec624a345ee7c0e996b5.tar.xz |
Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/z/m5/Bitkeeper/multiarch
--HG--
extra : convert_revision : b4bbf63ec3b1c6de0ea7220e6dda5366c0529c07
Diffstat (limited to 'sim/process.cc')
-rw-r--r-- | sim/process.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sim/process.cc b/sim/process.cc index 395e2eb0a..59d122b48 100644 --- a/sim/process.cc +++ b/sim/process.cc @@ -251,8 +251,10 @@ static void copyStringArray(vector<string> &strings, Addr array_ptr, Addr data_ptr, FunctionalMemory *memory) { + Addr data_ptr_swap; for (int i = 0; i < strings.size(); ++i) { - memory->access(Write, array_ptr, &data_ptr, sizeof(Addr)); + data_ptr_swap = htog(data_ptr); + memory->access(Write, array_ptr, &data_ptr_swap, sizeof(Addr)); memory->writeString(data_ptr, strings[i].c_str()); array_ptr += sizeof(Addr); data_ptr += strings[i].size() + 1; @@ -334,6 +336,7 @@ LiveProcess::LiveProcess(const string &nm, ObjectFile *objFile, // write contents to stack uint64_t argc = argv.size(); + argc = htog(argc); memory->access(Write, stack_min, &argc, sizeof(uint64_t)); copyStringArray(argv, argv_array_base, arg_data_base, memory); |