summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r--src/sim/syscall_emul.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index a859fbe43..71c0dd090 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1297,8 +1297,8 @@ mmapImpl(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc,
// Extend global mmap region if necessary. Note that we ignore the
// start address unless MAP_FIXED is specified.
if (!(tgt_flags & OS::TGT_MAP_FIXED)) {
- start = (OS::mmapGrowsDown()) ? p->mmap_end - length : p->mmap_end;
- p->mmap_end = (OS::mmapGrowsDown()) ? start : p->mmap_end + length;
+ start = p->mmapGrowsDown() ? p->mmap_end - length : p->mmap_end;
+ p->mmap_end = p->mmapGrowsDown() ? start : p->mmap_end + length;
}
DPRINTF_SYSCALL(Verbose, " mmap range is 0x%x - 0x%x\n",