From cfd24c7a50ed2f5233c89e7df908368f792aefef Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Mon, 28 Mar 2022 00:43:18 -0700 Subject: [PATCH] Remove software_interrupt! macro Given that const generics are stable but const values in asm! are not, having a macro in addtion to a generic function isn't really useful. Signed-off-by: Joe Richey --- src/instructions/interrupts.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/instructions/interrupts.rs b/src/instructions/interrupts.rs index a1e526d7c..2176d42b1 100644 --- a/src/instructions/interrupts.rs +++ b/src/instructions/interrupts.rs @@ -133,18 +133,6 @@ pub fn int3() { } } -/// Generate a software interrupt by invoking the `int` instruction. -/// -/// This currently needs to be a macro because the `int` argument needs to be an -/// immediate. This macro will be replaced by a generic function when support for -/// const generics is implemented in Rust. -#[macro_export] -macro_rules! software_interrupt { - ($x:expr) => {{ - asm!("int {id}", id = const $x, options(nomem, nostack)); - }}; -} - /// Generate a software interrupt by invoking the `int` instruction. /// /// ## Safety