aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-10-24 01:27:29 +0000
committerAlan Modra <amodra@gmail.com>2006-10-24 01:27:29 +0000
commitede602d7c88efaaccf5c0679e0382298ae989d95 (patch)
treebc7447faf2f165356db03bf1034546388d2cf999 /gas
parent2941e768e4dbb9a0cc4cc7a4cc348319cab40729 (diff)
downloadgdb-ede602d7c88efaaccf5c0679e0382298ae989d95.zip
gdb-ede602d7c88efaaccf5c0679e0382298ae989d95.tar.gz
gdb-ede602d7c88efaaccf5c0679e0382298ae989d95.tar.bz2
Add powerpc cell support.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-ppc.c7
-rw-r--r--gas/doc/c-ppc.texi3
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/ppc/cell.d31
-rw-r--r--gas/testsuite/gas/ppc/cell.s24
-rw-r--r--gas/testsuite/gas/ppc/ppc.exp1
7 files changed, 78 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0346ef5..9861888 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * doc/c-ppc.texi (-mcell): Document.
+ * config/tc-ppc.c (parse_cpu): Parse -mcell.
+ (md_show_usage): Document -mcell.
+
2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
* doc/c-i386.texi : Document amdfam10,.sse4a and .abm in cpu_type.
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 1d655ca..bcd32e0 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -920,6 +920,12 @@ parse_cpu (const char *arg)
| PPC_OPCODE_64 | PPC_OPCODE_POWER4
| PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6);
}
+ else if (strcmp (arg, "cell") == 0)
+ {
+ ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
+ | PPC_OPCODE_64 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_CELL);
+ }
/* -mcom means assemble for the common intersection between Power
and PowerPC. At present, we just allow the union, rather
than the intersection. */
@@ -1116,6 +1122,7 @@ PowerPC options:\n\
-mpower4 generate code for Power4 architecture\n\
-mpower5 generate code for Power5 architecture\n\
-mpower6 generate code for Power6 architecture\n\
+-mcell generate code for Cell Broadband Engine architecture\n\
-mcom generate code Power/PowerPC common instructions\n\
-many generate code for any architecture (PWR/PWRX/PPC)\n"));
fprintf (stream, _("\
diff --git a/gas/doc/c-ppc.texi b/gas/doc/c-ppc.texi
index b5e26fd..ad6bd1a 100644
--- a/gas/doc/c-ppc.texi
+++ b/gas/doc/c-ppc.texi
@@ -82,6 +82,9 @@ Generate code for Power5 architecture.
@item -mpower6
Generate code for Power6 architecture.
+@item -mcell
+Generate code for Cell Broadband Engine architecture.
+
@item -mcom
Generate code Power/PowerPC common instructions.
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index b6b8003..69c2ea8 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * gas/ppc/cell.s: New file.
+ * gas/ppc/cell.d: New file.
+ * gas/ppc/ppc.exp: Test cell.s.
+
2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
* gas/i386/amdfam10.d : Modify to support for the change in POPCNT
diff --git a/gas/testsuite/gas/ppc/cell.d b/gas/testsuite/gas/ppc/cell.d
new file mode 100644
index 0000000..799a8e0
--- /dev/null
+++ b/gas/testsuite/gas/ppc/cell.d
@@ -0,0 +1,31 @@
+#as: -mcell
+#objdump: -dr -Mcell
+#name: Cell tests
+
+
+.*: +file format elf(32)?(64)?-powerpc.*
+
+
+Disassembly of section \.text:
+
+0000000000000000 <.text>:
+ 0: 7c 01 14 0e lvlx v0,r1,r2
+ 4: 7c 00 14 0e lvlx v0,0,r2
+ 8: 7c 01 16 0e lvlxl v0,r1,r2
+ c: 7c 00 16 0e lvlxl v0,0,r2
+ 10: 7c 01 14 4e lvrx v0,r1,r2
+ 14: 7c 00 14 4e lvrx v0,0,r2
+ 18: 7c 01 16 4e lvrxl v0,r1,r2
+ 1c: 7c 00 16 4e lvrxl v0,0,r2
+ 20: 7c 01 15 0e stvlx v0,r1,r2
+ 24: 7c 00 15 0e stvlx v0,0,r2
+ 28: 7c 01 17 0e stvlxl v0,r1,r2
+ 2c: 7c 00 17 0e stvlxl v0,0,r2
+ 30: 7c 01 15 4e stvrx v0,r1,r2
+ 34: 7c 00 15 4e stvrx v0,0,r2
+ 38: 7c 01 17 4e stvrxl v0,r1,r2
+ 3c: 7c 00 17 4e stvrxl v0,0,r2
+ 40: 7c 00 0c 28 ldbrx r0,0,r1
+ 44: 7c 01 14 28 ldbrx r0,r1,r2
+ 48: 7c 00 0d 28 stdbrx r0,0,r1
+ 4c: 7c 01 15 28 stdbrx r0,r1,r2
diff --git a/gas/testsuite/gas/ppc/cell.s b/gas/testsuite/gas/ppc/cell.s
new file mode 100644
index 0000000..2985386
--- /dev/null
+++ b/gas/testsuite/gas/ppc/cell.s
@@ -0,0 +1,24 @@
+ .section ".text"
+ lvlx %r0, %r1, %r2
+ lvlx %r0, 0, %r2
+ lvlxl %r0, %r1, %r2
+ lvlxl %r0, 0, %r2
+ lvrx %r0, %r1, %r2
+ lvrx %r0, 0, %r2
+ lvrxl %r0, %r1, %r2
+ lvrxl %r0, 0, %r2
+
+ stvlx %r0, %r1, %r2
+ stvlx %r0, 0, %r2
+ stvlxl %r0, %r1, %r2
+ stvlxl %r0, 0, %r2
+ stvrx %r0, %r1, %r2
+ stvrx %r0, 0, %r2
+ stvrxl %r0, %r1, %r2
+ stvrxl %r0, 0, %r2
+
+ ldbrx %r0, 0, %r1
+ ldbrx %r0, %r1, %r2
+
+ stdbrx %r0, 0, %r1
+ stdbrx %r0, %r1, %r2
diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp
index 0dd4648..dc5ef2c 100644
--- a/gas/testsuite/gas/ppc/ppc.exp
+++ b/gas/testsuite/gas/ppc/ppc.exp
@@ -11,6 +11,7 @@ if { [istarget powerpc64*-*-*] || [istarget *-*-elf64*]} then {
run_dump_test "astest2_64"
run_dump_test "test1elf64"
run_dump_test "power4"
+ run_dump_test "cell"
} elseif { [istarget powerpc*-*aix*] } then {
run_dump_test "test1xcoff32"
} elseif { [istarget powerpc*-*-*bsd*] \