Skip to content
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

Incorrect output? #2

Open
ghost opened this issue Mar 26, 2017 · 0 comments
Open

Incorrect output? #2

ghost opened this issue Mar 26, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 26, 2017

I really do not know which project to put this in but as the bug surfaced in output from disjs (and my disassembler because I also use the videocoreiv.arch file) I am posting it here.

The videocoreiv.arch definitions used in disjs generates what I believe to be inaccurate output.

Looking at the 48 bit instructions (jump added for comparison)
1110 0000 0000 0000 uuuu uuuu uuuu uuuu uuuu uuuu uuuu uuuu "; j 0x%08x{u}"
1110 0001 0000 0000 oooo oooo oooo oooo oooo oooo oooo oooo "; b 0x%08x{$+o}"

it will display the actual target for the branch as opposed to the actual value. Perhaps a better definition (or fixup applied in code which is more cumbersome) would be

1110 0001 0000 0000 oooo oooo oooo oooo oooo oooo oooo oooo "; b 0x%08x{o} # {$+o}"

Where # is a comment character of choice.

This way if the instruction is run through an assembler it will generate the correct output however the intent/meaning is still conveyed to the reader.

Of note the 16 bit branch instructions do not apply the offset but all others do
0000 0000 010d dddd "; b r%i{d}"
0000 0000 011d dddd "; bl r%i{d}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants