From 69308976e8c42febe2c7a12953b0f2dd2e47d66f Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 18 Apr 2005 03:08:46 +0000 Subject: [PATCH] * cris/traps.c (cris_break_13_handler) : For ((len & 8191) != 0 && fd == (USI) -1), don't say this isn't implemented. In call to create_map, pad length argument to 8k. --- sim/ChangeLog | 6 ++++++ sim/cris/traps.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sim/ChangeLog b/sim/ChangeLog index 510da960ea4..67a52d91606 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,9 @@ +2005-04-18 Hans-Peter Nilsson + + * cris/traps.c (cris_break_13_handler) : + For ((len & 8191) != 0 && fd == (USI) -1), don't say this isn't + implemented. In call to create_map, pad length argument to 8k. + 2005-04-15 Corinna Vinschen * configure.ac: Add explicit sh64 case. diff --git a/sim/cris/traps.c b/sim/cris/traps.c index eadb744ff36..5b3718d3900 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -1530,8 +1530,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1, && flags != TARGET_MAP_PRIVATE && flags != TARGET_MAP_SHARED) || (fd != (USI) -1 && prot != TARGET_PROT_READ) - || pgoff != 0 - || ((len & 8191) != 0 && fd == (USI) -1)) + || pgoff != 0) { sim_io_eprintf (sd, "Unimplemented mmap2 call " "(0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n", @@ -1611,7 +1610,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1, else { USI newaddr - = create_map (sd, ¤t_cpu->highest_mmapped_page, addr, len); + = create_map (sd, ¤t_cpu->highest_mmapped_page, addr, + (len + 8191) & ~8191); if (newaddr >= (USI) -8191) retval = -cb_host_to_target_errno (cb, -(SI) newaddr); -- 2.30.2