aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-08-14 09:53:55 +0200
committerStephane Carrez <ciceron@gcc.gnu.org>2002-08-14 09:53:55 +0200
commit8a0b86f5aae42e42a05767fb0cef745bc54923f7 (patch)
tree5e448eb33286f05a2698bce9c10589e75fe1f1f8 /gcc
parentd6381f4e4f98526cd0d64efe21fa611898fa60f0 (diff)
downloadgcc-8a0b86f5aae42e42a05767fb0cef745bc54923f7.zip
gcc-8a0b86f5aae42e42a05767fb0cef745bc54923f7.tar.gz
gcc-8a0b86f5aae42e42a05767fb0cef745bc54923f7.tar.bz2
invoke.texi: Document -minmax for 68HC12.
* doc/invoke.texi: Document -minmax for 68HC12. * config/m68hc11/m68hc11.md ("umaxqi3"): Use TARGET_MIN_MAX. ("uminqi3"): Likewise. ("uminhi3", "umaxhi3"): Likewise. * config/m68hc11/m68hc11.h (MASK_MIN_MAX): Define. (TARGET_MIN_MAX): Define. (TARGET_SWITCHES): New option -minmax/-mnominmax. From-SVN: r56284
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/m68hc11/m68hc11.c4
-rw-r--r--gcc/config/m68hc11/m68hc11.h6
-rw-r--r--gcc/config/m68hc11/m68hc11.md8
-rw-r--r--gcc/doc/invoke.texi8
5 files changed, 31 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 15d43d4..3e3824c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,17 @@
2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
+ * doc/invoke.texi: Document -minmax for 68HC12.
+
+ * config/m68hc11/m68hc11.md ("umaxqi3"): Use TARGET_MIN_MAX.
+ ("uminqi3"): Likewise.
+ ("uminhi3", "umaxhi3"): Likewise.
+
+ * config/m68hc11/m68hc11.h (MASK_MIN_MAX): Define.
+ (TARGET_MIN_MAX): Define.
+ (TARGET_SWITCHES): New option -minmax/-mnominmax.
+
+2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
+
* config/m68hc11/t-m68hc11-gas (LIB1ASMFUNCS): Build __far_trampoline.
(MULTILIB_OPTIONS): Must also generate for -mlong-calls.
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index d52289f..2d97787 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -253,7 +253,7 @@ m68hc11_override_options ()
target_flags &= ~TARGET_DEFAULT;
if (!TARGET_M6812)
- target_flags &= ~TARGET_AUTO_INC_DEC;
+ target_flags &= ~(TARGET_AUTO_INC_DEC | TARGET_MIN_MAX);
m68hc11_cost = &m6811_cost;
m68hc11_min_offset = 0;
m68hc11_max_offset = 256;
@@ -284,7 +284,7 @@ m68hc11_override_options ()
m68hc11_sp_correction = 0;
m68hc11_tmp_regs_class = TMP_REGS;
target_flags &= ~MASK_M6811;
- target_flags |= MASK_NO_DIRECT_MODE;
+ target_flags |= MASK_NO_DIRECT_MODE | MASK_MIN_MAX;
if (m68hc11_soft_reg_count == 0)
m68hc11_soft_reg_count = "0";
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index 32a9b63..751e18f 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -120,6 +120,7 @@ extern short *reg_renumber; /* def in local_alloc.c */
#define MASK_M6811 0010
#define MASK_M6812 0020
#define MASK_NO_DIRECT_MODE 0040
+#define MASK_MIN_MAX 0100
#define MASK_LONG_CALLS 0200
#define TARGET_OP_TIME (optimize && optimize_size == 0)
@@ -127,6 +128,7 @@ extern short *reg_renumber; /* def in local_alloc.c */
#define TARGET_M6811 (target_flags & MASK_M6811)
#define TARGET_M6812 (target_flags & MASK_M6812)
#define TARGET_AUTO_INC_DEC (target_flags & MASK_AUTO_INC_DEC)
+#define TARGET_MIN_MAX (target_flags & MASK_MIN_MAX)
#define TARGET_NO_DIRECT_MODE (target_flags & MASK_NO_DIRECT_MODE)
#define TARGET_RELAX (TARGET_NO_DIRECT_MODE)
#define TARGET_LONG_CALLS (target_flags & MASK_LONG_CALLS)
@@ -162,6 +164,10 @@ extern short *reg_renumber; /* def in local_alloc.c */
N_("Auto pre/post decrement increment allowed")}, \
{ "noauto-incdec", - MASK_AUTO_INC_DEC, \
N_("Auto pre/post decrement increment not allowed")}, \
+ { "inmax", MASK_MIN_MAX, \
+ N_("Min/max instructions allowed")}, \
+ { "nominmax", MASK_MIN_MAX, \
+ N_("Min/max instructions not allowed")}, \
{ "long-calls", MASK_LONG_CALLS, \
N_("Use call and rtc for function calls and returns")}, \
{ "nolong-calls", - MASK_LONG_CALLS, \
diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md
index 3c0f197..5b7e088 100644
--- a/gcc/config/m68hc11/m68hc11.md
+++ b/gcc/config/m68hc11/m68hc11.md
@@ -1666,7 +1666,7 @@
[(set (match_operand:QI 0 "nonimmediate_operand" "=d,m")
(umin:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0")
(match_operand:QI 2 "general_operand" "m,d")))]
- "TARGET_M6812"
+ "TARGET_M6812 && TARGET_MIN_MAX"
"*
{
/* Flags are set according to (sub:QI (operand 1) (operand2)).
@@ -1688,7 +1688,7 @@
[(set (match_operand:QI 0 "nonimmediate_operand" "=d,m")
(umax:QI (match_operand:QI 1 "nonimmediate_operand" "%0,0")
(match_operand:QI 2 "general_operand" "m,d")))]
- "TARGET_M6812"
+ "TARGET_M6812 && TARGET_MIN_MAX"
"*
{
/* Flags are set according to (sub:QI (operand 1) (operand2)).
@@ -1710,7 +1710,7 @@
[(set (match_operand:HI 0 "nonimmediate_operand" "=d,m")
(umin:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0")
(match_operand:HI 2 "general_operand" "m,d")))]
- "TARGET_M6812"
+ "TARGET_M6812 && TARGET_MIN_MAX"
"*
{
/* Flags are set according to (sub:HI (operand 1) (operand2)). */
@@ -1729,7 +1729,7 @@
[(set (match_operand:HI 0 "nonimmediate_operand" "=d,m")
(umax:HI (match_operand:HI 1 "nonimmediate_operand" "%0,0")
(match_operand:HI 2 "general_operand" "m,d")))]
- "TARGET_M6812"
+ "TARGET_M6812 && TARGET_MIN_MAX"
"*
{
/* Flags are set according to (sub:HI (operand 1) (operand2)). */
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1aa156f..79a2149 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -338,7 +338,7 @@ in the following sections.
@emph{M68hc1x Options}
@gccoptlist{
-m6811 -m6812 -m68hc11 -m68hc12 @gol
--mauto-incdec -mlong-calls -mshort -msoft-reg-count=@var{count}}
+-mauto-incdec -minmax -mlong-calls -mshort -msoft-reg-count=@var{count}}
@emph{VAX Options}
@gccoptlist{
@@ -5171,6 +5171,12 @@ when the compiler is configured for 68HC12-based systems.
Enable the use of 68HC12 pre and post auto-increment and auto-decrement
addressing modes.
+@item -minmax
+@itemx -nominmax
+@opindex minmax
+@opindex mnominmax
+Enable the use of 68HC12 min and max instructions.
+
@item -mlong-calls
@itemx -mno-long-calls
@opindex mlong-calls