From d4a83576e4a187b9468ce72f10703ce640d00b23 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 11 Aug 2018 07:22:38 -0700 Subject: [PATCH] Add a few miscellaneous comments. --- lib/codegen/src/isa/x86/abi.rs | 1 + lib/codegen/src/legalizer/call.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/codegen/src/isa/x86/abi.rs b/lib/codegen/src/isa/x86/abi.rs index d0305d918b..21796e2a10 100644 --- a/lib/codegen/src/isa/x86/abi.rs +++ b/lib/codegen/src/isa/x86/abi.rs @@ -217,6 +217,7 @@ fn callee_saved_gprs(isa: &TargetIsa) -> &'static [RU] { } } +/// Get the set of callee-saved registers that are used. fn callee_saved_gprs_used(isa: &TargetIsa, func: &ir::Function) -> RegisterSet { let mut all_callee_saved = RegisterSet::empty(); for reg in callee_saved_gprs(isa) { diff --git a/lib/codegen/src/legalizer/call.rs b/lib/codegen/src/legalizer/call.rs index 365ba3988d..21753d19db 100644 --- a/lib/codegen/src/legalizer/call.rs +++ b/lib/codegen/src/legalizer/call.rs @@ -8,7 +8,8 @@ use flowgraph::ControlFlowGraph; use ir::{self, InstBuilder}; use isa::TargetIsa; -/// Expand a `call` instruction. +/// Expand a `call` instruction. This lowers it to a `call_indirect`, which +/// is only done if the ABI doesn't support direct calls. pub fn expand_call( inst: ir::Inst, func: &mut ir::Function,