diff options
author | Peter Bergner <bergner@vnet.ibm.com> | 2013-01-11 02:25:36 +0000 |
---|---|---|
committer | Peter Bergner <bergner@vnet.ibm.com> | 2013-01-11 02:25:36 +0000 |
commit | 5817ffd1f81cf2d2ae173071775e6e620aa41283 (patch) | |
tree | b2c4d4547a74f4de494daeae67436a970460e3d3 /gas | |
parent | ca9c6ee2b7740e92a1630a9c7040eaba557bcd49 (diff) | |
download | gdb-5817ffd1f81cf2d2ae173071775e6e620aa41283.zip gdb-5817ffd1f81cf2d2ae173071775e6e620aa41283.tar.gz gdb-5817ffd1f81cf2d2ae173071775e6e620aa41283.tar.bz2 |
include/opcode/
* ppc.h (PPC_OPCODE_POWER8): New define.
(PPC_OPCODE_HTM): Likewise.
opcodes/
* ppc-dis.c (ppc_opts): Add "power8", "pwr8" and "htm" entries.
* ppc-opc.c (HTM_R, HTM_SI, XRTRB_MASK, XRTRARB_MASK, XRTLRARB_MASK,
XRTARARB_MASK, XRTBFRARB_MASK, XRCL, POWER8, PPCHTM): New defines.
(SH6): Update.
<"tabort.", "tabortdc.", "tabortdci.", "tabortwc.",
"tabortwci.", "tbegin.", "tcheck", "tend.", "trechkpt.",
"treclaim.", "tsr.">: Add POWER8 HTM opcodes.
<"tendall.", "tresume.", "tsuspend.">: Add POWER8 HTM extended opcodes.
gas/
* doc/as.texinfo (Target PowerPC): Document -mpower8 and -mhtm.
* doc/c-ppc.texi (PowerPC-Opts): Likewise.
* config/tc-ppc.c (md_show_usage): Likewise.
(ppc_handle_align): Handle power8's group ending nop.
gas/testsuite/
* gas/ppc/htm.d: New test.
* gas/ppc/htm.s: Likewise.
* gas/ppc/power8.d: Likewise.
* gas/ppc/power8.s: Likewise.
* gas/ppc/ppc.exp: Run them.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 12 | ||||
-rw-r--r-- | gas/doc/as.texinfo | 4 | ||||
-rw-r--r-- | gas/doc/c-ppc.texi | 7 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/htm.d | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/htm.s | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/power8.d | 29 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/power8.s | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/ppc.exp | 2 |
10 files changed, 129 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 224321f..e55763e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2013-01-10 Peter Bergner <bergner@vnet.ibm.com> + + * doc/as.texinfo (Target PowerPC): Document -mpower8 and -mhtm. + * doc/c-ppc.texi (PowerPC-Opts): Likewise. + * config/tc-ppc.c (md_show_usage): Likewise. + (ppc_handle_align): Handle power8's group ending nop. + 2013-01-10 Sean Keys <skeys@ipdatasys.com> * config/tc-xgate.c (md_begin): Fix the printing of opcodes so diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index e9df056..850eb05 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1302,12 +1302,14 @@ PowerPC options:\n\ generate code for Power5 architecture\n\ -mpower6, -mpwr6 generate code for Power6 architecture\n\ -mpower7, -mpwr7 generate code for Power7 architecture\n\ +-mpower8, -mpwr8 generate code for Power8 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, _("\ -maltivec generate code for AltiVec\n\ -mvsx generate code for Vector-Scalar (VSX) instructions\n\ +-mhtm generate code for Hardware Transactional Memory\n\ -me300 generate code for PowerPC e300 family\n\ -me500, -me500x2 generate code for Motorola e500 core complex\n\ -me500mc, generate code for Freescale e500mc core complex\n\ @@ -6265,9 +6267,10 @@ ppc_handle_align (struct frag *fragP) md_number_to_chars (dest, 0x60000000, 4); if ((ppc_cpu & PPC_OPCODE_POWER6) != 0 - || (ppc_cpu & PPC_OPCODE_POWER7) != 0) + || (ppc_cpu & PPC_OPCODE_POWER7) != 0 + || (ppc_cpu & PPC_OPCODE_POWER8) != 0) { - /* For power6 and power7, we want the last nop to be a group + /* For power6, power7 and power8, we want the last nop to be a group terminating one. Do this by inserting an rs_fill frag immediately after this one, with its address set to the last nop location. This will automatically reduce the number of nops in the current @@ -6285,13 +6288,14 @@ ppc_handle_align (struct frag *fragP) dest = group_nop->fr_literal; } - if ((ppc_cpu & PPC_OPCODE_POWER7) != 0) + if ((ppc_cpu & PPC_OPCODE_POWER7) != 0 + || (ppc_cpu & PPC_OPCODE_POWER8) != 0) { 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". */ + /* power7/power8 group terminating nop: "ori 2,2,0". */ md_number_to_chars (dest, 0x60420000, 4); } else diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index 0d04932..c976c05 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -451,8 +451,8 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. @b{-m440}|@b{-m464}|@b{-m476}|@b{-m7400}|@b{-m7410}|@b{-m7450}|@b{-m7455}|@b{-m750cl}|@b{-mppc64}| @b{-m620}|@b{-me500}|@b{-e500x2}|@b{-me500mc}|@b{-me500mc64}|@b{-me5500}|@b{-me6500}|@b{-mppc64bridge}| @b{-mbooke}|@b{-mpower4}|@b{-mpwr4}|@b{-mpower5}|@b{-mpwr5}|@b{-mpwr5x}|@b{-mpower6}|@b{-mpwr6}| - @b{-mpower7}|@b{-mpwr7}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mvle}|@b{-mcom}] - [@b{-many}] [@b{-maltivec}|@b{-mvsx}] + @b{-mpower7}|@b{-mpwr7}|@b{-mpower8}|@b{-mpwr8}|@b{-ma2}|@b{-mcell}|@b{-mspe}|@b{-mtitan}|@b{-me300}|@b{-mcom}] + [@b{-many}] [@b{-maltivec}|@b{-mvsx}|@b{-mhtm}|@b{-mvle}] [@b{-mregnames}|@b{-mno-regnames}] [@b{-mrelocatable}|@b{-mrelocatable-lib}|@b{-K PIC}] [@b{-memb}] [@b{-mlittle}|@b{-mlittle-endian}|@b{-le}|@b{-mbig}|@b{-mbig-endian}|@b{-be}] diff --git a/gas/doc/c-ppc.texi b/gas/doc/c-ppc.texi index 9fb9614..c2209ed 100644 --- a/gas/doc/c-ppc.texi +++ b/gas/doc/c-ppc.texi @@ -121,6 +121,9 @@ Generate code for Freescale PowerPC VLE instructions. @item -mvsx Generate code for processors with Vector-Scalar (VSX) instructions. +@item -mhtm +Generate code for processors with Hardware Transactional Memory instructions. + @item -mpower4, -mpwr4 Generate code for Power4 architecture. @@ -133,6 +136,10 @@ Generate code for Power6 architecture. @item -mpower7, -mpwr7 Generate code for Power7 architecture. +@item -mpower8, -mpwr8 +Generate code for Power8 architecture. + +@item -mcell @item -mcell Generate code for Cell Broadband Engine architecture. diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 22e1953..4e2d198 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2013-01-10 Peter Bergner <bergner@vnet.ibm.com> + + * gas/ppc/htm.d: New test. + * gas/ppc/htm.s: Likewise. + * gas/ppc/power8.d: Likewise. + * gas/ppc/power8.s: Likewise. + * gas/ppc/ppc.exp: Run them. + 2013-01-10 Will Newton <will.newton@imgtec.com> * gas/metag/labelarithmetic.d: New file. diff --git a/gas/testsuite/gas/ppc/htm.d b/gas/testsuite/gas/ppc/htm.d new file mode 100644 index 0000000..5eae6af --- /dev/null +++ b/gas/testsuite/gas/ppc/htm.d @@ -0,0 +1,26 @@ +#as: -mhtm +#objdump: -dr -Mhtm +#name: Hardware Transactional Memory (HTM) tests + +.*: +file format elf(32)?(64)?-powerpc.* + +Disassembly of section \.text: + +0+00 <htm>: + 0: (7c 05 07 1d|1d 07 05 7c) tabort\. r5 + 4: (7c e8 86 1d|1d 86 e8 7c) tabortwc\. 7,r8,r16 + 8: (7e 8b 56 5d|5d 56 8b 7e) tabortdc\. 20,r11,r10 + c: (7e 2a 9e 9d|9d 9e 2a 7e) tabortwci\. 17,r10,-13 + 10: (7f a3 de dd|dd de a3 7f) tabortdci\. 29,r3,-5 + 14: (7c 00 05 1d|1d 05 00 7c) tbegin\. + 18: (7f 80 05 9c|9c 05 80 7f) tcheck cr7 + 1c: (7c 00 05 5d|5d 05 00 7c) tend\. + 20: (7c 00 05 5d|5d 05 00 7c) tend\. + 24: (7e 00 05 5d|5d 05 00 7e) tendall\. + 28: (7e 00 05 5d|5d 05 00 7e) tendall\. + 2c: (7c 18 07 5d|5d 07 18 7c) treclaim\. r24 + 30: (7c 00 07 dd|dd 07 00 7c) trechkpt\. + 34: (7c 00 05 dd|dd 05 00 7c) tsuspend\. + 38: (7c 00 05 dd|dd 05 00 7c) tsuspend\. + 3c: (7c 20 05 dd|dd 05 20 7c) tresume\. + 40: (7c 20 05 dd|dd 05 20 7c) tresume\. diff --git a/gas/testsuite/gas/ppc/htm.s b/gas/testsuite/gas/ppc/htm.s new file mode 100644 index 0000000..362689b --- /dev/null +++ b/gas/testsuite/gas/ppc/htm.s @@ -0,0 +1,19 @@ + .section ".text" +htm: + tabort. 5 + tabortwc. 7,8,16 + tabortdc. 20,11,10 + tabortwci. 17,10,-13 + tabortdci. 29,3,-5 + tbegin. 0 + tcheck 7 + tend. 0 + tend. + tend. 1 + tendall. + treclaim. 24 + trechkpt. + tsr. 0 + tsuspend. + tsr. 1 + tresume. diff --git a/gas/testsuite/gas/ppc/power8.d b/gas/testsuite/gas/ppc/power8.d new file mode 100644 index 0000000..8645280 --- /dev/null +++ b/gas/testsuite/gas/ppc/power8.d @@ -0,0 +1,29 @@ +#as: -mpower8 +#objdump: -dr -Mpower8 +#name: POWER8 tests (includes Altivec, VSX and HTM) + +.*: +file format elf(32)?(64)?-powerpc.* + +Disassembly of section \.text: + +0+00 <power8>: + 0: (7c 05 07 1d|1d 07 05 7c) tabort\. r5 + 4: (7c e8 86 1d|1d 86 e8 7c) tabortwc\. 7,r8,r16 + 8: (7e 8b 56 5d|5d 56 8b 7e) tabortdc\. 20,r11,r10 + c: (7e 2a 9e 9d|9d 9e 2a 7e) tabortwci\. 17,r10,-13 + 10: (7f a3 de dd|dd de a3 7f) tabortdci\. 29,r3,-5 + 14: (7c 00 05 1d|1d 05 00 7c) tbegin\. + 18: (7f 80 05 9c|9c 05 80 7f) tcheck cr7 + 1c: (7c 00 05 5d|5d 05 00 7c) tend\. + 20: (7c 00 05 5d|5d 05 00 7c) tend\. + 24: (7e 00 05 5d|5d 05 00 7e) tendall\. + 28: (7e 00 05 5d|5d 05 00 7e) tendall\. + 2c: (7c 18 07 5d|5d 07 18 7c) treclaim\. r24 + 30: (7c 00 07 dd|dd 07 00 7c) trechkpt\. + 34: (7c 00 05 dd|dd 05 00 7c) tsuspend\. + 38: (7c 00 05 dd|dd 05 00 7c) tsuspend\. + 3c: (7c 20 05 dd|dd 05 20 7c) tresume\. + 40: (7c 20 05 dd|dd 05 20 7c) tresume\. + 44: (60 42 00 00|00 00 42 60) ori r2,r2,0 + 48: (60 00 00 00|00 00 00 60) nop + 4c: (60 42 00 00|00 00 42 60) ori r2,r2,0 diff --git a/gas/testsuite/gas/ppc/power8.s b/gas/testsuite/gas/ppc/power8.s new file mode 100644 index 0000000..dd67485 --- /dev/null +++ b/gas/testsuite/gas/ppc/power8.s @@ -0,0 +1,21 @@ + .section ".text" +power8: + tabort. 5 + tabortwc. 7,8,16 + tabortdc. 20,11,10 + tabortwci. 17,10,-13 + tabortdci. 29,3,-5 + tbegin. + tcheck 7 + tend. 0 + tend. + tend. 1 + tendall. + treclaim. 24 + trechkpt. + tsr. 0 + tsuspend. + tsr. 1 + tresume. + ori 2,2,0 + .p2align 4,,15 diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index dd96200..b7f56b0 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -83,7 +83,9 @@ if { [istarget powerpc*-*-*] } then { run_dump_test "power4_32" run_dump_test "power6" run_dump_test "power7" + run_dump_test "power8" run_dump_test "vsx" + run_dump_test "htm" run_dump_test "titan" } } |