MIPS: uasm: add MT ASE yield instruction
authorPaul Burton <paul.burton@imgtec.com>
Tue, 4 Mar 2014 15:12:36 +0000 (15:12 +0000)
committerPaul Burton <paul.burton@imgtec.com>
Wed, 28 May 2014 15:20:28 +0000 (16:20 +0100)
This patch allows use of the MT ASE yield instruction from uasm. It will
be used by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
arch/mips/include/asm/uasm.h
arch/mips/mm/uasm-mips.c
arch/mips/mm/uasm.c

index 88108019d922613e39388f354a7406e42e5a9cf3..3d803877ad8f07b8b35a261ff4ba89074d60f882 100644 (file)
@@ -150,6 +150,7 @@ Ip_0(_tlbwr);
 Ip_u1(_wait);
 Ip_u3u1u2(_xor);
 Ip_u2u1u3(_xori);
+Ip_u2u1(_yield);
 
 
 /* Handle labels. */
index c69f785753b51b6f9af908bd6cc3cddefd594986..4a2fc82fcd4f922980837cb5d0a84cbeb29e6a04 100644 (file)
@@ -116,6 +116,7 @@ static struct insn insn_table[] = {
        { insn_wait, M(cop0_op, cop_op, 0, 0, 0, wait_op), SCIMM },
        { insn_xori,  M(xori_op, 0, 0, 0, 0, 0),  RS | RT | UIMM },
        { insn_xor,  M(spec_op, 0, 0, 0, 0, xor_op),  RS | RT | RD },
+       { insn_yield, M(spec3_op, 0, 0, 0, 0, yield_op), RS | RD },
        { insn_invalid, 0, 0 }
 };
 
index 46d2173e6f24e08ee3665120691691d979a375cf..55a1fdfb76eff1d73628c3496888e2c7f7955308 100644 (file)
@@ -54,7 +54,7 @@ enum opcode {
        insn_mtc0, insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sc,
        insn_scd, insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw,
        insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr,
-       insn_wait, insn_xor, insn_xori,
+       insn_wait, insn_xor, insn_xori, insn_yield,
 };
 
 struct insn {
@@ -200,6 +200,13 @@ Ip_u1u2(op)                                                \
 }                                                      \
 UASM_EXPORT_SYMBOL(uasm_i##op);
 
+#define I_u2u1(op)                                     \
+Ip_u1u2(op)                                            \
+{                                                      \
+       build_insn(buf, insn##op, b, a);                \
+}                                                      \
+UASM_EXPORT_SYMBOL(uasm_i##op);
+
 #define I_u1s2(op)                                     \
 Ip_u1s2(op)                                            \
 {                                                      \
@@ -279,6 +286,7 @@ I_0(_tlbwr)
 I_u1(_wait);
 I_u3u1u2(_xor)
 I_u2u1u3(_xori)
+I_u2u1(_yield)
 I_u2u1msbu3(_dins);
 I_u2u1msb32u3(_dinsm);
 I_u1(_syscall);