agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
vm_io.h File Reference
#include <zrtos/types.h>
Include dependency graph for vm_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _zrtos_vm_io_source_address_t
 

Typedefs

typedef struct _zrtos_vm_io_source_address_t zrtos_vm_io_address_t
 

Enumerations

enum  zrtos_vm_io_source_t {
  ZRTOS_VM_IO_SOURCE__A_NONE = 0x00,
  ZRTOS_VM_IO_SOURCE__A_STACK = 0x10,
  ZRTOS_VM_IO_SOURCE__A_PROGRAM = 0x20,
  ZRTOS_VM_IO_SOURCE__A_ADDRESS = 0x30,
  ZRTOS_VM_IO_SOURCE__B_NONE = (0x00 << 2),
  ZRTOS_VM_IO_SOURCE__B_STACK = (0x10 << 2),
  ZRTOS_VM_IO_SOURCE__B_PROGRAM = (0x20 << 2),
  ZRTOS_VM_IO_SOURCE__B_ADDRESS = (0x30 << 2),
  ZRTOS_VM_IO_SOURCE__MASK = 0xF0
}
 
enum  zrtos_vm_io_type_t {
  ZRTOS_VM_IO_TYPE__UINT8 = 0x00,
  ZRTOS_VM_IO_TYPE__UINT16 = 0x01,
  ZRTOS_VM_IO_TYPE__UINT32 = 0x03,
  ZRTOS_VM_IO_TYPE__UINT64 = 0x07,
  ZRTOS_VM_IO_TYPE__INT8 = 0x08,
  ZRTOS_VM_IO_TYPE__INT16 = 0x09,
  ZRTOS_VM_IO_TYPE__INT32 = 0x0B,
  ZRTOS_VM_IO_TYPE__FLOAT = 0x0D,
  ZRTOS_VM_IO_TYPE__DOUBLE = 0x0E,
  ZRTOS_VM_IO_TYPE__INT64 = 0x0F,
  ZRTOS_VM_IO_TYPE__MASK = 0x0F
}
 
enum  zrtos_vm_io_address_type_t {
  ZRTOS_VM_IO_ADDRESS_TYPE__MIN = 0x00,
  ZRTOS_VM_IO_ADDRESS_TYPE__DISPLACEMENT_ABSOLUTE = 0x00,
  ZRTOS_VM_IO_ADDRESS_TYPE__DISPLACEMENT_RELATIVE = 0x10,
  ZRTOS_VM_IO_ADDRESS_TYPE__DISPLACEMENT_MASK = 0x10,
  ZRTOS_VM_IO_ADDRESS_TYPE__IS_NEGATIVE = 0x80,
  ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_PROGRAM = 0x20,
  ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_STACK = 0x40,
  ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_MASK = 0x60,
  ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_1 = 0x01,
  ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_2 = 0x02,
  ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_4 = 0x04,
  ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_8 = 0x08,
  ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_MASK = 0x0F,
  ZRTOS_VM_IO_ADDRESS_TYPE__MAX = 0xFF
}
 

Functions

bool zrtos_vm_io_type__is_uint (zrtos_vm_io_type_t type)
 
bool zrtos_vm_io_type__is_int (zrtos_vm_io_type_t type)
 
bool zrtos_vm_io_type__is_float (zrtos_vm_io_type_t type)
 
bool zrtos_vm_io_type__is_double (zrtos_vm_io_type_t type)
 
size_t zrtos_vm_io_type__get_length (zrtos_vm_io_type_t type)
 
size_t zrtos_vm_io_address__get_address (zrtos_vm_io_address_t *thiz)
 
bool zrtos_vm_io_address__is_negative (zrtos_vm_io_address_t *thiz)
 
bool zrtos_vm_io_address__is_relative (zrtos_vm_io_address_t *thiz)
 
size_t zrtos_vm_io_address__get_length (zrtos_vm_io_address_t *thiz)
 
bool zrtos_vm_io_address__is_source_program (zrtos_vm_io_address_t *thiz)
 

Typedef Documentation

◆ zrtos_vm_io_address_t

Enumeration Type Documentation

◆ zrtos_vm_io_address_type_t

Enumerator
ZRTOS_VM_IO_ADDRESS_TYPE__MIN 
ZRTOS_VM_IO_ADDRESS_TYPE__DISPLACEMENT_ABSOLUTE 
ZRTOS_VM_IO_ADDRESS_TYPE__DISPLACEMENT_RELATIVE 
ZRTOS_VM_IO_ADDRESS_TYPE__DISPLACEMENT_MASK 
ZRTOS_VM_IO_ADDRESS_TYPE__IS_NEGATIVE 
ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_PROGRAM 
ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_STACK 
ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_MASK 
ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_1 
ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_2 
ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_4 
ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_8 
ZRTOS_VM_IO_ADDRESS_TYPE__LENGTH_MASK 
ZRTOS_VM_IO_ADDRESS_TYPE__MAX 

Definition at line 79 of file vm_io.h.

79  {
84 
86 
90 
zrtos_vm_io_address_type_t
Definition: vm_io.h:79

◆ zrtos_vm_io_source_t

Enumerator
ZRTOS_VM_IO_SOURCE__A_NONE 
ZRTOS_VM_IO_SOURCE__A_STACK 
ZRTOS_VM_IO_SOURCE__A_PROGRAM 
ZRTOS_VM_IO_SOURCE__A_ADDRESS 
ZRTOS_VM_IO_SOURCE__B_NONE 
ZRTOS_VM_IO_SOURCE__B_STACK 
ZRTOS_VM_IO_SOURCE__B_PROGRAM 
ZRTOS_VM_IO_SOURCE__B_ADDRESS 
ZRTOS_VM_IO_SOURCE__MASK 

Definition at line 17 of file vm_io.h.

◆ zrtos_vm_io_type_t

Enumerator
ZRTOS_VM_IO_TYPE__UINT8 
ZRTOS_VM_IO_TYPE__UINT16 
ZRTOS_VM_IO_TYPE__UINT32 
ZRTOS_VM_IO_TYPE__UINT64 
ZRTOS_VM_IO_TYPE__INT8 
ZRTOS_VM_IO_TYPE__INT16 
ZRTOS_VM_IO_TYPE__INT32 
ZRTOS_VM_IO_TYPE__FLOAT 
ZRTOS_VM_IO_TYPE__DOUBLE 
ZRTOS_VM_IO_TYPE__INT64 
ZRTOS_VM_IO_TYPE__MASK 

Definition at line 29 of file vm_io.h.

Function Documentation

◆ zrtos_vm_io_address__get_address()

size_t zrtos_vm_io_address__get_address ( zrtos_vm_io_address_t thiz)

Definition at line 106 of file vm_io.h.

106  {
107  return thiz->address;
108 }
Here is the caller graph for this function:

◆ zrtos_vm_io_address__get_length()

size_t zrtos_vm_io_address__get_length ( zrtos_vm_io_address_t thiz)

Definition at line 118 of file vm_io.h.

118  {
120 }
zrtos_vm_io_address_type_t type
Definition: vm_io.h:101
Here is the caller graph for this function:

◆ zrtos_vm_io_address__is_negative()

bool zrtos_vm_io_address__is_negative ( zrtos_vm_io_address_t thiz)

Definition at line 110 of file vm_io.h.

110  {
111  return (thiz->type & ZRTOS_VM_IO_ADDRESS_TYPE__IS_NEGATIVE) > 0;
112 }
zrtos_vm_io_address_type_t type
Definition: vm_io.h:101
Here is the caller graph for this function:

◆ zrtos_vm_io_address__is_relative()

bool zrtos_vm_io_address__is_relative ( zrtos_vm_io_address_t thiz)

Definition at line 114 of file vm_io.h.

Here is the caller graph for this function:

◆ zrtos_vm_io_address__is_source_program()

bool zrtos_vm_io_address__is_source_program ( zrtos_vm_io_address_t thiz)

Definition at line 122 of file vm_io.h.

122  {
123  return (thiz->type & ZRTOS_VM_IO_ADDRESS_TYPE__SOURCE_PROGRAM) > 0;
124 }
zrtos_vm_io_address_type_t type
Definition: vm_io.h:101
Here is the caller graph for this function:

◆ zrtos_vm_io_type__get_length()

size_t zrtos_vm_io_type__get_length ( zrtos_vm_io_type_t  type)

Definition at line 68 of file vm_io.h.

68  {
69  size_t length = type;
70  length += 1;
71  if(type == ZRTOS_VM_IO_TYPE__FLOAT){
72  length = 4;
73  }else if(type == ZRTOS_VM_IO_TYPE__DOUBLE){
74  length = 8;
75  }
76  return length;
77 }
Here is the caller graph for this function:

◆ zrtos_vm_io_type__is_double()

bool zrtos_vm_io_type__is_double ( zrtos_vm_io_type_t  type)

Definition at line 64 of file vm_io.h.

64  {
65  return type == ZRTOS_VM_IO_TYPE__DOUBLE;
66 }
Here is the caller graph for this function:

◆ zrtos_vm_io_type__is_float()

bool zrtos_vm_io_type__is_float ( zrtos_vm_io_type_t  type)

Definition at line 60 of file vm_io.h.

60  {
61  return type == ZRTOS_VM_IO_TYPE__FLOAT;
62 }
Here is the caller graph for this function:

◆ zrtos_vm_io_type__is_int()

bool zrtos_vm_io_type__is_int ( zrtos_vm_io_type_t  type)

Definition at line 53 of file vm_io.h.

53  {
54  return (type >= ZRTOS_VM_IO_TYPE__INT8
55  && type <= ZRTOS_VM_IO_TYPE__INT32
56  )|| type == ZRTOS_VM_IO_TYPE__INT64
57  ;
58 }

◆ zrtos_vm_io_type__is_uint()

bool zrtos_vm_io_type__is_uint ( zrtos_vm_io_type_t  type)

Definition at line 47 of file vm_io.h.

47  {
48  return type >= ZRTOS_VM_IO_TYPE__UINT8
49  && type <= ZRTOS_VM_IO_TYPE__UINT64
50  ;
51 }
Here is the caller graph for this function: