Giter Site home page Giter Site logo

LDR-relative problems. about armips HOT 5 CLOSED

kingcom avatar kingcom commented on August 12, 2024
LDR-relative problems.

from armips.

Comments (5)

Kingcom avatar Kingcom commented on August 12, 2024

Ah, nice catch. The PC relative load is indeed an oversight. About the third one, "infinite validation loop" means that the values keep changing in such a way that addresses move back and forth. armips tries to optimize opcodes and pools to take up little space, but sometimes this causes them to change size every iteration (for example, in ARM, when it sees that an immediate load can be converted to a mov instruction, but next iteration the immediate is now smaller by a value of 4 because it was no longer put into a pool, and now it doesn't fit into mov anymore). I'll have to check why this happens and disable the specific optimizations after too many iterations.

from armips.

Kingcom avatar Kingcom commented on August 12, 2024

Can you supply a test case where the issue happens?

from armips.

charleysdrpepper avatar charleysdrpepper commented on August 12, 2024

Mmkay. Tested with the latest (current) version...

After .gba, and between .open filename address/.close.... it is literally:

-Stuck inside invalidation loop:
.org 0x080000C0
ldr r0, [thelabel]
thelabel:

-PC-relative address must be word-aligned: (Error not supposed to show/should be correct.)
.org 0x080000C0
ldr r0, [thelabel]
mov r1, 0x20
thelabel:

-Stuck inside invalidation loop:
.org 0x080000C0
ldr r0, [thelabel]
mov r1, 0x20
mov r2, 0x20
thelabel:

-Compiles okay:
.org 0x080000C0
ldr r0, [0x080000C4]

The invalidation loop error should tell you the last line. (Not necessarily the one with the label./.word number after label.)

from armips.

Kingcom avatar Kingcom commented on August 12, 2024

Thanks. The latest commit should have fixed it, your test cases worked as intended for me with it (that is, error, no error, error, no error).
I also fixed the very first issue now.

from armips.

charleysdrpepper avatar charleysdrpepper commented on August 12, 2024

Thanks! Seems to work now! You are welcome.

One of my experiments was to convert one of the sections in Golden Sun 2 into assembly (via a program I write) to see how that works with automated pointering... (That game (and many others from the same company) has a number of "code files" with free space at the end of them, so it's not as hard as it would probably be for an entire game.) - Probably would do the whole game if I like my results, since I know a vast majority (not all) of the data in that game. Kind of a fun theory to how to do a game editor. (And who knows if this would challenge others to try the same with other games, if successful.)

from armips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.