Skip to content

use R16 scratch when offsets overload#22693

Merged
thewilsonator merged 1 commit intodlang:masterfrom
WalterBright:imm12Overload
Mar 6, 2026
Merged

use R16 scratch when offsets overload#22693
thewilsonator merged 1 commit intodlang:masterfrom
WalterBright:imm12Overload

Conversation

@WalterBright
Copy link
Member

Because opcodes are fixed at 32 bits, sometimes the offsets don't fit in the opcodes. So they have to be calculated separately in scratch register R16.

I had to split movregconst() into two functions, movregconst() and movregconstant(), so it can load a constant into a register without being concerned about the values in other registers. That accounts for most of the diff.

@WalterBright WalterBright added Compiler:Backend glue code, optimizer, code generation Arch:Aarch64 Issues specific to Arm 64 labels Mar 5, 2026
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#22693"

@thewilsonator thewilsonator merged commit 9064aba into dlang:master Mar 6, 2026
38 of 42 checks passed
@WalterBright WalterBright deleted the imm12Overload branch March 6, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch:Aarch64 Issues specific to Arm 64 Compiler:Backend glue code, optimizer, code generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants