end if;
misc_result <= mfcr_result;
when "110" =>
- -- setb
- bfa := insn_bfa(e_in.insn);
- crbit := to_integer(unsigned(bfa)) * 4;
+ -- setb and set[n]bc[r]
setb_result := (others => '0');
- if cr_in(31 - crbit) = '1' then
- setb_result := (others => '1');
- elsif cr_in(30 - crbit) = '1' then
- setb_result(0) := '1';
+ if e_in.insn(9) = '0' then
+ -- setb
+ bfa := insn_bfa(e_in.insn);
+ crbit := to_integer(unsigned(bfa)) * 4;
+ if cr_in(31 - crbit) = '1' then
+ setb_result := (others => '1');
+ elsif cr_in(30 - crbit) = '1' then
+ setb_result(0) := '1';
+ end if;
+ else
+ -- set[n]bc[r]
+ crbit := to_integer(unsigned(insn_bi(e_in.insn)));
+ if (cr_in(31 - crbit) xor e_in.insn(6)) = '1' then
+ if e_in.insn(7) = '0' then
+ setb_result(0) := '1';
+ else
+ setb_result := (others => '1');
+ end if;
+ end if;
end if;
misc_result <= setb_result;
when others =>
2#0_00101_11010# => INSN_prtyd,
2#0_00100_11010# => INSN_prtyw,
2#0_00100_00000# => INSN_setb,
+ 2#0_01100_00000# => INSN_setb, -- setbc
+ 2#0_01101_00000# => INSN_setb, -- setbcr
+ 2#0_01110_00000# => INSN_setb, -- setnbc
+ 2#0_01111_00000# => INSN_setb, -- setnbcr
2#0_01111_10010# => INSN_slbia,
2#0_00000_11011# => INSN_sld,
2#0_00000_11000# => INSN_slw,