aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2014-03-04 10:12:36 -0500
committerPaul Burton <paul.burton@imgtec.com>2014-05-28 11:20:28 -0400
commitd674dd14e85c49ca0e422de53a4c2b5bf44a339a (patch)
tree6f03b5515760bd18d0a7d31e86756f8f213d48c1
parent53ed138986e1022c2b6fef7f8e9731f5bf3e6af1 (diff)
MIPS: uasm: add MT ASE yield instruction
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>
-rw-r--r--arch/mips/include/asm/uasm.h1
-rw-r--r--arch/mips/mm/uasm-mips.c1
-rw-r--r--arch/mips/mm/uasm.c10
3 files changed, 11 insertions, 1 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index 88108019d922..3d803877ad8f 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -150,6 +150,7 @@ Ip_0(_tlbwr);
150Ip_u1(_wait); 150Ip_u1(_wait);
151Ip_u3u1u2(_xor); 151Ip_u3u1u2(_xor);
152Ip_u2u1u3(_xori); 152Ip_u2u1u3(_xori);
153Ip_u2u1(_yield);
153 154
154 155
155/* Handle labels. */ 156/* Handle labels. */
diff --git a/arch/mips/mm/uasm-mips.c b/arch/mips/mm/uasm-mips.c
index c69f785753b5..4a2fc82fcd4f 100644
--- a/arch/mips/mm/uasm-mips.c
+++ b/arch/mips/mm/uasm-mips.c
@@ -116,6 +116,7 @@ static struct insn insn_table[] = {
116 { insn_wait, M(cop0_op, cop_op, 0, 0, 0, wait_op), SCIMM }, 116 { insn_wait, M(cop0_op, cop_op, 0, 0, 0, wait_op), SCIMM },
117 { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, 117 { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM },
118 { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD }, 118 { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD },
119 { insn_yield, M(spec3_op, 0, 0, 0, 0, yield_op), RS | RD },
119 { insn_invalid, 0, 0 } 120 { insn_invalid, 0, 0 }
120}; 121};
121 122
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index 46d2173e6f24..55a1fdfb76ef 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -54,7 +54,7 @@ enum opcode {
54 insn_mtc0, insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sc, 54 insn_mtc0, insn_or, insn_ori, insn_pref, insn_rfe, insn_rotr, insn_sc,
55 insn_scd, insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw, 55 insn_scd, insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw,
56 insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, 56 insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr,
57 insn_wait, insn_xor, insn_xori, 57 insn_wait, insn_xor, insn_xori, insn_yield,
58}; 58};
59 59
60struct insn { 60struct insn {
@@ -200,6 +200,13 @@ Ip_u1u2(op) \
200} \ 200} \
201UASM_EXPORT_SYMBOL(uasm_i##op); 201UASM_EXPORT_SYMBOL(uasm_i##op);
202 202
203#define I_u2u1(op) \
204Ip_u1u2(op) \
205{ \
206 build_insn(buf, insn##op, b, a); \
207} \
208UASM_EXPORT_SYMBOL(uasm_i##op);
209
203#define I_u1s2(op) \ 210#define I_u1s2(op) \
204Ip_u1s2(op) \ 211Ip_u1s2(op) \
205{ \ 212{ \
@@ -279,6 +286,7 @@ I_0(_tlbwr)
279I_u1(_wait); 286I_u1(_wait);
280I_u3u1u2(_xor) 287I_u3u1u2(_xor)
281I_u2u1u3(_xori) 288I_u2u1u3(_xori)
289I_u2u1(_yield)
282I_u2u1msbu3(_dins); 290I_u2u1msbu3(_dins);
283I_u2u1msb32u3(_dinsm); 291I_u2u1msb32u3(_dinsm);
284I_u1(_syscall); 292I_u1(_syscall);