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

Disassembler assumes jump offsets in SCM header are always 4 bytes #100

Open
x87 opened this issue Nov 30, 2020 · 2 comments
Open

Disassembler assumes jump offsets in SCM header are always 4 bytes #100

x87 opened this issue Nov 30, 2020 · 2 comments
Labels

Comments

@x87
Copy link
Collaborator

x87 commented Nov 30, 2020

there are jump instructions between segments in SCM file. Any main.scm issued by R* historically had those instructions with 32-bit offsets which has been reflected in the community description: https://gtamods.com/wiki/SA_SCM

But being pedantic there is no limitation on the offset size and it can be 8 or 16 bits (near jump) as well. I think Point compiler supported near jumps and there could possibly be other compilers doing so as well.

@x87 x87 added priority:p3 Low priority type:nice-to-have minor enhancements scope:disassembler labels Nov 30, 2020
@wmysterio
Copy link

wmysterio commented Nov 30, 2020

What will it potentially give?

@x87
Copy link
Collaborator Author

x87 commented Nov 30, 2020

@wmysterio it's a technical detail, end-user gains nothing but better interoperability with other compilers (not Sanny). Maybe at some point Sanny's compiler will support near jumps in the header as part of aggressive optimization (#44) but not in the nearest future.

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

No branches or pull requests

2 participants