diff options
author | Heiko Stuebner <[email protected]> | 2022-12-23 23:13:31 +0100 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2022-12-29 06:59:51 -0800 |
commit | 47f05757d3d898b4756d6d5c06e77a37337823e9 (patch) | |
tree | d317a6d9c5268c21e1acb1f066bcb3f5aca0e137 /scripts/generate_rust_analyzer.py | |
parent | 088ec01fce4eaba17ada8b1831be0c172c941657 (diff) |
RISC-V: add helpers for handling immediates in U-type and I-type pairs
Used together U-type and I-type instructions can for example be used to
generate bigger jumps (i.e. in auipc+jalr pairs) by splitting the value
into an upper immediate (i.e. auipc) and a 12bit immediate (i.e. jalr).
Due to both immediates being considered signed this creates some corner
cases, so add some helper to prevent this from getting duplicated in
different places.
Reviewed-by: Conor Dooley <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Reviewed-by: Lad Prabhakar <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions