Skip to content

Commit cfce5b2

Browse files
jcai19Jian Cai
authored andcommitted
[ARM] support symbolic expression as immediate in memory instructions
Currently the ARM backend only accpets constant expressions as the immediate operand in load and store instructions. This allows the result of symbolic expressions to be used in memory instructions. For example, 0: .space 2048 strb r2, [r0, #(.-0b)] would be assembled into the following instructions. strb r2, [r0, #2048] This only adds support to ldr, ldrb, str, and strb in arm mode to address the build failure of Linux kernel for now, but should facilitate adding support to similar instructions in the future if the need arises. Link: ClangBuiltLinux/linux#1329 Reviewed By: peter.smith, nickdesaulniers Differential Revision: https://reviews.llvm.org/D98916
1 parent 661cc71 commit cfce5b2

File tree

5 files changed

+332
-190
lines changed

5 files changed

+332
-190
lines changed

0 commit comments

Comments
 (0)