aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorSimon Tatham <simon.tatham@arm.com>2025-09-26 09:18:59 +0100
committerGitHub <noreply@github.com>2025-09-26 09:18:59 +0100
commit2cacf7117ba0fb7c134413a1a51302f8d6649052 (patch)
tree120e8534685d299f970215e2e30c257f892ec567 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent368d59986e769511437781fdd45cd5f787f35980 (diff)
downloadllvm-2cacf7117ba0fb7c134413a1a51302f8d6649052.zip
llvm-2cacf7117ba0fb7c134413a1a51302f8d6649052.tar.gz
llvm-2cacf7117ba0fb7c134413a1a51302f8d6649052.tar.bz2
[ARM] Improve comment on the 'J' inline asm modifier. (#160712)
An inline asm constraint "Jr", in AArch32, means that if the input value is a compile-time constant in the range -4095 to +4095, then it can be inserted into the assembly language as an immediate operand, and otherwise it will be placed in a register. The comment in the Arm backend said "It is not clear what this constraint is intended for". I believe the answer is that that range of immediate values are the ones you can use in a LDR or STR instruction. So it's suitable for cases like this: asm("str %0,[%1,%2]" : : "r"(data), "r"(base), "Jr"(offset) : "memory"); in the same way that the "Ir" constraint is suitable for the immediate in a data-processing instruction such as ADD or EOR.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions