I am trying to read some xtensa assembly code and am stumped by the L32R instruction:
E.g. given the following line:
0000 2f04 <my_func>:
2f0c: ffef21 l32r a2, 2ec8
Which address does this load?
I am trying to read some xtensa assembly code and am stumped by the L32R instruction:
E.g. given the following line:
0000 2f04 <my_func>:
2f0c: ffef21 l32r a2, 2ec8
Which address does this load?
Copyright © 2021 Jogjafile Inc.
The Xtensa Instruction Set Architecture Reference Manual manual states on page 382 that for
l32rthe address is calculated as follows:So in continuing above example; manipulation of the constant:
Manipulation of the PC:
calculation of virtual address:
So discarding everything beyond 16-bit:
2ec8