mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-06-17 16:41:19 +01:00
lib: sbi: cosmetic changes to reduce indentation
In preparation for subsequent patches. Signed-off-by: Bo Gan <ganboing@gmail.com> Tested-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260609060024.706-2-ganboing@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <sbi/riscv_asm.h>
|
#include <sbi/riscv_asm.h>
|
||||||
#include <sbi/riscv_encoding.h>
|
#include <sbi/riscv_encoding.h>
|
||||||
|
#include <sbi/sbi_bitops.h>
|
||||||
#include <sbi/sbi_error.h>
|
#include <sbi/sbi_error.h>
|
||||||
#include <sbi/sbi_trap_ldst.h>
|
#include <sbi/sbi_trap_ldst.h>
|
||||||
#include <sbi/sbi_trap.h>
|
#include <sbi/sbi_trap.h>
|
||||||
@@ -189,7 +190,9 @@ int sbi_misaligned_v_ld_emulator(ulong insn, struct sbi_trap_context *tcntx)
|
|||||||
get_vreg(vlenb, 0, 0, vlenb, mask);
|
get_vreg(vlenb, 0, 0, vlenb, mask);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!masked || ((mask[vstart / 8] >> (vstart % 8)) & 1)) {
|
if (masked && (~mask[vstart / 8] & BIT(vstart % 8)))
|
||||||
|
continue;
|
||||||
|
|
||||||
/* compute element address */
|
/* compute element address */
|
||||||
ulong addr = base + vstart * stride;
|
ulong addr = base + vstart * stride;
|
||||||
|
|
||||||
@@ -226,7 +229,6 @@ int sbi_misaligned_v_ld_emulator(ulong insn, struct sbi_trap_context *tcntx)
|
|||||||
for (ulong seg = 0; seg < nf; seg++)
|
for (ulong seg = 0; seg < nf; seg++)
|
||||||
set_vreg(vlenb, vd + seg * emul, vstart * len,
|
set_vreg(vlenb, vd + seg * emul, vstart * len,
|
||||||
len, &bytes[seg * len]);
|
len, &bytes[seg * len]);
|
||||||
}
|
|
||||||
} while (++vstart < vl);
|
} while (++vstart < vl);
|
||||||
|
|
||||||
/* restore clobbered vl/vtype */
|
/* restore clobbered vl/vtype */
|
||||||
@@ -288,7 +290,9 @@ int sbi_misaligned_v_st_emulator(ulong insn, struct sbi_trap_context *tcntx)
|
|||||||
get_vreg(vlenb, 0, 0, vlenb, mask);
|
get_vreg(vlenb, 0, 0, vlenb, mask);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!masked || ((mask[vstart / 8] >> (vstart % 8)) & 1)) {
|
if (masked && (~mask[vstart / 8] & BIT(vstart % 8)))
|
||||||
|
continue;
|
||||||
|
|
||||||
/* compute element address */
|
/* compute element address */
|
||||||
ulong addr = base + vstart * stride;
|
ulong addr = base + vstart * stride;
|
||||||
|
|
||||||
@@ -319,7 +323,6 @@ int sbi_misaligned_v_st_emulator(ulong insn, struct sbi_trap_context *tcntx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} while (++vstart < vl);
|
} while (++vstart < vl);
|
||||||
|
|
||||||
/* restore clobbered vl/vtype */
|
/* restore clobbered vl/vtype */
|
||||||
|
|||||||
Reference in New Issue
Block a user