Closed
Description
The following code:
pub fn log(x: f64) -> f64
{
let out: f64;
unsafe {
asm!("fldln2
fldl $1
fyl2x" : "=t"(out) : "m"(x));}
out
}
errors with the message:
error: couldn't allocate output register for constraint 't' at line 27
The constraint t
refers to the top of the floating point stack in GCC's inline assembly, and the unsafe guide says our constraints mirror theirs.
Metadata
Metadata
Assignees
Labels
No labels