Article View: gnu.gcc.bug
Article #2005GCC improvements for i386
From: Lennart Augustsson
Date: Sun, 27 Nov 1988 00:47
Date: Sun, 27 Nov 1988 00:47
111 lines
2962 bytes
2962 bytes
The following is a context diff for i386.md and it will give sligthly better
code than the original md file. I have used it with gcc 1.31 and successfully
bootstrapped the compiler.
-- Lennart Augustsson
*** i386.md.old Thu Nov 24 17:54:52 1988
--- i386.md Thu Oct 27 00:53:29 1988
***************
*** 66,71
""
"*
{
operands[1] = const0_rtx;
return AS2 (cmp%L,%1,%0);
}")
--- 66,73 -----
""
"*
{
+ if (REG_P(operands[0]))
+ return AS2 (test%L,%0,%0);
operands[1] = const0_rtx;
return AS2 (cmp%L,%1,%0);
}")
***************
*** 76,81
""
"*
{
operands[1] = const0_rtx;
return AS2 (cmp%W,%1,%0);
}")
--- 78,85 -----
""
"*
{
+ if (REG_P(operands[0]))
+ return AS2 (test%W,%0,%0);
operands[1] = const0_rtx;
return AS2 (cmp%W,%1,%0);
}")
***************
*** 86,91
""
"*
{
operands[1] = const0_rtx;
return AS2 (cmp%B,%1,%0);
}")
--- 90,97 -----
""
"*
{
+ if (REG_P(operands[0]))
+ return AS2 (test%B,%0,%0);
operands[1] = const0_rtx;
return AS2 (cmp%B,%1,%0);
}")
***************
*** 441,462
;; because it is often shorter to use these when both apply.
; ??? Why is this pattern desirable?
! (define_insn ""
! [(set (match_operand:SI 0 "push_operand" "=<")
! (plus:SI (match_operand:SI 1 "general_operand" "%r")
! (match_operand:SI 2 "general_operand" "ri")))]
! ""
! "*
! {
! rtx xops[4];
! xops[0] = operands[0];
! xops[1] = operands[1];
! xops[2] = operands[2];
! xops[3] = gen_rtx (MEM, SImode, stack_pointer_rtx);
! output_asm_insn (\"push%z1 %1\", xops);
! output_asm_insn (AS2 (add%z3,%2,%3), xops);
! RET;
! }")
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=g")
--- 447,469 -----
;; because it is often shorter to use these when both apply.
; ??? Why is this pattern desirable?
! ; This pattern only slows things down!
! ;(define_insn ""
! ; [(set (match_operand:SI 0 "push_operand" "=<")
! ; (plus:SI (match_operand:SI 1 "general_operand" "%r")
! ; (match_operand:SI 2 "general_operand" "ri")))]
! ; ""
! ; "*
! ;{
! ; rtx xops[4];
! ; xops[0] = operands[0];
! ; xops[1] = operands[1];
! ; xops[2] = operands[2];
! ; xops[3] = gen_rtx (MEM, SImode, stack_pointer_rtx);
! ; output_asm_insn (\"push%z1 %1\", xops);
! ; output_asm_insn (AS2 (add%z3,%2,%3), xops);
! ; RET;
! ;}")
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=g")
Technical Details
Message-ID:
<8811270044.AA22843@cs.chalmers.se>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!cs.chalmers.se!augustssShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!cs.chalmers.se!augustss From: augustss@cs.chalmers.se (Lennart Augustsson) Newsgroups: gnu.gcc.bug Subject: GCC improvements for i386 Message-ID: <8811270044.AA22843@cs.chalmers.se> Date: 27 Nov 88 00:47:27 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 111