or1k: add definitions

master
Ariadne Conill 2022-02-13 08:57:36 +00:00
parent e26a93806e
commit 7fc08a6dc6
1 changed files with 22 additions and 0 deletions

22
arch/or1k/defs.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef __ARCH_OR1K_DEFS_H
#define __ARCH_OR1K_DEFS_H
#define REG_SZ (4)
#define MCONTEXT_GREGS (20)
#define REG_SP (1)
#define REG_FP (2)
#define REG_RA (9)
#define REG_SA (11)
#define REG_LR (14)
#define REG_PC (33)
#define REG_SR (34)
#define PC_OFFSET REG_OFFSET(REG_PC)
#define FETCH_LINKPTR(dest) \
asm("l.ori %0, r14, 0" :: "r" ((dest)))
#include "common-defs.h"
#endif