`preg` register is unrecognized in inline asm

I'm trying to use the p_ register in the inline asm (playground):

fn main() {

    println!("running");
    
    unsafe {
        std::arch::asm!(
            "",
            out("preg") _
        )
    }
}

But I'm getting error: invalid register preg: unknown register. The docs say that Rust should be aware of this register class.

The compiler can emit the assembly using these registers and its executes just fine.

Are the docs wrong or am I missing something? Given the error, does that guarantee that these registers will not be emitted by rustc?

According to that page register classes should not be enclosed in quotes, only literal register names. The solution should thus be to remove the quotes.

You're correct, thanx!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.