Skip to content

Incorrect output? #2

Open
Open
@ghost

Description

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}"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions