aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80/insns
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1997-05-19 23:02:30 +0000
committerMichael Meissner <gnu@the-meissners.org>1997-05-19 23:02:30 +0000
commit8c5b6ead7d2880ce708ee185ce3506cda1aeff4d (patch)
tree2290bff85b6e809a587e49f04ea2f64ce9ff7955 /sim/tic80/insns
parent2aec653f17a6f02608cee5863223034d0395198b (diff)
downloadfsf-binutils-gdb-8c5b6ead7d2880ce708ee185ce3506cda1aeff4d.zip
fsf-binutils-gdb-8c5b6ead7d2880ce708ee185ce3506cda1aeff4d.tar.gz
fsf-binutils-gdb-8c5b6ead7d2880ce708ee185ce3506cda1aeff4d.tar.bz2
Make getpid, kill supported system calls
Diffstat (limited to 'sim/tic80/insns')
-rw-r--r--sim/tic80/insns19
1 files changed, 19 insertions, 0 deletions
diff --git a/sim/tic80/insns b/sim/tic80/insns
index 89502fc..ad71d21 100644
--- a/sim/tic80/insns
+++ b/sim/tic80/insns
@@ -1063,6 +1063,25 @@ void::function::do_trap:unsigned32 trap_number
GPR(2) = GPR(6);
break;
}
+ case 20: /* GETPID */
+ {
+ GPR(2) = getpid ();
+ break;
+ }
+ case 37: /* KILL */
+ if (GPR (2) != getpid ())
+ {
+ int ret = kill (GPR(2), GPR(4));
+ if (ret < 0)
+ ret = -errno;
+ GPR (2) = ret;
+ break;
+ }
+ else
+ {
+ sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, GPR(4));
+ break;
+ }
default:
/* For system calls which are defined, just return EINVAL instead of trapping */
if (GPR(15) <= 204)