43
2.5 Word Alignment
2.5
Word Alignment
Since instructions and data are accessed in bytes, mapping addresses vary depending
on instruction length or data width.
■
Program Access
A program running in the FR series must be placed at an address consisting of a multiple of
two.
Bit 0 of the program counter (PC) is set to 0 when the PC is updated according to instruction
execution. Bit 0 may be set to 1 only when an odd-numbered address is specified for the
branch destination address. Even at this event, bit 0 is invalid and an instruction must be
placed at an address consisting of a multiple of two.
No odd-numbered address exception occurs.
■
Data Access
When data access is made in the FR series, address alignment is performed forcibly in
accordance with access width as follows:
•
Word access: Addresses are aligned in multiples of four (the two least significant bits are
forcibly set to 00).
•
Half-word access: Addresses are aligned in multiples of two (on least significant bit is
forcibly set to 0).
•
Byte access: -
As explained above, some bits are forcibly set to 0 when a word or half-word data access is
made, but this is applicable only to the calculation result of an effective address. For instance,
in @(R13, Ri) addressing mode, the register before addition is used as is for calculation (even if
the least significant bit is 1), and the least significant bit of the result of addition is masked.
Thus, the register before calculation is not masked.
[Example] LD @(R13, R2), R0
R13
R2
00002222
H
00000003
H
00002225
H
00002224
H
Result of addition
Address pin
Forced masking of two LSBs
Summary of Contents for MB91F109
Page 2: ......
Page 3: ...FUJITSU LIMITED FR30 32 Bit Microcontroller MB91F109 Hardware Manual ...
Page 4: ......
Page 10: ...vi ...
Page 24: ...xx ...
Page 96: ...72 CHAPTER 2 CPU ...
Page 224: ...200 CHAPTER 4 BUS INTERFACE ...
Page 234: ...210 CHAPTER 5 I O PORTS ...
Page 268: ...244 CHAPTER 9 U TIMER ...
Page 290: ...266 CHAPTER 10 UART ...
Page 314: ...290 CHAPTER 12 16 BIT RELOAD TIMER ...
Page 322: ...298 CHAPTER 13 BIT SEARCH MODULE ...
Page 392: ...368 CHAPTER 16 FLASH MEMORY ...
Page 432: ...408 APPENDIX E Instructions F Table E 2 Instruction Formats OP rel11 5 11 ...
Page 448: ...424 APPENDIX E Instructions ...
Page 449: ...425 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 458: ...434 INDEX ...
Page 460: ......
Page 461: ...FUJITSU SEMICONDUCTOR FR30 32 Bit Microcontroller MB91F109 Hardware Manual ...