From 47a1d9d6fd48229961edf76b789328dc99a19c6c Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 6 Dec 2020 13:50:27 -0800 Subject: fix an off by one in non-temporal hint selection thank you @The6P4C for finding and reporting! --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 16a9af8..ea850aa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1249,7 +1249,7 @@ impl fmt::Display for Instruction { // hint bits of `00` indicate no prefetch hint if hint != 0 { f.write_str( - [".nt1", ".nt2", ".nt3"][hint as usize] + [".nt1", ".nt2", ".nt3"][hint as usize - 1] )?; } } -- cgit v1.1