You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
254 B
15 lines
254 B
require_extension('P');
|
|
require_rv64;
|
|
sreg_t sshamt = P_FIELD(RS2, 0, 8);
|
|
if (sshamt < 0) {
|
|
if (sshamt <= -64)
|
|
WRITE_RD(0);
|
|
else
|
|
WRITE_RD(RS1 >> (-sshamt));
|
|
} else {
|
|
if (sshamt >= 64)
|
|
WRITE_RD(0);
|
|
else
|
|
WRITE_RD(RS1 << sshamt);
|
|
}
|
|
|
|
|