/***************************************************************************
- * Copyright (C) 2013 by Andes Technology *
+ * Copyright (C) 2013 Andes Technology *
* Hsiangkai Wang <hkwang@andestech.com> *
* *
* This program is free software; you can redistribute it and/or modify *
#define NDS32_REGISTER_DISABLE (0x0)
enum nds32_reg_number_s {
- /* general registers */
- R0 = 0,
+ R0 = 0, /* general registers */
R1,
R2,
R3,
D1HI,
ITB,
IFC_LP,
-
- /* system registers */
- CR0,
+ CR0, /* system registers */
CR1,
CR2,
CR3,
IR23,
IR24,
IR25,
+ IR26,
+ IR27,
+ IR28,
+ IR29,
+ IR30,
MR0,
MR1,
MR2,
IDR0,
IDR1,
SECUR0,
-
- /* audio registers */
- D0L24,
+ D0L24, /* audio registers */
D1L24,
I0,
I1,
CBE1,
CBE2,
CBE3,
-
- /* fpu */
- FPCSR,
+ FPCSR, /* fpu */
FPCFG,
FS0,
FS1,
uint8_t size;
};
+struct nds32_reg_exception_s {
+ uint32_t reg_num;
+ uint32_t ex_value_bit_pos;
+ uint32_t ex_value_mask;
+ uint32_t ex_value;
+};
+
void nds32_reg_init(void);
uint32_t nds32_reg_sr_index(uint32_t number);
enum nds32_reg_type_s nds32_reg_type(uint32_t number);
uint8_t nds32_reg_size(uint32_t number);
const char *nds32_reg_simple_name(uint32_t number);
const char *nds32_reg_symbolic_name(uint32_t number);
+bool nds32_reg_exception(uint32_t number, uint32_t value);
#endif