Last visit was: Tue Nov 29, 2022 3:13 pm
It is currently Tue Nov 29, 2022 3:13 pm

 [ 1 post ] 
 A calculator for ARM's literals, and an explanation 
Author Message

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1718
I had a use for this calculator the other day: ... -encoding/


ARM contains a barrel shifter, which means many instructions can do an arbitrary shift as well as whatever else they are doing. This was part of the philosophy of making maximum use of memory bandwidth: each instruction can do a little more work, saving instruction fetch bandwidth, and indeed the machine does as much work as it can within the available cycle time of memory (at that time.)

In RISC-like instruction sets, there's a difficulty in that operands would like to be the full width of the instruction word, but there must be a little room for the opcode too. The difficulty applies to program addresses in branches, jumps and calls, and also applies to literals. ARM''s solution for literals is to use a mantissa-plus-exponent format, whereby the shifter is used to place a bit pattern anywhere in the word. You can't always get the arbitrary 32 bit constants you might want, but you can often get what you need.

Thu Sep 29, 2016 1:22 pm
 [ 1 post ] 

Who is online

Users browsing this forum: AhrefsBot, BLEXBot, CCBot and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software