Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
Assembly Context Helpers

Overview

Macros to abstract XLEN (32 vs 64-bit) for inline assembly.

Note
These are used inside trap_entry to save/restore registers width-agnostically.

Macros

#define STORE   "sw"
 Store Word (32-bit).
#define LOAD   "lw"
 Load Word (32-bit).
#define WORD   4
 Word size in bytes.
#define STR1(x)
 Context Helper Only.
#define STR(x)
 Context Helper Only.

Macro Definition Documentation

◆ LOAD

#define LOAD   "lw"

#include <mtrap.h>

Load Word (32-bit).

Definition at line 63 of file mtrap.h.

◆ STORE

#define STORE   "sw"

#include <mtrap.h>

Store Word (32-bit).

Definition at line 62 of file mtrap.h.

◆ STR

#define STR ( x)

#include <mtrap.h>

Value:
STR1(x)
#define STR1(x)
Context Helper Only.
Definition mtrap.h:67

Context Helper Only.

Definition at line 68 of file mtrap.h.

◆ STR1

#define STR1 ( x)

#include <mtrap.h>

Value:
#x

Context Helper Only.

Definition at line 67 of file mtrap.h.

◆ WORD

#define WORD   4

#include <mtrap.h>

Word size in bytes.

Definition at line 64 of file mtrap.h.