🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53671

questions about gcc m68k.md file

#53671
From: Shen Xuemin
Date: Mon, 30 Sep 1991 07:25
40 lines
2242 bytes
 

I am trying to understand the machine description for the 68k, now i have some patterns which i can not explain by myself, are there any advises?

1) In the named pattern "tstsi", the existing one is as follow:

]  (define_insn "tstsi"
]    [(set (cc0)
]          (match_operand:SI 0 "general_operand" "rm"))]
]    ""
]    "*
]  {
]    if (TARGET_68020 || ! ADDRESS_REG_P (operands[0]))
]      return \"tst%.l %0\";
]    return \"cmp%.w %0,%#0\";
]  }")
 
  Why does this pattern use the "cmp.w" substitute of the "cmp.l" when the operand is in an address register though it is in SI mode ?


2) My question is in the file m68k.md at the unnamed pattern which begins at line 1216.  Part of the contest of this pattern is as follows;

]    else if (GET_CODE (operands[0]) == MEM
]             && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
]      {
]        if (REGNO (XEXP (XEXP (operands[0], 0), 0)) == STACK_POINTER_REGNUM)
]          {
]            output_asm_insn (\"clr%.w @-\", operands);
]            operands[0] = gen_rtx (MEM, GET_MODE (operands[0]),
]                                   plus_constant (stack_pointer_rtx, 1));
]            return \"move%.b %1,%0\";
]          }
]        else
]          return \"move%.b %1,%0\;clr%.b %0\";
]      }

  in the sixth line, it outputs as "clr%.w @-",  i did not find the difinition of the substitution of the operand in the TM file, i thought it should be "clr%.w %-",  does the "@" has the same meaning of "%-" which is defined in the TM file by the way of the macro PRINT_OPERAND_PUNCT_VALID_P(CODE)? 

sherman
Technical Details
Message-ID: <SHERMAN.91Sep30162510@marlboro.nff.ncl.omron.co.jp>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!astemgw!relay-omron!frf!sherman

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,3bd8a0036d63dc3b,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-09-30 00:54:06 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!astemgw!relay-omron!frf!sherman
From: sherman@nff.ncl.omron.co.jp (Shen Xuemin)
Newsgroups: gnu.gcc.help
Subject: questions about gcc m68k.md file
Message-ID: <SHERMAN.91Sep30162510@marlboro.nff.ncl.omron.co.jp>
Date: 30 Sep 91 07:25:10 GMT
Sender: news@frf.omron.co.jp
Distribution: gnu
Organization: OMRON Corp., Kyoto, Japan
Lines: 40