Allow compiling on x86_64 for publishing.

This commit is contained in:
David Craven 2017-11-18 08:46:19 +01:00
parent e864581828
commit 467327cb15
No known key found for this signature in database
GPG Key ID: 33B9E9FDE28D2C23
1 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
//! Functions for accessing Control and Status Registers
#[cfg(target_arch = "riscv")]
macro_rules! csr_asm {
($op:ident, $csr:expr, $value:expr) => (
{
@ -16,6 +17,14 @@ macro_rules! csr_asm {
)
}
#[cfg(not(target_arch = "riscv"))]
macro_rules! csr_asm {
($op:ident, $csr:expr, $value:expr) => {
0
}
}
macro_rules! r {
($MOD:ident, $TYPE:ident, $CSR:expr) => (
pub struct R {