Commit 7dcb1e17 authored by Anup Patel's avatar Anup Patel Committed by Anup Patel
Browse files

lib: sbi: Fix sign-extension in sbi_misaligned_load_handler()



The misaligned load emulation does not sign-extend values correctly
due to missing sign typecast in value passed to the SET_RD() macro.

A very easy way to reproduce this issue is to load 16-bit value
0xff1e from a byte aligned address using LH instruction on hardware
lacking misaligned load/store.

This patch fixes sbi_misaligned_load_handler() for above issue.

Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
parent a029bd90
Supports Markdown
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