• Pierre Langlois's avatar
    [arm] Restrict usage of pc-relative LDR. · 5361c57b
    Pierre Langlois authored
    Disallow using the PC as a base in LDR and instead provide a dedicated assembler
    method for pc-relative loads. The reason for this is that the generic
    `Assembler::ldr` method may decide to generate more instructions if the offset
    is out of range, and if the PC was the base, we would get surprising
    results. For example:
    
    ~~~
    ldr r0, [pc, #0xcabba9e]
    ~~~
    
    is not equivalent to:
    
    ~~~
    movw ip, #0xba9e
    movt ip, #0xcab
    ldr r0, [pc, ip]
    ~~~
    
    since the reference to the PC has moved down two instructions!
    
    We could teach the assembler to handle those cases correctly, but pc-relative
    loads are used in specific cases only so that's not necessary.
    
    As a drive-by, remove a reference to code aging.
    
    Bug: 
    Change-Id: I586d83a418db52cf28d3b524f889bf40f077998a
    Reviewed-on: https://chromium-review.googlesource.com/847008Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
    Cr-Commit-Position: refs/heads/master@{#50475}
    5361c57b
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...