Decode: Fix capability width mode-dependent LR/SC
All of St, Amo, Lr and Sc use the normal 3-bit encoding for the width; rather than add Lr and Sc to the list, switch it just to exclude Ld as the special case that's handled by the other half of the expression. Previously LR.C and SC.C were decoded as LR.BU and SC.BU.
This commit is contained in:
@@ -92,7 +92,7 @@ function Maybe#(MemInst) decodeMemInst(Instruction inst, Bool cap_mode);
|
||||
illegalInst = True;
|
||||
end
|
||||
|
||||
Bool capWidth = ((mem_func == St || mem_func == Amo) && funct3 == f3_SQ)
|
||||
Bool capWidth = (mem_func != Ld && funct3 == f3_SQ)
|
||||
|| (opcode == opcMiscMem && funct3 == f3_LQ);
|
||||
|
||||
if (capWidth && amo_func != None && amo_func != Swap) begin
|
||||
|
||||
Reference in New Issue
Block a user