sim: callback: extend syscall interface to handle 7 args
authorMike Frysinger <vapier@gentoo.org>
Thu, 24 Jun 2021 04:14:15 +0000 (00:14 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 25 Jun 2021 03:51:16 +0000 (23:51 -0400)
The Linux syscall interface, depending on architecture, handles up to
7 arguments.  Extend the callback API to handle those.

include/sim/ChangeLog
include/sim/callback.h
sim/bfin/ChangeLog
sim/bfin/interp.c
sim/m32r/ChangeLog
sim/m32r/traps-linux.c

index 3faea5828942ca5a2573ecebe7245337adfd9b17..0897a52082ac79ba9cdbac6524ffd432638fecba 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim/callback.h (struct host_callback_struct): Add arg5, arg6, and
+       arg7.
+
 2021-06-23  Mike Frysinger  <vapier@gentoo.org>
 
        * sim/callback.h (struct host_callback_struct): Add kill.
index 8d61ebb879e8c5a204b7667ff7ac12398ee11f0e..be72f4503e1ad1b5386add5cb0e8db3420bc166d 100644 (file)
@@ -241,7 +241,7 @@ typedef struct cb_syscall {
   /* The target's value of what system call to perform.  */
   int func;
   /* The arguments to the syscall.  */
-  long arg1, arg2, arg3, arg4;
+  long arg1, arg2, arg3, arg4, arg5, arg6, arg7;
 
   /* The result.  */
   long result;
index 3f2e73db07213ff7313c278e9434fdc3a19120fd..f523c55f259769c315f9b41c181b6fd7f38a6146 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * interp.c (bfin_syscall): Set sc.arg5 & sc.arg6.
+
 2021-06-22  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 216cefe2c21c558a76333c0e858ebb55968a4548..ddd0e7a372e8c0cb6fcba843b0de47a70cd0dc9a 100644 (file)
@@ -120,8 +120,8 @@ bfin_syscall (SIM_CPU *cpu)
       sc.arg2 = args[1] = DREG (1);
       sc.arg3 = args[2] = DREG (2);
       sc.arg4 = args[3] = DREG (3);
-      /*sc.arg5 =*/ args[4] = DREG (4);
-      /*sc.arg6 =*/ args[5] = DREG (5);
+      sc.arg5 = args[4] = DREG (4);
+      sc.arg6 = args[5] = DREG (5);
     }
   else
     {
@@ -131,8 +131,8 @@ bfin_syscall (SIM_CPU *cpu)
       sc.arg2 = args[1] = GET_LONG (DREG (0) + 4);
       sc.arg3 = args[2] = GET_LONG (DREG (0) + 8);
       sc.arg4 = args[3] = GET_LONG (DREG (0) + 12);
-      /*sc.arg5 =*/ args[4] = GET_LONG (DREG (0) + 16);
-      /*sc.arg6 =*/ args[5] = GET_LONG (DREG (0) + 20);
+      sc.arg5 = args[4] = GET_LONG (DREG (0) + 16);
+      sc.arg6 = args[5] = GET_LONG (DREG (0) + 20);
     }
   sc.p1 = (PTR) sd;
   sc.p2 = (PTR) cpu;
index f0b38768ba05066542ff9433382b44a776620124..650b19d94c0b7aad24d69f309a89889b35979780 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * traps-linux.c (m32r_trap): Set s.arg4, s.arg5, s.arg6, and s.arg7.
+
 2021-06-22  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 8ff046590d40b4332bd7abf75b6cc6222438bcd5..c218582e431efcb9645d0ca237e177080a11b366 100644 (file)
@@ -252,6 +252,10 @@ m32r_trap (SIM_CPU *current_cpu, PCADDR pc, int num)
         s.arg1 = arg1;
         s.arg2 = arg2;
         s.arg3 = arg3;
+        s.arg4 = arg4;
+        s.arg5 = arg5;
+        s.arg6 = arg6;
+        s.arg7 = arg7;
 
         s.p1 = (PTR) sd;
         s.p2 = (PTR) current_cpu;
This page took 0.029613 seconds and 4 git commands to generate.