Commit 3d640fef authored by Zheng Liu's avatar Zheng Liu Committed by V8 LUCI CQ

[riscv64] Fix IsIllegalInstruction function

Check whether the right most 16 bits are all-zero.

Change-Id: I13bb8856888cbabc19c1f9354048f05ff9e4aacb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2983839Reviewed-by: 's avatarJi Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#75343}
parent c1190cf9
......@@ -738,7 +738,7 @@ class InstructionBase {
};
inline bool IsIllegalInstruction() const {
uint8_t FirstHalfWord = *reinterpret_cast<const uint16_t*>(this);
uint16_t FirstHalfWord = *reinterpret_cast<const uint16_t*>(this);
return FirstHalfWord == 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment