blob: 3174f17aa4513c222a2e08279a1c12fc3c1b6c95 [file] [log] [blame]
#
# RISC-V translation routines for the MIPS extension
#
# Copyright (c) 2025 MIPS
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Reference: MIPS P8700 instructions
# (https://mips.com/products/hardware/p8700/)
# Fields
%rs3 27:5
%rs2 20:5
%rs1 15:5
%rd 7:5
%imm_9 20:9
%imm_hint 7:5
%imm_v 25:2 9:3 !function=ex_shift_2
%imm_w 25:2 10:2 !function=ex_shift_3
%imm_x 22:5 !function=ex_shift_2
%imm_y 23:4 !function=ex_shift_3
# Formats
@r4_immv ..... .. ..... ..... ... ... .. ....... %rs2 %rs3 %imm_v %rs1
@r4_immw ..... .. ..... ..... ... .. ... ....... %rs2 %rs3 %imm_w %rs1
@r4_immx ..... ..... .. ..... ... ..... ....... %rs3 %imm_x %rs1 %rd
@r4_immy ..... .... ... ..... ... ..... ....... %rs3 %imm_y %rs1 %rd
# *** RV64 MIPS Extension ***
ccmov rs3:5 11 rs2:5 rs1:5 011 rd:5 0001011
pref 000 imm_9:9 rs1:5 000 imm_hint:5 0001011
ldp ..... .... 000 ..... 100 ..... 0001011 @r4_immy
lwp ..... ..... 01 ..... 100 ..... 0001011 @r4_immx
sdp ..... .. ..... ..... 101 .. 0000001011 @r4_immw
swp ..... .. ..... ..... 101 ... 010001011 @r4_immv