This is a little harness for experimenting with powerpc asm (ppc64le).
It handles the boiler plate so that you can test small snippets of asm for calculating various things, bit shifts, bit tests etc.
It runs on x86 using qemu and ppc64le natively.
To get started, add some code to user_code
in user.S
. There are some examples in
examples.S
.
To step through your code with gdb, run:
$ make debug
That will open the program in gdb, and run to where your code starts. You can then advance
one instruction at a time with stepi
and observe which registers change and in what
manner.
To finish, optionally run to completion with c
, and quit gdb with q
.
See make help
for other options.
The .gdbinit
is from https://github.com/cyrus-and/gdb-dashboard
Some of the macros in helpers.S
are from Linux.