summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2018-11-12 14:25:07 +0000
committerAlex Bradbury <asb@lowrisc.org>2018-11-12 14:25:07 +0000
commit9c03e4cacdaa75d30b8868f3a94d997ee79bed96 (patch)
treebd979a9b1ebd63b0678aff5e3dbd4ba18c84c343 /clang/lib/CodeGen/CGStmt.cpp
parenta395e2df569cd287f2765180faf6bd43e14221f6 (diff)
downloadbcm5719-llvm-9c03e4cacdaa75d30b8868f3a94d997ee79bed96.tar.gz
bcm5719-llvm-9c03e4cacdaa75d30b8868f3a94d997ee79bed96.zip
[RISCV] Support .option relax and .option norelax
This extends the .option support from D45864 to enable/disable the relax feature flag from D44886 During parsing of the relax/norelax directives, the RISCV::FeatureRelax feature bits of the SubtargetInfo stored in the AsmParser are updated appropriately to reflect whether relaxation is currently enabled in the parser. When an instruction is parsed, the parser checks if relaxation is currently enabled and if so, gets a handle to the AsmBackend and sets the ForceRelocs flag. The AsmBackend uses a combination of the original RISCV::FeatureRelax feature bits set by e.g -mattr=+/-relax and the ForceRelocs flag to determine whether to emit relocations for symbol and branch diffs. Diff relocations should therefore only not be emitted if the relax flag was not set on the command line and no instruction was ever parsed in a section with relaxation enabled to ensure correct diffs are emitted. Differential Revision: https://reviews.llvm.org/D46423 Patch by Lewis Revill. llvm-svn: 346655
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud