Suggests a series of MOV and ADD instructions to use to get any 32-bit value into a register with Imm12 ARM encodings
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
ImmSuggest.s
LICENSE
README.md
ValidImms.h
arg.h
cdiff.h
demo.png
isequal.h
printd.h
range.h
softdiv.h

README.md

ImmSuggest

Suggests a series of MOV and ADD instructions to use to get any 32-bit value into a register with Imm12 ARM encodings

Assemble

as ImmSuggest.s -o ImmSuggest.o && ld ImmSuggest.o -o ImmSuggest

Usage

You provide an integer as an argument (ideally something that fits into 32-bits), and it gives you the instruction(s) that will get that number into your register, some way or another. If your number doesn't fit in one instruction, the program will first display the closest surrounding numbers that would fit, as in: lower < your number > higher

Usage Demo

alt tag