Force FieldT alignment

This commit is contained in:
Sean Bowe 2016-01-22 21:18:52 -07:00
parent 710059b779
commit d0b589749a
2 changed files with 6 additions and 2 deletions

@ -12,9 +12,13 @@ extern "C" {
fn tinysnark_fieldt_add(a: FieldT, b: FieldT) -> FieldT; fn tinysnark_fieldt_add(a: FieldT, b: FieldT) -> FieldT;
} }
#[derive(Copy, Clone, Debug)]
#[repr(simd)]
struct EightBytes(u64);
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[repr(C)] #[repr(C)]
pub struct FieldT([u8; 32]); pub struct FieldT([u8; 32], [EightBytes; 0]);
impl FieldT { impl FieldT {
#[inline(always)] #[inline(always)]

@ -1,4 +1,4 @@
#![feature(box_syntax)] #![feature(box_syntax, repr_simd)]
#![allow(improper_ctypes)] #![allow(improper_ctypes)]
//#![cfg_attr(test, feature(test))] //#![cfg_attr(test, feature(test))]
extern crate libc; extern crate libc;