Commit b639c3c2 by Janis Johnson Committed by Janis Johnson

invoke.texi (RS/6000 and PowerPC Options): Add -mcmpb and -mdfp.

	* doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcmpb and -mdfp.
	* configure.ac (HAVE_GAS_CMPB): Check for assembler support of the
	cmpb instruction.
	(HAVE_GAS_DFP): Check for assembler support of decimal floating
	point instructions.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/rs6000/rs6000.opt (mcmpb, mdfp): New.
	* config/rs6000/rs6000.c (rs6000_override_options): Add CMPB and DFP
	masks to power6 and power6x and to POWERPC_MASKS.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	_ARCH_PWR6.
	* config/rs6000/rs6000.h: Check assembler support for CMPB and DFP.
	* config/rs6000/sysv4.opt (mprototype): Use variable, not mask.
	* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
	Access PROTOTYPE as variable, not mask.

From-SVN: r122179
parent 7cd689bc
2007-02-20 Janis Johnson <janis187@us.ibm.com>
* doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcmpb and -mdfp.
* configure.ac (HAVE_GAS_CMPB): Check for assembler support of the
cmpb instruction.
(HAVE_GAS_DFP): Check for assembler support of decimal floating
point instructions.
* configure: Regenerate.
* config.in: Regenerate.
* config/rs6000/rs6000.opt (mcmpb, mdfp): New.
* config/rs6000/rs6000.c (rs6000_override_options): Add CMPB and DFP
masks to power6 and power6x and to POWERPC_MASKS.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
_ARCH_PWR6.
* config/rs6000/rs6000.h: Check assembler support for CMPB and DFP.
* config/rs6000/sysv4.opt (mprototype): Use variable, not mask.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
Access PROTOTYPE as variable, not mask.
2007-02-20 Steven Bosscher <steven@gcc.gnu.org> 2007-02-20 Steven Bosscher <steven@gcc.gnu.org>
* rtl.h (remove_reg_equal_equiv_notes): New prototype. * rtl.h (remove_reg_equal_equiv_notes): New prototype.
......
...@@ -160,6 +160,18 @@ ...@@ -160,6 +160,18 @@
#endif #endif
/* Define if your assembler supports cmpb. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_CMPB
#endif
/* Define if your assembler supports DFP instructions. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_DFP
#endif
/* Define if your assembler supports dwarf2 .file/.loc directives, and /* Define if your assembler supports dwarf2 .file/.loc directives, and
preserves file table indices exactly as given. */ preserves file table indices exactly as given. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
......
...@@ -98,9 +98,9 @@ extern int dot_symbols; ...@@ -98,9 +98,9 @@ extern int dot_symbols;
target_flags &= ~MASK_EABI; \ target_flags &= ~MASK_EABI; \
error (INVALID_64BIT, "eabi"); \ error (INVALID_64BIT, "eabi"); \
} \ } \
if (target_flags & MASK_PROTOTYPE) \ if (TARGET_PROTOTYPE) \
{ \ { \
target_flags &= ~MASK_PROTOTYPE; \ TARGET_PROTOTYPE = 0; \
error (INVALID_64BIT, "prototype"); \ error (INVALID_64BIT, "prototype"); \
} \ } \
if ((target_flags & MASK_POWERPC64) == 0) \ if ((target_flags & MASK_POWERPC64) == 0) \
......
...@@ -106,6 +106,8 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile) ...@@ -106,6 +106,8 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile)
builtin_define ("_ARCH_PWR5"); builtin_define ("_ARCH_PWR5");
if (TARGET_FPRND) if (TARGET_FPRND)
builtin_define ("_ARCH_PWR5X"); builtin_define ("_ARCH_PWR5X");
if (TARGET_CMPB)
builtin_define ("_ARCH_PWR6");
if (TARGET_MFPGPR) if (TARGET_MFPGPR)
builtin_define ("_ARCH_PWR6X"); builtin_define ("_ARCH_PWR6X");
if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC) if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC)
......
...@@ -1323,10 +1323,10 @@ rs6000_override_options (const char *default_cpu) ...@@ -1323,10 +1323,10 @@ rs6000_override_options (const char *default_cpu)
| MASK_MFCRF | MASK_POPCNTB | MASK_FPRND}, | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND},
{"power6", PROCESSOR_POWER6, {"power6", PROCESSOR_POWER6,
POWERPC_7400_MASK | MASK_POWERPC64 | MASK_MFCRF | MASK_POPCNTB POWERPC_7400_MASK | MASK_POWERPC64 | MASK_MFCRF | MASK_POPCNTB
| MASK_FPRND}, | MASK_FPRND | MASK_CMPB | MASK_DFP },
{"power6x", PROCESSOR_POWER6, {"power6x", PROCESSOR_POWER6,
POWERPC_7400_MASK | MASK_POWERPC64 | MASK_MFCRF | MASK_POPCNTB POWERPC_7400_MASK | MASK_POWERPC64 | MASK_MFCRF | MASK_POPCNTB
| MASK_FPRND | MASK_MFPGPR}, | MASK_FPRND | MASK_CMPB | MASK_MFPGPR | MASK_DFP },
{"powerpc", PROCESSOR_POWERPC, POWERPC_BASE_MASK}, {"powerpc", PROCESSOR_POWERPC, POWERPC_BASE_MASK},
{"powerpc64", PROCESSOR_POWERPC64, {"powerpc64", PROCESSOR_POWERPC64,
POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_POWERPC64}, POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_POWERPC64},
...@@ -1353,7 +1353,7 @@ rs6000_override_options (const char *default_cpu) ...@@ -1353,7 +1353,7 @@ rs6000_override_options (const char *default_cpu)
POWERPC_MASKS = (POWERPC_BASE_MASK | MASK_PPC_GPOPT | MASK_STRICT_ALIGN POWERPC_MASKS = (POWERPC_BASE_MASK | MASK_PPC_GPOPT | MASK_STRICT_ALIGN
| MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_ALTIVEC | MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_ALTIVEC
| MASK_MFCRF | MASK_POPCNTB | MASK_FPRND | MASK_MULHW | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND | MASK_MULHW
| MASK_DLMZB | MASK_MFPGPR) | MASK_DLMZB | MASK_CMPB | MASK_MFPGPR | MASK_DFP)
}; };
rs6000_init_hard_regno_mode_ok (); rs6000_init_hard_regno_mode_ok ();
......
...@@ -164,6 +164,14 @@ ...@@ -164,6 +164,14 @@
#define TARGET_FPRND 0 #define TARGET_FPRND 0
#endif #endif
/* Define TARGET_CMPB if the target assembler does not support the
cmpb instruction. */
#ifndef HAVE_AS_CMPB
#undef TARGET_CMPB
#define TARGET_CMPB 0
#endif
/* Define TARGET_MFPGPR if the target assembler does not support the /* Define TARGET_MFPGPR if the target assembler does not support the
mffpr and mftgpr instructions. */ mffpr and mftgpr instructions. */
...@@ -172,6 +180,13 @@ ...@@ -172,6 +180,13 @@
#define TARGET_MFPGPR 0 #define TARGET_MFPGPR 0
#endif #endif
/* Define TARGET_DFP if the target assembler does not support decimal
floating point instructions. */
#ifndef HAVE_AS_DFP
#undef TARGET_DFP
#define TARGET_DFP 0
#endif
#ifndef TARGET_SECURE_PLT #ifndef TARGET_SECURE_PLT
#define TARGET_SECURE_PLT 0 #define TARGET_SECURE_PLT 0
#endif #endif
......
; Options for the rs6000 port of the compiler ; Options for the rs6000 port of the compiler
; ;
; Copyright (C) 2005 Free Software Foundation, Inc. ; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
; Contributed by Aldy Hernandez <aldy@quesejoda.com>. ; Contributed by Aldy Hernandez <aldy@quesejoda.com>.
; ;
; This file is part of GCC. ; This file is part of GCC.
...@@ -64,6 +64,10 @@ mfprnd ...@@ -64,6 +64,10 @@ mfprnd
Target Report Mask(FPRND) Target Report Mask(FPRND)
Use PowerPC V2.02 floating point rounding instructions Use PowerPC V2.02 floating point rounding instructions
mcmpb
Target Report Mask(CMPB)
Use PowerPC V2.05 compare bytes instruction
mmfpgpr mmfpgpr
Target Report Mask(MFPGPR) Target Report Mask(MFPGPR)
Use extended PowerPC V2.05 move floating point to/from GPR instructions Use extended PowerPC V2.05 move floating point to/from GPR instructions
...@@ -72,6 +76,10 @@ maltivec ...@@ -72,6 +76,10 @@ maltivec
Target Report Mask(ALTIVEC) Target Report Mask(ALTIVEC)
Use AltiVec instructions Use AltiVec instructions
mdfp
Target Report Mask(DFP)
Use decimal floating point instructions
mmulhw mmulhw
Target Report Mask(MULHW) Target Report Mask(MULHW)
Use 4xx half-word multiply instructions Use 4xx half-word multiply instructions
......
...@@ -75,7 +75,7 @@ Target RejectNegative ...@@ -75,7 +75,7 @@ Target RejectNegative
no description yet no description yet
mprototype mprototype
Target Mask(PROTOTYPE) Target Var(TARGET_PROTOTYPE)
Assume all variable arg functions are prototyped Assume all variable arg functions are prototyped
;; FIXME: Does nothing. ;; FIXME: Does nothing.
......
...@@ -2925,6 +2925,36 @@ LCF0: ...@@ -2925,6 +2925,36 @@ LCF0:
addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
esac esac
case $target in
*-*-aix*) conftest_s=' .machine "pwr6"
.csect .text[[PR]]
cmpb 3,4,5';;
*) conftest_s=' .machine power6
.text
cmpb 3,4,5';;
esac
gcc_GAS_CHECK_FEATURE([compare bytes support],
gcc_cv_as_powerpc_cmpb, [9,99,0], -a32,
[$conftest_s],,
[AC_DEFINE(HAVE_AS_CMPB, 1,
[Define if your assembler supports cmpb.])])
case $target in
*-*-aix*) conftest_s=' .machine "pwr6"
.csect .text[[PR]]
dadd 1,3';;
*) conftest_s=' .machine power6
.text
dadd 1,3';;
esac
gcc_GAS_CHECK_FEATURE([decimal float support],
gcc_cv_as_powerpc_dfp, [9,99,0], -a32,
[$conftest_s],,
[AC_DEFINE(HAVE_AS_DFP, 1,
[Define if your assembler supports DFP instructions.])])
gcc_GAS_CHECK_FEATURE([rel16 relocs], gcc_GAS_CHECK_FEATURE([rel16 relocs],
gcc_cv_as_powerpc_rel16, [2,17,0], -a32, gcc_cv_as_powerpc_rel16, [2,17,0], -a32,
[$conftest_s],, [$conftest_s],,
......
...@@ -664,7 +664,7 @@ See RS/6000 and PowerPC Options. ...@@ -664,7 +664,7 @@ See RS/6000 and PowerPC Options.
-mpowerpc-gpopt -mno-powerpc-gpopt @gol -mpowerpc-gpopt -mno-powerpc-gpopt @gol
-mpowerpc-gfxopt -mno-powerpc-gfxopt @gol -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
-mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mfprnd -mno-fprnd @gol -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mfprnd -mno-fprnd @gol
-mmfpgpr -mno-mfpgpr @gol -mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mdfp -mno-dfp @gol
-mnew-mnemonics -mold-mnemonics @gol -mnew-mnemonics -mold-mnemonics @gol
-mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol
-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol -m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol
...@@ -11799,8 +11799,12 @@ These @samp{-m} options are defined for the IBM RS/6000 and PowerPC: ...@@ -11799,8 +11799,12 @@ These @samp{-m} options are defined for the IBM RS/6000 and PowerPC:
@itemx -mno-popcntb @itemx -mno-popcntb
@itemx -mfprnd @itemx -mfprnd
@itemx -mno-fprnd @itemx -mno-fprnd
@itemx -mcmpb
@itemx -mno-cmpb
@itemx -mmfpgpr @itemx -mmfpgpr
@itemx -mno-mfpgpr @itemx -mno-mfpgpr
@itemx -mdfp
@itemx -mno-dfp
@opindex mpower @opindex mpower
@opindex mno-power @opindex mno-power
@opindex mpower2 @opindex mpower2
...@@ -11819,8 +11823,12 @@ These @samp{-m} options are defined for the IBM RS/6000 and PowerPC: ...@@ -11819,8 +11823,12 @@ These @samp{-m} options are defined for the IBM RS/6000 and PowerPC:
@opindex mno-popcntb @opindex mno-popcntb
@opindex mfprnd @opindex mfprnd
@opindex mno-fprnd @opindex mno-fprnd
@opindex mcmpb
@opindex mno-cmpb
@opindex mmfpgpr @opindex mmfpgpr
@opindex mno-mfpgpr @opindex mno-mfpgpr
@opindex mdfp
@opindex mno-dfp
GCC supports two related instruction set architectures for the GCC supports two related instruction set architectures for the
RS/6000 and PowerPC@. The @dfn{POWER} instruction set are those RS/6000 and PowerPC@. The @dfn{POWER} instruction set are those
instructions supported by the @samp{rios} chip set used in the original instructions supported by the @samp{rios} chip set used in the original
...@@ -11865,10 +11873,15 @@ architecture. ...@@ -11865,10 +11873,15 @@ architecture.
The @option{-mfprnd} option allows GCC to generate the FP round to The @option{-mfprnd} option allows GCC to generate the FP round to
integer instructions implemented on the POWER5+ processor and other integer instructions implemented on the POWER5+ processor and other
processors that support the PowerPC V2.03 architecture. processors that support the PowerPC V2.03 architecture.
The @option{-mcmpb} option allows GCC to generate the compare bytes
instruction implemented on the POWER6 processor and other processors
that support the PowerPC V2.05 architecture.
The @option{-mmfpgpr} option allows GCC to generate the FP move to/from The @option{-mmfpgpr} option allows GCC to generate the FP move to/from
general purpose register instructions implemented on the POWER6X general purpose register instructions implemented on the POWER6X
processor and other processors that support the extended PowerPC V2.05 processor and other processors that support the extended PowerPC V2.05
architecture. architecture.
The @option{-mdfp} option allows GCC to generate the decimal floating
point instructions implemented on some POWER processors.
The @option{-mpowerpc64} option allows GCC to generate the additional The @option{-mpowerpc64} option allows GCC to generate the additional
64-bit instructions that are found in the full PowerPC64 architecture 64-bit instructions that are found in the full PowerPC64 architecture
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment