summaryrefslogtreecommitdiffstats
path: root/clang/lib/ASTMatchers/Dynamic
diff options
context:
space:
mode:
authorColin LeMahieu <colinl@codeaurora.org>2016-02-16 20:38:17 +0000
committerColin LeMahieu <colinl@codeaurora.org>2016-02-16 20:38:17 +0000
commitecef1d9cbccf8b82f1282e9296af9277748a9169 (patch)
tree65715b41febc3588f887bc7e8750dd77ae443412 /clang/lib/ASTMatchers/Dynamic
parent94f127e84a871c490db37f382e225508542a1dc1 (diff)
downloadbcm5719-llvm-ecef1d9cbccf8b82f1282e9296af9277748a9169.tar.gz
bcm5719-llvm-ecef1d9cbccf8b82f1282e9296af9277748a9169.zip
[Hexagon] Adding relocation for code size, cold path optimization allowing a 23-bit 4-byte aligned relocation to be a valid instruction encoding.
The usual way to get a 32-bit relocation is to use a constant extender which doubles the size of the instruction, 4 bytes to 8 bytes. Another way is to put a .word32 and mix code and data within a function. The disadvantage is it's not a valid instruction encoding and jumping over it causes prefetch stalls inside the hardware. This relocation packs a 23-bit value in to an "r0 = add(rX, #a)" instruction by overwriting the source register bits. Since r0 is the return value register, if this instruction is placed after a function call which return void, r0 will be filled with an undefined value, the prefetch won't be confused, and the callee can access the constant value by way of the link register. llvm-svn: 261006
Diffstat (limited to 'clang/lib/ASTMatchers/Dynamic')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud