Skip to content

Commit 3f12e4b

Browse files
authored
Rollup merge of #103021 - GuillaumeGomez:constraint-pages, r=Amanieu
Add links to relevant pages to find constraint information I think it can be quite helpful to find this information more quickly. r? `@Amanieu`
2 parents cf67565 + 2214748 commit 3f12e4b

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_codegen_llvm/src

1 file changed

+4
-0
lines changed

compiler/rustc_codegen_llvm/src/asm.rs

+4
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ fn reg_to_llvm(reg: InlineAsmRegOrRegClass, layout: Option<&TyAndLayout<'_>>) ->
551551
format!("{{{}}}", reg.name())
552552
}
553553
}
554+
// The constraints can be retrieved from
555+
// https://llvm.org/docs/LangRef.html#supported-constraint-code-list
554556
InlineAsmRegOrRegClass::RegClass(reg) => match reg {
555557
InlineAsmRegClass::AArch64(AArch64InlineAsmRegClass::reg) => "r",
556558
InlineAsmRegClass::AArch64(AArch64InlineAsmRegClass::vreg) => "w",
@@ -624,6 +626,8 @@ fn modifier_to_llvm(
624626
reg: InlineAsmRegClass,
625627
modifier: Option<char>,
626628
) -> Option<char> {
629+
// The modifiers can be retrieved from
630+
// https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers
627631
match reg {
628632
InlineAsmRegClass::AArch64(AArch64InlineAsmRegClass::reg) => modifier,
629633
InlineAsmRegClass::AArch64(AArch64InlineAsmRegClass::vreg)

0 commit comments

Comments
 (0)