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

M68000: Disassembly stops at a BSR, overrides control flow to CALL_RETURN (CALL_TERMINATOR) #7124

Open
eschaton opened this issue Oct 30, 2024 · 3 comments
Assignees
Labels
Status: Waiting on customer Waiting for customer feedback

Comments

@eschaton
Copy link

When disassembling an M68000 BSR.L (and possibly other BSR variants), Ghidra adds a control flow override of CALL_RETURN (CALL_TERMINATOR).

For example, 61 ff ff ff b2 f2 at address 0x000896d0 disassembles (correctly) to BSR.L FUN_000849c4 but also halts disassembly as if it were a return; it should be treated the same as JSR.

@hippietrail
Copy link
Contributor

I'm still learning Sleigh but it looks right to me.

:bsr.l addr32 is opbig=0x61 & d8base=255; addr32 { SP=SP-4; *:4 SP = inst_next; call addr32; }

Are you saying it always does this or just sometimes? Can you include a screenshot?

@emteere
Copy link
Contributor

emteere commented Nov 7, 2024

Is the function FUN_000849c4 tagged as non-returning?

@ryanmkurtz ryanmkurtz added the Status: Waiting on customer Waiting for customer feedback label Nov 7, 2024
@hippietrail
Copy link
Contributor

I tried making a file in a hex editor and it works fine here:
image

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

No branches or pull requests

4 participants