forked from M-Labs/artiq
runtime: remove #[repr(simd)] hack.
This commit is contained in:
parent
7687a34285
commit
b443fbd8f7
|
@ -5,18 +5,13 @@ use analyzer_proto::*;
|
||||||
|
|
||||||
const BUFFER_SIZE: usize = 512 * 1024;
|
const BUFFER_SIZE: usize = 512 * 1024;
|
||||||
|
|
||||||
// hack until https://github.com/rust-lang/rust/issues/33626 is fixed
|
#[repr(align(64))]
|
||||||
#[repr(simd)]
|
|
||||||
struct Align64(u64, u64, u64, u64, u64, u64, u64, u64);
|
|
||||||
|
|
||||||
struct Buffer {
|
struct Buffer {
|
||||||
data: [u8; BUFFER_SIZE],
|
data: [u8; BUFFER_SIZE],
|
||||||
__alignment: [Align64; 0]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static mut BUFFER: Buffer = Buffer {
|
static mut BUFFER: Buffer = Buffer {
|
||||||
data: [0; BUFFER_SIZE],
|
data: [0; BUFFER_SIZE]
|
||||||
__alignment: []
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fn arm() {
|
fn arm() {
|
||||||
|
@ -68,9 +63,6 @@ fn worker(stream: &mut TcpStream) -> io::Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn thread(io: Io) {
|
pub fn thread(io: Io) {
|
||||||
// verify that the hack above works
|
|
||||||
assert!(::core::mem::align_of::<Buffer>() == 64);
|
|
||||||
|
|
||||||
let listener = TcpListener::new(&io, 65535);
|
let listener = TcpListener::new(&io, 65535);
|
||||||
listener.listen(1382).expect("analyzer: cannot listen");
|
listener.listen(1382).expect("analyzer: cannot listen");
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![feature(compiler_builtins_lib, alloc, repr_simd, lang_items, const_fn, global_allocator)]
|
#![feature(compiler_builtins_lib, alloc, lang_items, global_allocator, repr_align, attr_literals)]
|
||||||
|
|
||||||
extern crate compiler_builtins;
|
extern crate compiler_builtins;
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
Loading…
Reference in New Issue