diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-02-16 02:40:04 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-02-16 02:40:04 -0500 |
commit | e7d16b0aefec6543817762b6e5e389372a11b53c (patch) | |
tree | 2e90bf447049ece5fb234bfaf44c50515388744e /sim/process.cc | |
parent | 7c9ea671aff141bc0a3e7acc892794e7e8181cf3 (diff) | |
parent | 00f451cc02373a22023f1e32ba3823a1d07adb42 (diff) | |
download | gem5-e7d16b0aefec6543817762b6e5e389372a11b53c.tar.xz |
Merge zizzer:/bk/multiarch
into zazzer.eecs.umich.edu:/z/ksewell/research/m5-sim/m5-multiarch
--HG--
extra : convert_revision : 17b164847aee7e21d15d1a9d99aae43f46906c28
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); |