* [3.4-BIB]: Some new MD patterns for VMS
@ 2002-11-06 11:43 Douglas B Rupp
2002-11-18 15:03 ` Richard Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Douglas B Rupp @ 2002-11-06 11:43 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
These patterns allow the use of vendor compiler support functions that are slightly faster than
the default C functions.
OK to commit?
[-- Attachment #2: alpha_md.diff.txt --]
[-- Type: text/plain, Size: 3975 bytes --]
* config/alpha/alpha.md (movstrdi, clrstrdi): New VMS patterns.
Index: gcc/config/alpha/alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.195.4.4
diff -u -p -r1.195.4.4 alpha.md
--- gcc/config/alpha/alpha.md 21 Oct 2002 17:52:08 -0000 1.195.4.4
+++ gcc/config/alpha/alpha.md 6 Nov 2002 19:20:18 -0000
@@ -6460,6 +6460,57 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
FAIL;
})
+(define_expand "movstrdi"
+ [(parallel [(set (match_operand:BLK 0 "memory_operand" "")
+ (match_operand:BLK 1 "memory_operand" ""))
+ (use (match_operand:DI 2 "immediate_operand" ""))
+ (use (match_operand:DI 3 "immediate_operand" ""))
+ (use (match_dup 4))
+ (clobber (reg:DI 25))
+ (clobber (reg:DI 16))
+ (clobber (reg:DI 17))
+ (clobber (reg:DI 18))
+ (clobber (reg:DI 19))
+ (clobber (reg:DI 20))
+ (clobber (reg:DI 26))
+ (clobber (reg:DI 27))])]
+ "TARGET_ABI_OPEN_VMS"
+{
+ operands[4] = gen_rtx_SYMBOL_REF (Pmode, "OTS$MOVE");
+ alpha_need_linkage (XSTR (operands[4], 0), 0);
+})
+
+(define_insn "*movstrdi_1"
+ [(set (match_operand:BLK 0 "memory_operand" "=m,=m")
+ (match_operand:BLK 1 "memory_operand" "m,m"))
+ (use (match_operand:DI 2 "nonmemory_operand" "r,i"))
+ (use (match_operand:DI 3 "immediate_operand" ""))
+ (use (match_operand:DI 4 "call_operand" "i,i"))
+ (clobber (reg:DI 25))
+ (clobber (reg:DI 16))
+ (clobber (reg:DI 17))
+ (clobber (reg:DI 18))
+ (clobber (reg:DI 19))
+ (clobber (reg:DI 20))
+ (clobber (reg:DI 26))
+ (clobber (reg:DI 27))]
+ "TARGET_ABI_OPEN_VMS"
+ "*
+{
+ operands [5] = alpha_use_linkage (operands [4], cfun->decl, 0, 1);
+ switch (which_alternative)
+ {
+ case 0:
+ return \"lda $16,%0\;bis $31,%2,$17\;lda $18,%1\;ldq $26,%5\;lda $25,3($31)\;jsr $26,%4\;ldq $27,0($29)\";
+ case 1:
+ return \"lda $16,%0\;lda $17,%2($31)\;lda $18,%1\;ldq $26,%5\;lda $25,3($31)\;jsr $26,%4\;ldq $27,0($29)\";
+ default:
+ abort();
+ }
+}"
+ [(set_attr "type" "multi")
+ (set_attr "length" "28")])
+
(define_expand "clrstrqi"
[(parallel [(set (match_operand:BLK 0 "memory_operand" "")
(const_int 0))
@@ -6472,6 +6523,52 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
else
FAIL;
})
+
+(define_expand "clrstrdi"
+ [(parallel [(set (match_operand:BLK 0 "memory_operand" "")
+ (const_int 0))
+ (use (match_operand:DI 1 "immediate_operand" ""))
+ (use (match_operand:DI 2 "immediate_operand" ""))
+ (use (match_dup 3))
+ (clobber (reg:DI 25))
+ (clobber (reg:DI 16))
+ (clobber (reg:DI 17))
+ (clobber (reg:DI 26))
+ (clobber (reg:DI 27))])]
+ "TARGET_ABI_OPEN_VMS"
+{
+ operands[3] = gen_rtx_SYMBOL_REF (Pmode, "OTS$ZERO");
+ alpha_need_linkage (XSTR (operands[3], 0), 0);
+})
+
+(define_insn "*clrstrdi_1"
+ [(set (match_operand:BLK 0 "memory_operand" "=m,=m")
+ (const_int 0))
+ (use (match_operand:DI 1 "nonmemory_operand" "r,i"))
+ (use (match_operand:DI 2 "immediate_operand" ""))
+ (use (match_operand:DI 3 "call_operand" "i,i"))
+ (clobber (reg:DI 25))
+ (clobber (reg:DI 16))
+ (clobber (reg:DI 17))
+ (clobber (reg:DI 26))
+ (clobber (reg:DI 27))]
+ "TARGET_ABI_OPEN_VMS"
+ "*
+{
+ operands [4] = alpha_use_linkage (operands [3], cfun->decl, 0, 1);
+ switch (which_alternative)
+ {
+ case 0:
+ return \"lda $16,%0\;bis $31,%2,$17\;ldq $26,%4\;lda $25,2($31)\;jsr $26,%3\;ldq $27,0($29)\";
+ case 1:
+ return \"lda $16,%0\;lda $17,%2($31)\;ldq $26,%4\;lda $25,2($31)\;jsr $26,%3\;ldq $27,0($29)\";
+ default:
+ abort();
+ }
+}"
+ [(set_attr "type" "multi")
+ (set_attr "length" "24")])
+
\f
;; Subroutine of stack space allocation. Perform a stack probe.
(define_expand "probe_stack"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [3.4-BIB]: Some new MD patterns for VMS
2002-11-06 11:43 [3.4-BIB]: Some new MD patterns for VMS Douglas B Rupp
@ 2002-11-18 15:03 ` Richard Henderson
2002-11-20 12:07 ` [3.4-BIB]: Cleanup some " Douglas B Rupp
0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2002-11-18 15:03 UTC (permalink / raw)
To: Douglas B Rupp; +Cc: gcc-patches
On Wed, Nov 06, 2002 at 11:43:27AM -0800, Douglas B Rupp wrote:
> + "*
> +{
'"*' is no longer needed; don't use it. This also
cleans up some of the other string escapes in your
patterns. Otherwise ok.
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* [3.4-BIB]: Cleanup some MD patterns for VMS
2002-11-18 15:03 ` Richard Henderson
@ 2002-11-20 12:07 ` Douglas B Rupp
2002-11-20 13:19 ` Richard Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Douglas B Rupp @ 2002-11-20 12:07 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
Based on your comments http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01075.html, I search through alpha.md
and found some similar problems.
OK to commit?
[-- Attachment #2: alpha_md2.diff.txt --]
[-- Type: text/plain, Size: 1856 bytes --]
2002-11-20 Douglas B Rupp <rupp@gnat.com>
* config/alpha/alpha.md (call_vms_1, call_value_vms_1):
Cleanup syntax.
Index: gcc/config/alpha/alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.195.4.4
diff -u -p -r1.195.4.4 alpha.md
--- gcc/config/alpha/alpha.md 21 Oct 2002 17:52:08 -0000 1.195.4.4
+++ gcc/config/alpha/alpha.md 20 Nov 2002 19:28:44 -0000
@@ -4727,20 +4727,19 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
(use (reg:DI 26))
(clobber (reg:DI 27))]
"TARGET_ABI_OPEN_VMS"
- "*
{
switch (which_alternative)
{
case 0:
- return \"mov %2,$27\;jsr $26,0\;ldq $27,0($29)\";
+ return "mov %2,$27\;jsr $26,0\;ldq $27,0($29)";
case 1:
operands [2] = alpha_use_linkage (operands [0], cfun->decl, 1, 0);
operands [3] = alpha_use_linkage (operands [0], cfun->decl, 0, 0);
- return \"ldq $26,%3\;ldq $27,%2\;jsr $26,%0\;ldq $27,0($29)\";
+ return "ldq $26,%3\;ldq $27,%2\;jsr $26,%0\;ldq $27,0($29)";
default:
abort();
}
-}"
+}
[(set_attr "type" "jsr")
(set_attr "length" "12,16")])
@@ -7918,20 +8012,19 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
(use (reg:DI 26))
(clobber (reg:DI 27))]
"TARGET_ABI_OPEN_VMS"
- "*
{
switch (which_alternative)
{
case 0:
- return \"mov %3,$27\;jsr $26,0\;ldq $27,0($29)\";
+ return "mov %3,$27\;jsr $26,0\;ldq $27,0($29)";
case 1:
operands [3] = alpha_use_linkage (operands [1], cfun->decl, 1, 0);
operands [4] = alpha_use_linkage (operands [1], cfun->decl, 0, 0);
- return \"ldq $26,%4\;ldq $27,%3\;jsr $26,%1\;ldq $27,0($29)\";
+ return "ldq $26,%4\;ldq $27,%3\;jsr $26,%1\;ldq $27,0($29)";
default:
abort();
}
-}"
+}
[(set_attr "type" "jsr")
(set_attr "length" "12,16")])
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-20 21:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06 11:43 [3.4-BIB]: Some new MD patterns for VMS Douglas B Rupp
2002-11-18 15:03 ` Richard Henderson
2002-11-20 12:07 ` [3.4-BIB]: Cleanup some " Douglas B Rupp
2002-11-20 13:19 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).