summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/binutils/files/bin.e500mc_nop.patch
blob: 9c9d52ca3d70329cee01ddb9dfc8fdaa56f0ff51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Generate the preferred NOP: ori r0, r0, 0 in the place of ori r2, r2, 0
and add the nop test cases in gas for e500mc64, e5500 and e6500.

diff -ruN binutils-4.6.0-orig/gas/config/tc-ppc.c binutils-4.6.0-new/gas/config/tc-ppc.c
--- binutils-4.6.0-orig/gas/config/tc-ppc.c	2011-08-18 16:02:21.847979825 -0500
+++ binutils-4.6.0-new/gas/config/tc-ppc.c	2011-08-19 10:09:19.888849978 -0500
@@ -5815,8 +5817,14 @@
 	    }
 
 	  if ((ppc_cpu & PPC_OPCODE_POWER7) != 0)
-	    /* power7 group terminating nop: "ori 2,2,0".  */
-	    md_number_to_chars (dest, 0x60420000, 4);
+	    {
+	      if (ppc_cpu & PPC_OPCODE_E500MC)
+		/* e500mc group terminating nop: "ori 0,0,0".  */
+		md_number_to_chars (dest, 0x60000000, 4);
+	      else
+		/* power7 group terminating nop: "ori 2,2,0".  */
+		md_number_to_chars (dest, 0x60420000, 4);
+	    }
 	  else
 	    /* power6 group terminating nop: "ori 1,1,0".  */
 	    md_number_to_chars (dest, 0x60210000, 4);
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.d	1969-12-31 18:00:00.000000000 -0600
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.d	2011-08-19 10:16:29.561849966 -0500
@@ -0,0 +1,13 @@
+#as: -mppc -me500mc64
+#objdump: -dr -Me500mc64
+#name: Power E500MC64 nop tests
+
+.*: +file format elf(32)?(64)?-powerpc.*
+
+Disassembly of section \.text:
+
+0+00 <start>:
+   0:	60 00 00 00 	nop
+   4:	60 00 00 00 	nop
+   8:	60 00 00 00 	nop
+   c:	60 00 00 00 	nop
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e500mc64_nop.s	1969-12-31 18:00:00.000000000 -0600
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e500mc64_nop.s	2011-08-19 10:16:29.561849966 -0500
@@ -0,0 +1,5 @@
+# Power E500MC64 nop tests
+	.section  ".text"
+start:
+	nop
+	.p2align 4,,15
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.d	1969-12-31 18:00:00.000000000 -0600
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.d	2011-08-19 10:16:29.561849966 -0500
@@ -0,0 +1,13 @@
+#as: -mppc -me5500
+#objdump: -dr -Me5500
+#name: Power E5500 nop tests
+
+.*: +file format elf(32)?(64)?-powerpc.*
+
+Disassembly of section \.text:
+
+0+00 <start>:
+   0:	60 00 00 00 	nop
+   4:	60 00 00 00 	nop
+   8:	60 00 00 00 	nop
+   c:	60 00 00 00 	nop
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e5500_nop.s	1969-12-31 18:00:00.000000000 -0600
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e5500_nop.s	2011-08-19 10:16:29.561849966 -0500
@@ -0,0 +1,5 @@
+# Power E5500 nop tests
+	.section  ".text"
+start:
+	nop
+	.p2align 4,,15
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.d	1969-12-31 18:00:00.000000000 -0600
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.d	2011-08-19 10:16:29.561849966 -0500
@@ -0,0 +1,13 @@
+#as: -mppc -me6500
+#objdump: -dr -Me6500
+#name: Power E6500 nop tests
+
+.*: +file format elf(32)?(64)?-powerpc.*
+
+Disassembly of section \.text:
+
+0+00 <start>:
+   0:	60 00 00 00 	nop
+   4:	60 00 00 00 	nop
+   8:	60 00 00 00 	nop
+   c:	60 00 00 00 	nop
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/e6500_nop.s	1969-12-31 18:00:00.000000000 -0600
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/e6500_nop.s	2011-08-19 10:16:29.562849956 -0500
@@ -0,0 +1,5 @@
+# Power E6500 nop tests
+	.section  ".text"
+start:
+	nop
+	.p2align 4,,15
diff -ruN binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp
--- binutils-4.6.0-orig/gas/testsuite/gas/ppc/ppc.exp	2011-08-19 10:15:29.445978575 -0500
+++ binutils-4.6.0-new/gas/testsuite/gas/ppc/ppc.exp	2011-08-19 10:16:17.827852501 -0500
@@ -43,6 +43,9 @@
 	run_dump_test "ppc750ps"
 	run_dump_test "e500mc"
 	run_dump_test "e6500"
+	run_dump_test "e500mc64_nop"
+	run_dump_test "e5500_nop"
+	run_dump_test "e6500_nop"
 	run_dump_test "a2"
 	run_dump_test "cell"
 	run_dump_test "common"