Skip to content
Permalink
Browse files

Add num-traits and i486-qtum.json for cross compiling

  • Loading branch information...
Earlz committed Sep 26, 2019
1 parent ed83a98 commit 4a3d32c50e7dc6c80b55a5f951786bb2647346c1
Showing with 34 additions and 2 deletions.
  1. +2 −0 Cargo.toml
  2. +24 −0 i486-qtum.json
  3. +8 −2 src/lib.rs
@@ -7,3 +7,5 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
num-traits = "0.2"
num-derive = "0.2"
@@ -0,0 +1,24 @@
{
"arch": "x86",
"cpu": "i486",
"data-layout": "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128",
"dynamic-linking": false,
"executables": true,
"has-elf-tls": false,
"has-rpath": false,
"is-builtin": false,
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"linker-is-gnu": false,
"llvm-target": "i486-unknown-none",
"max-atomic-width": 64,
"os": "qtum",
"position-independent-executables": false,
"target-c-int-width": "32",
"target-endian": "little",
"target-family": "unix",
"target-pointer-width": "32",
"vendor": "qtum",
"features": "-mmx,-sse,+soft-float"
}

@@ -1,15 +1,19 @@
#![no_std]

use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
//Testbench constants are included here as well, though they are not technically part of neutronstar

pub const NEUTRON_INTERRUPT:u8 = 0x40;
pub const EXIT_INTERRUPT:u8 = 0xF0;
pub const TESTBENCH_INTERRUPT:u8 = 0x50;

/// The system calls available using the NEUTRON_INTERRUPT
#[derive(FromPrimitive)]
pub enum NeutronSyscalls{
Invalid = 0,
/// Pushes a value to the SCCS
PushSCCS,
PushSCCS = 1,
/// Pops a value from the SCCS into a fixed size buffer
PopSCCS,
/// Peeks the value from the top of the SCCS into a fixed size buffer
@@ -26,9 +30,11 @@ pub enum NeutronSyscalls{
DepthOfSCCS
}
/// The system calls available using the TESTBENCH_INTERRUPT
#[derive(FromPrimitive)]
pub enum TestbenchSyscalls{
Invalid = 0,
/// Logs an error message
LogError,
LogError = 1,
/// Logs an info message
LogInfo,
/// Logs a debug message

0 comments on commit 4a3d32c

Please sign in to comment.
You can’t perform that action at this time.