-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mnemonic support & Improve Disassembler #21
base: coredsl_exceptions
Are you sure you want to change the base?
Conversation
NAMES = { | ||
0: "zero", | ||
1: "ra", | ||
2: "sp", | ||
3: "gp", | ||
4: "tp", | ||
5: "t0", | ||
6: "t1", | ||
7: "t2", | ||
8: "s0", | ||
9: "s1", | ||
10: "a0", | ||
11: "a1", | ||
12: "a2", | ||
13: "a3", | ||
14: "a4", | ||
15: "a5", | ||
16: "a6", | ||
17: "a7", | ||
18: "s2", | ||
19: "s3", | ||
20: "s4", | ||
21: "s5", | ||
22: "s6", | ||
23: "s7", | ||
24: "s8", | ||
25: "s9", | ||
26: "s10", | ||
27: "s11", | ||
28: "t3", | ||
29: "t4", | ||
30: "t5", | ||
31: "t6", | ||
} | ||
|
||
FNAMES = { | ||
0: "f0", | ||
1: "f1", | ||
2: "f2", | ||
3: "f3", | ||
4: "f4", | ||
5: "f5", | ||
6: "f6", | ||
7: "f7", | ||
8: "fs0", | ||
9: "fs1", | ||
10: "fa0", | ||
11: "fa1", | ||
12: "fa2", | ||
13: "fa3", | ||
14: "fa4", | ||
15: "fa5", | ||
16: "fa6", | ||
17: "fa7", | ||
18: "fs2", | ||
19: "fs3", | ||
20: "fs4", | ||
21: "fs5", | ||
22: "fs6", | ||
23: "fs7", | ||
24: "fs8", | ||
25: "fs9", | ||
26: "fs10", | ||
27: "fs11", | ||
28: "ft8", | ||
29: "ft9", | ||
30: "ft10", | ||
31: "ft11", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be pulled from the actual model, not hardcoded here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would not necessarily say this behavior is correct, how does e.g. objdump
handle repeated 0x0000
codepoints?
|
objdump reads ELF files instead raw RISCV objdump output with
|
the for this PR, i think expanding the duplicate handling to all codewords is enough. |
Changes
args_disass
in CoreDSL2 grammar (is this fine)disass
toassembly
everywhereassembly
args content (enable using--format
flag)name()
andfname()
"intrinsic" to lookup register namesDII
(0x0000) instructions