pshr Operation Font Conventions
if
(PR[qp]) {
check_target_register;
shift_count = (variable_form ? GR[r2]
: count5);
tmp_nat = (variable_form ? GR[r2].nat : 0);
if (two_byte_form) { // two_byte_form
if (shift_count u> 16)
shift_count = 16;
if (unsigned_form) { // unsigned shift
GR[r1]{15:0} = shift_right_unsigned((GR[r3]{15:0},
16),
shift_count);
GR[r1]{31:16} = shift_right_unsigned(zero_ext(GR[r3]{31:16},
16),
shift_count);
GR[r1]{47:32} = shift_right_unsigned(zero_ext(GR[r3]{47:32},
16),
shift_count);
GR[r1]{63:48} = shift_right_unsigned(zero_ext(GR[r3]{63:48},
16),
shift_count);
} else { // signed shift
GR[r1]{15:0} = shift_right_signed(sign_ext(GR[r3]{15:0},
16),
shift_count);
GR[r1]{31:16} = shift_right_signed(sign_ext(GR[r3]{31:16},
16),
shift_count);
GR[r1]{47:32} = shift_right_signed(sign_ext(GR[r3]{47:32},
16),
shift_count);
GR[r1]{63:48} = shift_right_signed(sign_ext(GR[r3]{63:48},
16),
shift_count);
}
} else { // four_byte_form
if (shift_count > 32)
shift_count = 32;
if (unsigned_form) { // unsigned shift
GR[r1]{31:0} = shift_right_unsigned(zero_ext(GR[r3]{31:0},
32),
shift_count);
GR[r1]{63:32} = shift_right_unsigned(zero_ext(GR[r3]{63:32},
32),
shift_count);
} else { // signed shift
GR[r1]{31:0} = shift_right_signed(sign_ext(GR[r3]{31:0},
32),
shift_count);
GR[r1]{63:32} = shift_right_signed(sign_ext(GR[r3]{63:32},
32),
shift_count);
}
}
GR[r1].nat = GR[r3].nat || tmp_nat;}