summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/binutils/files/0010-7de425548753461fd2768017d3be677ba2b2a583.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/binutils/files/0010-7de425548753461fd2768017d3be677ba2b2a583.patch')
-rw-r--r--recipes-devtools/binutils/files/0010-7de425548753461fd2768017d3be677ba2b2a583.patch83
1 files changed, 0 insertions, 83 deletions
diff --git a/recipes-devtools/binutils/files/0010-7de425548753461fd2768017d3be677ba2b2a583.patch b/recipes-devtools/binutils/files/0010-7de425548753461fd2768017d3be677ba2b2a583.patch
deleted file mode 100644
index fbd3744f..00000000
--- a/recipes-devtools/binutils/files/0010-7de425548753461fd2768017d3be677ba2b2a583.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1From 7de425548753461fd2768017d3be677ba2b2a583 Mon Sep 17 00:00:00 2001
2From: Michael Eager <eager@eagercon.com>
3Date: Wed, 21 Nov 2012 17:54:09 +0000
4Subject: Add swap byte (swapb) and swap halfword (swaph) opcodes.
5
6binutils/opcodes
7 * microblaze-opc.h (op_code_struct): Add swapb, swaph Increase MAX_OPCODES.
8 * microblaze-opcm.h (microblaze_instr): Likewise
9binutils/gas/testsuite
10 * gas/microblaze/allinsn.s: Add swapb, swaph
11 * gas/microblaze/allinsn.d: Likewise
12
13Upstream-Status: Backport
14
15diff --git a/gas/testsuite/gas/microblaze/allinsn.d b/gas/testsuite/gas/microblaze/allinsn.d
16index 4a03340..b454fdb 100644
17--- a/gas/testsuite/gas/microblaze/allinsn.d
18+++ b/gas/testsuite/gas/microblaze/allinsn.d
19@@ -41,3 +41,9 @@ Disassembly of section .text:
20 30: b0000000 imm 0
21 34: 31600000 addik r11, r0, 0
22 38: 940bc802 mts rshr, r11
23+
24+0000003c <swapb>:
25+ 3c: 900001e0 swapb r0, r0
26+
27+00000040 <swaph>:
28+ 40: 900001e2 swaph r0, r0
29diff --git a/gas/testsuite/gas/microblaze/allinsn.s b/gas/testsuite/gas/microblaze/allinsn.s
30index 437444f..ffe91ca 100644
31--- a/gas/testsuite/gas/microblaze/allinsn.s
32+++ b/gas/testsuite/gas/microblaze/allinsn.s
33@@ -46,4 +46,12 @@ regslr:
34 regshr:
35 la r11,r0,r0
36 mts rshr,r11
37+ .text
38+ .global swapb
39+swapb:
40+ swapb r0,r0
41+ .text
42+ .global swaph
43+swaph:
44+ swaph r0,r0
45
46diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h
47index 0447fc5..404985b 100644
48--- a/opcodes/microblaze-opc.h
49+++ b/opcodes/microblaze-opc.h
50@@ -101,7 +101,7 @@
51 #define DELAY_SLOT 1
52 #define NO_DELAY_SLOT 0
53
54-#define MAX_OPCODES 287
55+#define MAX_OPCODES 289
56
57 struct op_code_struct
58 {
59@@ -402,6 +402,8 @@ struct op_code_struct
60 {"clz", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900000E0, OPCODE_MASK_H34, clz, special_inst },
61 {"mbar", INST_TYPE_IMM5, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8020004, OPCODE_MASK_HN, mbar, special_inst },
62 {"sleep", INST_TYPE_NONE, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBA020004, OPCODE_MASK_HN, invalid_inst, special_inst }, /* translates to mbar 16. */
63+ {"swapb", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E0, OPCODE_MASK_H4, swapb, arithmetic_inst },
64+ {"swaph", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E2, OPCODE_MASK_H4, swaph, arithmetic_inst },
65 {"", 0, 0, 0, 0, 0, 0, 0, 0},
66 };
67
68diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h
69index a2a42d0..124cdec 100644
70--- a/opcodes/microblaze-opcm.h
71+++ b/opcodes/microblaze-opcm.h
72@@ -27,7 +27,7 @@ enum microblaze_instr
73 {
74 add, rsub, addc, rsubc, addk, rsubk, addkc, rsubkc, clz, cmp, cmpu,
75 addi, rsubi, addic, rsubic, addik, rsubik, addikc, rsubikc, mul,
76- mulh, mulhu, mulhsu,
77+ mulh, mulhu, mulhsu,swapb,swaph,
78 idiv, idivu, bsll, bsra, bsrl, get, put, nget, nput, cget, cput,
79 ncget, ncput, muli, bslli, bsrai, bsrli, mului, or, and, xor,
80 andn, pcmpbf, pcmpbc, pcmpeq, pcmpne, sra, src, srl, sext8, sext16,
81--
821.7.5.4
83