2758 * exception level.
2759 *
2760 * @param uimm16 Arbitrary 16-bit unsigned payload.
2761 */
2762 protected void brk(int uimm16) {
2763 exceptionInstruction(BRK, uimm16);
2764 }
2765
2766 private void exceptionInstruction(Instruction instr, int uimm16) {
2767 assert NumUtil.isUnsignedNbit(16, uimm16);
2768 emitInt(instr.encoding | ExceptionOp | uimm16 << SystemImmediateOffset);
2769 }
2770
2771 /* Architectural hints (5.9.4) */
2772 public enum SystemHint {
2773 NOP(0x0),
2774 YIELD(0x1),
2775 WFE(0x2),
2776 WFI(0x3),
2777 SEV(0x4),
2778 SEVL(0x5);
2779
2780 private final int encoding;
2781
2782 SystemHint(int encoding) {
2783 this.encoding = encoding;
2784 }
2785 }
2786
2787 /**
2788 * Architectural hints.
2789 *
2790 * @param hint Can be any of the defined hints. May not be null.
2791 */
2792 protected void hint(SystemHint hint) {
2793 emitInt(HINT.encoding | hint.encoding << SystemImmediateOffset);
2794 }
2795
2796 /**
2797 * Clear Exclusive: clears the local record of the executing processor that an address has had a
2798 * request for an exclusive access.
|
2758 * exception level.
2759 *
2760 * @param uimm16 Arbitrary 16-bit unsigned payload.
2761 */
2762 protected void brk(int uimm16) {
2763 exceptionInstruction(BRK, uimm16);
2764 }
2765
2766 private void exceptionInstruction(Instruction instr, int uimm16) {
2767 assert NumUtil.isUnsignedNbit(16, uimm16);
2768 emitInt(instr.encoding | ExceptionOp | uimm16 << SystemImmediateOffset);
2769 }
2770
2771 /* Architectural hints (5.9.4) */
2772 public enum SystemHint {
2773 NOP(0x0),
2774 YIELD(0x1),
2775 WFE(0x2),
2776 WFI(0x3),
2777 SEV(0x4),
2778 SEVL(0x5),
2779 CSDB(0x14);
2780
2781 private final int encoding;
2782
2783 SystemHint(int encoding) {
2784 this.encoding = encoding;
2785 }
2786 }
2787
2788 /**
2789 * Architectural hints.
2790 *
2791 * @param hint Can be any of the defined hints. May not be null.
2792 */
2793 protected void hint(SystemHint hint) {
2794 emitInt(HINT.encoding | hint.encoding << SystemImmediateOffset);
2795 }
2796
2797 /**
2798 * Clear Exclusive: clears the local record of the executing processor that an address has had a
2799 * request for an exclusive access.
|