Skip to content

Commit 959ebd6

Browse files
Rollup merge of #43480 - dhduvall:sparc-blake2b, r=eddyb
Constrain the layout of Blake2bCtx for proper SPARC compilation On SPARC, optimization fuel ends up emitting incorrect load and store instructions for the transmute() call in blake2b_compress(). If we force Blake2bCtx to be repr(C), the problem disappears. Fixes #43346
2 parents ed09d6d + f0fda53 commit 959ebd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_data_structures/blake2b.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use std::mem;
2424
use std::slice;
2525

26+
#[repr(C)]
2627
pub struct Blake2bCtx {
2728
b: [u8; 128],
2829
h: [u64; 8],

0 commit comments

Comments
 (0)