blob: 878bb32136752b874b5b87628cd24cbc11f2bdf5 [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001From 91f39b692c48336117c092e4afd80899c97779e6 Mon Sep 17 00:00:00 2001
2From: David Holsgrove <david.holsgrove@xilinx.com>
3Date: Mon, 28 Aug 2017 19:53:52 -0700
4Subject: [PATCH] MicroBlaze Add wdc.ext.clear and wdc.ext.flush insns
5
6Added two new instructions, wdc.ext.clear and wdc.ext.flush,
7to enable MicroBlaze to flush an external cache, which is
8used with the new coherency support for multiprocessing.
9
10Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
11Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com>
12Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
13Upstream-Status: Pending
14
15---
16 opcodes/microblaze-opc.h | 5 ++++-
17 opcodes/microblaze-opcm.h | 4 ++--
18 2 files changed, 6 insertions(+), 3 deletions(-)
19
20diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h
21index ede8af8..773dc81 100644
22--- a/opcodes/microblaze-opc.h
23+++ b/opcodes/microblaze-opc.h
24@@ -91,6 +91,7 @@
25 #define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22. */
26 #define OPCODE_MASK_H32 0xFC00FC00 /* High 6 bits and bit 16-21. */
27 #define OPCODE_MASK_H34B 0xFC0000FF /* High 6 bits and low 8 bits. */
28+#define OPCODE_MASK_H35B 0xFC0004FF /* High 6 bits and low 9 bits. */
29 #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */
30
31 /* New Mask for msrset, msrclr insns. */
32@@ -101,7 +102,7 @@
33 #define DELAY_SLOT 1
34 #define NO_DELAY_SLOT 0
35
36-#define MAX_OPCODES 289
37+#define MAX_OPCODES 291
38
39 struct op_code_struct
40 {
41@@ -174,7 +175,9 @@ struct op_code_struct
42 {"wic", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000068, OPCODE_MASK_H34B, wic, special_inst },
43 {"wdc", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000064, OPCODE_MASK_H34B, wdc, special_inst },
44 {"wdc.clear", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000066, OPCODE_MASK_H34B, wdcclear, special_inst },
45+ {"wdc.ext.clear", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000466, OPCODE_MASK_H35B, wdcextclear, special_inst },
46 {"wdc.flush", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000074, OPCODE_MASK_H34B, wdcflush, special_inst },
47+ {"wdc.ext.flush", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000476, OPCODE_MASK_H35B, wdcextflush, special_inst },
48 {"mts", INST_TYPE_SPECIAL_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MTS, 0x9400C000, OPCODE_MASK_H13S, mts, special_inst },
49 {"mfs", INST_TYPE_RD_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MFS, 0x94008000, OPCODE_MASK_H23S, mfs, special_inst },
50 {"br", INST_TYPE_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98000000, OPCODE_MASK_H124, br, branch_inst },
51diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h
52index 92f3f19..7338f6a 100644
53--- a/opcodes/microblaze-opcm.h
54+++ b/opcodes/microblaze-opcm.h
55@@ -33,8 +33,8 @@ enum microblaze_instr
56 /* 'or/and/xor' are C++ keywords. */
57 microblaze_or, microblaze_and, microblaze_xor,
58 andn, pcmpbf, pcmpbc, pcmpeq, pcmpne, sra, src, srl, sext8, sext16,
59- wic, wdc, wdcclear, wdcflush, mts, mfs, mbar, br, brd,
60- brld, bra, brad, brald, microblaze_brk, beq, beqd, bne, bned, blt,
61+ wic, wdc, wdcclear, wdcextclear, wdcflush, wdcextflush, mts, mfs, mbar, br,
62+ brd, brld, bra, brad, brald, microblaze_brk, beq, beqd, bne, bned, blt,
63 bltd, ble, bled, bgt, bgtd, bge, bged, ori, andi, xori, andni,
64 imm, rtsd, rtid, rtbd, rted, bri, brid, brlid, brai, braid, bralid,
65 brki, beqi, beqid, bnei, bneid, blti, bltid, blei, bleid, bgti,