[PATCH v2] lib: sbi_misaligned_ldst: Add handling of vector load/store
Jessica Clarke
jrtc27 at jrtc27.com
Sun Dec 8 12:28:02 PST 2024
On 6 Dec 2024, at 12:18, Anup Patel <anup at brainfault.org> wrote:
>
> On Fri, Dec 6, 2024 at 8:40 AM Nylon Chen <nylon.chen at sifive.com> wrote:
>>
>> Add exception handling vector instructions from
>>
>> the vector extension to the sbi_misaligned_ldst library.
>>
>> This implementation references the misaligned_vec_ldst
>> implementation in the riscv-pk project.
>>
>> Co-developed-by: Zong Li <zong.li at sifive.com>
>> Signed-off-by: Zong Li <zong.li at sifive.com>
>> Signed-off-by: Nylon Chen <nylon.chen at sifive.com>
>> Reviewed-by: Andy Chiu <andy.chiu at sifive.com>
>> Reviewed-by: Anup Patel <anup at brainfault.org>
>
> I updated the commit description and replaced spaces with tabs
> for alignment at a few places at the time of merging this patch.
>
> Applied this patch to the riscv/opensbi repo.
>
> Thanks,
> Anup
>
>> ---
>> Makefile | 11 +-
>> include/sbi/riscv_encoding.h | 385 ++++++++++++++++++++++++++++++++++-
>> include/sbi/sbi_trap_ldst.h | 9 +
>> lib/sbi/objects.mk | 1 +
>> lib/sbi/sbi_trap_ldst.c | 23 ++-
>> lib/sbi/sbi_trap_v_ldst.c | 341 +++++++++++++++++++++++++++++++
>> 6 files changed, 758 insertions(+), 12 deletions(-)
>> create mode 100644 lib/sbi/sbi_trap_v_ldst.c
>>
>> diff --git a/Makefile b/Makefile
>> index d9cee49..5ac95a0 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -189,6 +189,9 @@ CC_SUPPORT_STRICT_ALIGN := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib
>> # Check whether the assembler and the compiler support the Zicsr and Zifencei extensions
>> CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep -e "zicsr" -e "zifencei" > /dev/null && echo n || echo y)
>>
>> +# Check whether the assembler and the compiler support the Vector extension
>> +CC_SUPPORT_VECT := $(shell echo | $(CC) -dM -E -march=rv$(OPENSBI_CC_XLEN)gv - | grep -q riscv.*vector && echo y || echo n)
No 2>/dev/null on that CC invocation?
Jess
More information about the opensbi
mailing list