Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:multiasm:paarm:chapter_5_5 [2026/02/27 11:21] jtokarzen:multiasm:paarm:chapter_5_5 [2026/02/27 16:17] (current) – [Other addressing modes] jtokarz
Line 50: Line 50:
 The load and store instructions also work with 32-bit registers. Load instructions include additional options that can be used not only for data loading but also for other operations on the data in the register. For example, to load a single data byte into the register, use the ''<fc #800000>LDRB</fc>'' instruction. If a byte holds a negative value, the entire register must preserve the sign – this is called sign extension and is performed with the ''<fc #800000>LDRSB</fc>'' instruction. Like, for example, the value -100 in hexadecimal is ''<fc #ffa500>0x9C</fc>'' (in binary 2’s complement 10011100). The load and store instructions also work with 32-bit registers. Load instructions include additional options that can be used not only for data loading but also for other operations on the data in the register. For example, to load a single data byte into the register, use the ''<fc #800000>LDRB</fc>'' instruction. If a byte holds a negative value, the entire register must preserve the sign – this is called sign extension and is performed with the ''<fc #800000>LDRSB</fc>'' instruction. Like, for example, the value -100 in hexadecimal is ''<fc #ffa500>0x9C</fc>'' (in binary 2’s complement 10011100).
  
-{{ :en:multiasm:paarm:ldrsbw0.png?600 |}}+<figure ldrsbw0> 
 +{{ :en:multiasm:paarm:ldrsbw0.png?600 |Load Register Signed Byte for 32-bit register}} 
 +<caption>Load Register Signed Byte for 32-bit register</caption> 
 +</figure>
  
 The data are loaded from memory, and the sign bit is preserved only for a 32-bit wide value when the destination register is addressed as a 32-bit register. If the 64-bit register is used as the destination, the sign bit is preserved in the entire 64-bit register. The data are loaded from memory, and the sign bit is preserved only for a 32-bit wide value when the destination register is addressed as a 32-bit register. If the 64-bit register is used as the destination, the sign bit is preserved in the entire 64-bit register.
  
-{{ :en:multiasm:paarm:ldrsbx0.png?600 |}}+<figure ldrsbw0> 
 +{{ :en:multiasm:paarm:ldrbw0.png?600 |Load Register Signed Byte for 64-bit register}} 
 +<caption>Load Register Signed Byte for 64-bit register</caption> 
 +</figure>
  
 Zero extension is only available for 32-bit registers because the most significant bytes are cleared when a 32-bit register is written. Zero extension is only available for 32-bit registers because the most significant bytes are cleared when a 32-bit register is written.
  
-{{ :en:multiasm:paarm:ldrbw0.png?600 |}}+<figure ldrsbx0> 
 +{{ :en:multiasm:paarm:ldrsbx0.png?600 |Load Register Byte}} 
 +<caption>Load Register Byte</caption> 
 +</figure> 
 + 
 ====Complex addressing modes ==== ====Complex addressing modes ====
 This is not a real addressing mode, but some instructions allow the addressing to be a bit more complex. Loading from memory (or storing in it) data into the vector register. the LD1, LD2, LD3 and LD4 instructions loads vector register: This is not a real addressing mode, but some instructions allow the addressing to be a bit more complex. Loading from memory (or storing in it) data into the vector register. the LD1, LD2, LD3 and LD4 instructions loads vector register:
en/multiasm/paarm/chapter_5_5.1772184078.txt.gz · Last modified: by jtokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0