diff options
author | Paul Burton <paul.burton@imgtec.com> | 2013-12-23 22:49:45 -0500 |
---|---|---|
committer | Paul Burton <paul.burton@imgtec.com> | 2014-05-28 11:20:26 -0400 |
commit | 729ff56169395cb3e467e4e3c1e2637f4d3436ce (patch) | |
tree | bdb21de660a5fb826f2c308e8aa3e1315d48837e | |
parent | 49e9529b9d43773307b8c73bd251b71784830c3d (diff) |
MIPS: uasm: add sync instruction
This patch allows use of the sync 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.h | 1 | ||||
-rw-r--r-- | arch/mips/mm/uasm-micromips.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/uasm-mips.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/uasm.c | 5 |
4 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index a3d88aec4d3f..306892c6156d 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -141,6 +141,7 @@ Ip_u2u1u3(_sra); | |||
141 | Ip_u2u1u3(_srl); | 141 | Ip_u2u1u3(_srl); |
142 | Ip_u3u1u2(_subu); | 142 | Ip_u3u1u2(_subu); |
143 | Ip_u2s3u1(_sw); | 143 | Ip_u2s3u1(_sw); |
144 | Ip_u1(_sync); | ||
144 | Ip_u1(_syscall); | 145 | Ip_u1(_syscall); |
145 | Ip_0(_tlbp); | 146 | Ip_0(_tlbp); |
146 | Ip_0(_tlbr); | 147 | Ip_0(_tlbr); |
diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c index b8d580ca02e5..9500f2a951f9 100644 --- a/arch/mips/mm/uasm-micromips.c +++ b/arch/mips/mm/uasm-micromips.c | |||
@@ -99,6 +99,7 @@ static struct insn insn_table_MM[] = { | |||
99 | { insn_rotr, M(mm_pool32a_op, 0, 0, 0, 0, mm_rotr_op), RT | RS | RD }, | 99 | { insn_rotr, M(mm_pool32a_op, 0, 0, 0, 0, mm_rotr_op), RT | RS | RD }, |
100 | { insn_subu, M(mm_pool32a_op, 0, 0, 0, 0, mm_subu32_op), RT | RS | RD }, | 100 | { insn_subu, M(mm_pool32a_op, 0, 0, 0, 0, mm_subu32_op), RT | RS | RD }, |
101 | { insn_sw, M(mm_sw32_op, 0, 0, 0, 0, 0), RT | RS | SIMM }, | 101 | { insn_sw, M(mm_sw32_op, 0, 0, 0, 0, 0), RT | RS | SIMM }, |
102 | { insn_sync, M(mm_pool32a_op, 0, 0, 0, mm_sync_op, mm_pool32axf_op), RS }, | ||
102 | { insn_tlbp, M(mm_pool32a_op, 0, 0, 0, mm_tlbp_op, mm_pool32axf_op), 0 }, | 103 | { insn_tlbp, M(mm_pool32a_op, 0, 0, 0, mm_tlbp_op, mm_pool32axf_op), 0 }, |
103 | { insn_tlbr, M(mm_pool32a_op, 0, 0, 0, mm_tlbr_op, mm_pool32axf_op), 0 }, | 104 | { insn_tlbr, M(mm_pool32a_op, 0, 0, 0, mm_tlbr_op, mm_pool32axf_op), 0 }, |
104 | { insn_tlbwi, M(mm_pool32a_op, 0, 0, 0, mm_tlbwi_op, mm_pool32axf_op), 0 }, | 105 | { insn_tlbwi, M(mm_pool32a_op, 0, 0, 0, mm_tlbwi_op, mm_pool32axf_op), 0 }, |
diff --git a/arch/mips/mm/uasm-mips.c b/arch/mips/mm/uasm-mips.c index 45e3dc593dfb..51063fdcefbf 100644 --- a/arch/mips/mm/uasm-mips.c +++ b/arch/mips/mm/uasm-mips.c | |||
@@ -107,6 +107,7 @@ static struct insn insn_table[] = { | |||
107 | { insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE }, | 107 | { insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE }, |
108 | { insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD }, | 108 | { insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD }, |
109 | { insn_sw, M(sw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 109 | { insn_sw, M(sw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
110 | { insn_sync, M(spec_op, 0, 0, 0, 0, sync_op), RE }, | ||
110 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, | 111 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, |
111 | { insn_tlbp, M(cop0_op, cop_op, 0, 0, 0, tlbp_op), 0 }, | 112 | { insn_tlbp, M(cop0_op, cop_op, 0, 0, 0, tlbp_op), 0 }, |
112 | { insn_tlbr, M(cop0_op, cop_op, 0, 0, 0, tlbr_op), 0 }, | 113 | { insn_tlbr, M(cop0_op, cop_op, 0, 0, 0, tlbr_op), 0 }, |
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c index a77a4b83307c..7c1380127a82 100644 --- a/arch/mips/mm/uasm.c +++ b/arch/mips/mm/uasm.c | |||
@@ -53,8 +53,8 @@ enum opcode { | |||
53 | insn_ldx, insn_ll, insn_lld, insn_lui, insn_lw, insn_lwx, insn_mfc0, | 53 | insn_ldx, insn_ll, insn_lld, insn_lui, insn_lw, insn_lwx, insn_mfc0, |
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_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, | 56 | insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, insn_tlbwr, |
57 | insn_xori, | 57 | insn_xor, insn_xori, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct insn { | 60 | struct insn { |
@@ -271,6 +271,7 @@ I_u2u1u3(_srl) | |||
271 | I_u2u1u3(_rotr) | 271 | I_u2u1u3(_rotr) |
272 | I_u3u1u2(_subu) | 272 | I_u3u1u2(_subu) |
273 | I_u2s3u1(_sw) | 273 | I_u2s3u1(_sw) |
274 | I_u1(_sync) | ||
274 | I_0(_tlbp) | 275 | I_0(_tlbp) |
275 | I_0(_tlbr) | 276 | I_0(_tlbr) |
276 | I_0(_tlbwi) | 277 | I_0(_tlbwi) |