You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/std/isa/isa/globals.isa
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2569,8 +2569,8 @@ function read_memory {
2569
2569
# misaligned, must break into multiple reads
2570
2570
if (MISALIGNED_SPLIT_STRATEGY == "by_byte") {
2571
2571
Bits<LEN> result = 0;
2572
-
for (U32 I = 0; I <= (LEN/8); I++) {
2573
-
result = result | (read_memory_aligned<8>(virtual_address + I, encoding) << (8*I));
2572
+
for (U32 I = 0; I < (LEN/8); I++) {
2573
+
result = result | (read_memory_aligned<8>(virtual_address + I, encoding) `<< (8*I));
2574
2574
}
2575
2575
return result;
2576
2576
} else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
@@ -2955,8 +2955,8 @@ function write_memory {
2955
2955
} else {
2956
2956
# misaligned, must break into multiple reads
2957
2957
if (MISALIGNED_SPLIT_STRATEGY == "by_byte") {
2958
-
for (U32 i = 0; i <= (LEN/8); i++) {
2959
-
write_memory_aligned<8>(virtual_address + i, (value >> (8*i))[7:0], encoding);
2958
+
for (U32 I = 0; I < (LEN/8); I++) {
2959
+
write_memory_aligned<8>(virtual_address + I, (value >> (8*I))[7:0], encoding);
2960
2960
}
2961
2961
} else if (MISALIGNED_SPLIT_STRATEGY == "custom") {
2962
2962
unpredictable("An implementation is free to break a misaligned access any way, leading to unpredictable behavior when any part of the misaligned access causes an exception");
0 commit comments