Add some comments to PassMode

This commit is contained in:
bjorn3 2021-01-23 12:57:35 +01:00
parent a93dace55c
commit c3367dbc6f
1 changed files with 6 additions and 0 deletions

View File

@ -27,10 +27,16 @@ mod x86_win64;
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum PassMode {
/// Ignore the argument.
///
/// The argument is either uninhabited or a ZST.
Ignore,
/// Pass the argument directly.
///
/// The argument has a layout abi of `Scalar` or `Vector`.
Direct(ArgAttributes),
/// Pass a pair's elements directly in two arguments.
///
/// The argument has a layout abi of `ScalarPair`.
Pair(ArgAttributes, ArgAttributes),
/// Pass the argument after casting it, to either
/// a single uniform or a pair of registers.