-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(csr): check inst exception for Zicbom & Zicboz #537
base: master
Are you sure you want to change the base?
Conversation
@Tang-Haojin May this PR should be merged into master before release? |
src/isa/riscv64/instr/rvcbo/exec.h
Outdated
@@ -23,6 +23,13 @@ | |||
#define CACHE_BLOCK_OPS (CACHE_BLOCK_SIZE / CACHE_OP_SPLIT_SIZE) | |||
|
|||
def_EHelper(cbo_zero) { | |||
// check illegal instruction exception | |||
if(!cpu.v && ((cpu.mode != MODE_M && !menvcfg->cbze) || (cpu.mode == MODE_U && !senvcfg->cbze))){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, already fix it.
src/isa/riscv64/instr/rvcbo/exec.h
Outdated
@@ -23,6 +23,13 @@ | |||
#define CACHE_BLOCK_OPS (CACHE_BLOCK_SIZE / CACHE_OP_SPLIT_SIZE) | |||
|
|||
def_EHelper(cbo_zero) { | |||
// check illegal instruction exception | |||
if((cpu.mode != MODE_M && !menvcfg->cbze) || (cpu.mode == MODE_U && !senvcfg->cbze)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, ModeU should be ModeHU. if ((cpu.mode != MODE_M && !menvcfg->cbze) || (!cpu.v && cpu.mode == MODE_U && !senvcfg->cbze)) {
No description provided.