GNU Info

Info Node: (as.info)SH64-Addressing

(as.info)SH64-Addressing


Prev: SH64-Regs Up: SH64 Syntax
Enter node , (file) or (file)node

Addressing Modes
................

   SH64 operands consist of either a register or immediate value.  The
immediate value can be a constant or label reference (or portion of a
label reference), as in this example:

     	movi	4,r2
     	pt	function, tr4
     	movi	(function >> 16) & 65535,r0
     	shori	function & 65535, r0
     	ld.l	r0,4,r0

   Instruction label references can reference labels in either SHmedia
or SHcompact.  To differentiate between the two, labels in SHmedia
sections will always have the least significant bit set (i.e. they will
be odd), which SHcompact labels will have the least significant bit
reset (i.e. they will be even).  If you need to reference the actual
address of a label, you can use the `datalabel' modifier, as in this
example:

     	.long	function
     	.long	datalabel function

   In that example, the first longword may or may not have the least
significant bit set depending on whether the label is an SHmedia label
or an SHcompact label.  The second longword will be the actual address
of the label, regardless of what type of lable it is.


automatically generated by info2www version 1.2.2.9