View unanswered posts | View active topics It is currently Thu Mar 28, 2024 6:57 pm



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

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1780
.
I had a use for this calculator the other day:
https://alisdair.mcdiarmid.org/arm-imme ... -encoding/

Image

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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: SemrushBot and 12 guests


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

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