Fix roundUp function template so explicit arg is not
needed in a few more cases. base/intmath.hh: align arg to roundUp should be int, not template class sim/process.cc: sim/syscall_emul.hh: No need for explicit template arg now that roundUp is fixed. --HG-- extra : convert_revision : f9f4639e022acb9f427e8d30d81c782504437c53
This commit is contained in:
parent
0cdcb08d90
commit
16bda9c03e
3 changed files with 4 additions and 4 deletions
|
@ -194,9 +194,9 @@ divCeil(T a, T b)
|
|||
|
||||
template <class T>
|
||||
inline T
|
||||
roundUp(T val, T align)
|
||||
roundUp(T val, int align)
|
||||
{
|
||||
T mask = align - 1;
|
||||
T mask = (T)align - 1;
|
||||
return (val + mask) & ~mask;
|
||||
}
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ LiveProcess::LiveProcess(const string &nm, ObjectFile *objFile,
|
|||
text_size = objFile->textSize();
|
||||
data_base = objFile->dataBase();
|
||||
data_size = objFile->dataSize() + objFile->bssSize();
|
||||
brk_point = roundUp<uint64_t>(data_base + data_size, VMPageSize);
|
||||
brk_point = roundUp(data_base + data_size, VMPageSize);
|
||||
|
||||
// load object file into target memory
|
||||
objFile->loadSections(memory);
|
||||
|
|
|
@ -634,7 +634,7 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
|
|||
if (start == 0) {
|
||||
// user didn't give an address... pick one from our "mmap region"
|
||||
start = p->mmap_end;
|
||||
p->mmap_end += roundUp<Addr>(length, VMPageSize);
|
||||
p->mmap_end += roundUp(length, VMPageSize);
|
||||
if (p->nxm_start != 0) {
|
||||
//If we have an nxm space, make sure we haven't colided
|
||||
assert(p->mmap_end < p->nxm_start);
|
||||
|
|
Loading…
Reference in a new issue