diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-04-26 23:14:11 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-04 21:47:10 -0400 |
commit | cd09ab7c7463d05fe27e3dab4f97bb8aa6570413 (patch) | |
tree | 3e957d821a94ec5ddddcacd8e36c6a9479f38e65 /sim/microblaze | |
parent | 13ffdac36f589830863b10c760b79ab7809e1b12 (diff) | |
download | gdb-cd09ab7c7463d05fe27e3dab4f97bb8aa6570413.zip gdb-cd09ab7c7463d05fe27e3dab4f97bb8aa6570413.tar.gz gdb-cd09ab7c7463d05fe27e3dab4f97bb8aa6570413.tar.bz2 |
sim: microblaze: hook up libgloss syscalls
When in the virtual environment, have brki 8 trigger libgloss syscalls
like other ports. This also matches the ABI that Linux uses for its
syscalls (ignoring the syscall table differences).
Diffstat (limited to 'sim/microblaze')
-rw-r--r-- | sim/microblaze/ChangeLog | 5 | ||||
-rw-r--r-- | sim/microblaze/interp.c | 15 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 510cdde..8300491 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,5 +1,10 @@ 2021-05-04 Mike Frysinger <vapier@gentoo.org> + * interp.c: Include sim-syscall.h. + (sim_engine_run): Call sim_syscall for brki instructions. + +2021-05-04 Mike Frysinger <vapier@gentoo.org> + * configure: Regenerate. 2021-05-01 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index 2bd067c..1292918 100644 --- a/sim/microblaze/interp.c +++ b/sim/microblaze/interp.c @@ -28,6 +28,7 @@ #include "sim-main.h" #include "sim-options.h" +#include "sim-syscall.h" #include "microblaze-dis.h" @@ -284,8 +285,18 @@ sim_engine_run (SIM_DESC sd, IMM_ENABLE = 0; } else - /* no delay slot: increment cycle count */ - bonus_cycles++; + { + if (op == brki && IMM == 8) + { + RETREG = sim_syscall (cpu, CPU.regs[12], CPU.regs[5], + CPU.regs[6], CPU.regs[7], + CPU.regs[8]); + PC = RD + INST_SIZE; + } + + /* no delay slot: increment cycle count */ + bonus_cycles++; + } } } |