-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Differentiate between the various short/quick immediate value types: signed, 1-32 unsigned, 0-31 unsigned, shift left 1-32 unsigned (WTF!?!), and relative jump offset signed. Most of this is handled at stringification time to keep the core deserialization code simple, but sign extension is handled by the deserialization code. -Print relative jump offsets in a format that MAC and RMAC can assemble. -Add a very incomplete test suite. Run "make" in the "test" subdirectory to run it.
- Loading branch information
Showing
8 changed files
with
113 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: all | ||
all: test.bin | ||
awk '/\t/' test.s > test.raw.s | ||
../jdis test.bin > test.disassembled.s | ||
diff -u test.raw.s test.disassembled.s | ||
rm test.raw.s test.disassembled.s | ||
|
||
test.bin: test.s | ||
rmac -fr $< -o $@ | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.org $4000 | ||
.text | ||
.gpu | ||
.org $f10000 | ||
label: | ||
; Jump to label: | ||
jr T, *+0 | ||
nop | ||
jr T, *+4 | ||
nop | ||
jump T, (r2) | ||
nop | ||
add r1, r2 | ||
addq #5, r2 | ||
abs r3 | ||
store r3, (r14) | ||
store r3, (r14+8) | ||
store r3, (r15+r8) | ||
moveq #31, r31 | ||
moveq #15, r31 | ||
moveq #0, r28 | ||
rorq #32, r0 | ||
rorq #1, r0 | ||
shrq #2, r0 | ||
shlq #2, r0 | ||
sharq #2, r0 | ||
sharq #32, r0 | ||
sharq #1, r0 | ||
cmpq #8, r1 | ||
cmpq #-16, r1 | ||
cmpq #15, r1 | ||
cmpq #0, r1 | ||
pack r5 | ||
unpack r5 | ||
.end |