From 7ab3c8955a771409e18026a6211dac0060ca5d20 Mon Sep 17 00:00:00 2001 From: Lioncache Date: Sat, 13 Jan 2024 12:06:28 -0500 Subject: [PATCH] registers: Document non-explicitness of PushPopList --- include/biscuit/registers.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/biscuit/registers.hpp b/include/biscuit/registers.hpp index eda9cf9..6a74b8c 100644 --- a/include/biscuit/registers.hpp +++ b/include/biscuit/registers.hpp @@ -279,6 +279,9 @@ class PushPopList final { GPR end; }; + // Deliberately non-explicit to allow for convenient instantiation at usage sites. + // e.g. Rather than CM.POP(PushPopList{ra, {s0, s2}}, 16), we can just have the + // usage be transparent like CM.POP({ra, {s0, 2}}, 16). Nice and compact! constexpr PushPopList(GPR ra_reg, const Range& range = {}) noexcept : m_bitmask{BuildBitmask(range)} { BISCUIT_ASSERT(ra_reg == ra);