* cris/traps.c (cris_break_13_handler) <case TARGET_SYS_mmap2>:
authorHans-Peter Nilsson <hp@axis.com>
Mon, 18 Apr 2005 03:08:46 +0000 (03:08 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 18 Apr 2005 03:08:46 +0000 (03:08 +0000)
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
sim/cris/traps.c

index 510da960ea477d06467dc9f899fbd6882ea1efbf..67a52d9160696bea673da1b59043f314058a3a33 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-18  Hans-Peter Nilsson  <hp@axis.com>
+
+       * cris/traps.c (cris_break_13_handler) <case TARGET_SYS_mmap2>:
+       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  <vinschen@redhat.com>
 
        * configure.ac: Add explicit sh64 case.
index eadb744ff363ec001bf863c7a1921beb31ef955b..5b3718d3900bcfb7b5bd04c43619834f66412ba4 100644 (file)
@@ -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, &current_cpu->highest_mmapped_page, addr, len);
+                 = create_map (sd, &current_cpu->highest_mmapped_page, addr,
+                               (len + 8191) & ~8191);
 
                if (newaddr >= (USI) -8191)
                  retval = -cb_host_to_target_errno (cb, -(SI) newaddr);
This page took 0.027774 seconds and 4 git commands to generate.