home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / gcc-2.3.3-src.lha / GNU / src / amiga / gcc-2.3.3 / config / elxsi.md < prev    next >
Text File  |  1994-02-06  |  40KB  |  1,441 lines

  1. ;;- Machine description for GNU compiler
  2. ;;- Elxsi Version
  3. ;;   Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc.
  4. ;;  This port done by Mike Stump <mrs@cygnus.com> in 1988, and is the first
  5. ;;  64 bit port of GNU CC.
  6. ;;  Based upon the VAX port.
  7.  
  8. ;; This file is part of GNU CC.
  9.  
  10. ;; GNU CC is free software; you can redistribute it and/or modify
  11. ;; it under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 1, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; GNU CC is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. ;; GNU General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with GNU CC; see the file COPYING.  If not, write to
  22. ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  
  24.  
  25. ;;- Instruction patterns.  When multiple patterns apply,
  26. ;;- the first one in the file is chosen.
  27. ;;-
  28. ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
  29. ;;-
  30. ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code
  31. ;;- updates for most instructions.
  32.  
  33.  
  34. (define_insn ""
  35.   [(set (reg:SI 15)
  36.      (plus:SI (reg:SI 15)
  37.           (match_operand:SI 0 "general_operand" "g")))]
  38.   ""
  39.   "add.64\\t.sp,%0")
  40.  
  41. (define_insn ""
  42.   [(set (reg:SI 15)
  43.      (plus:SI (match_operand:SI 0 "general_operand" "g")
  44.           (reg:SI 15)))]
  45.   ""
  46.   "add.64\\t.sp,%0")
  47.  
  48. (define_insn ""
  49.   [(set (match_operand:SI 0 "register_operand" "r")
  50.      (plus:SI (reg:SI 15)
  51.           (match_operand:SI 1 "general_operand" "g")))]
  52.   ""
  53.   "ld.32\\t%0,.sp\;add.64\\t%0,%1")
  54.  
  55. (define_insn ""
  56.   [(set (match_operand:SI 0 "register_operand" "r")
  57.      (plus:SI (match_operand:SI 1 "general_operand" "g")
  58.           (reg:SI 15)))]
  59.   ""
  60.   "ld.32\\t%0,.sp\;add.64\\t%0,%1")
  61.  
  62. (define_insn ""
  63.   [(set (reg:SI 15)
  64.      (minus:SI (reg:SI 15)
  65.            (match_operand:SI 0 "general_operand" "g")))]
  66.   ""
  67.   "sub.64\\t.sp,%0")
  68.  
  69. (define_insn ""
  70.   [(set (reg:SI 15)
  71.      (match_operand:SI 0 "general_operand" "rm"))]
  72.   ""
  73.   "ld.32\\t.sp,%0")
  74.  
  75. (define_insn ""
  76.   [(set (match_operand:SI 0 "general_operand" "m,r")
  77.      (reg:SI 15))]
  78.   ""
  79.   "*
  80.   if (which_alternative == 0)
  81.     return \"st.32\\t.sp,%0\";
  82.   return \"ld.32\\t%0,.sp\";
  83. ")
  84.  
  85. ; tstdi is first test insn so that it is the one to match
  86. ; a constant argument.
  87.  
  88. (define_insn "tstdi"
  89.   [(set (cc0)
  90.     (match_operand:DI 0 "register_operand" "r"))]
  91.   ""
  92.   "*
  93.     extern rtx cmp_op0, cmp_op1;
  94.     cmp_op0=operands[0]; cmp_op1=0;
  95.     return \";\\ttstdi\\t%0\";
  96. ")
  97.  
  98. (define_insn "tstdf"
  99.   [(set (cc0)
  100.     (match_operand:DF 0 "register_operand" "r"))]
  101.   ""
  102.   "*
  103.     extern rtx cmp_op0, cmp_op1;
  104.     cmp_op0=operands[0]; cmp_op1=0;
  105.     return \";\\ttstdf\\t%0\";
  106. ")
  107.  
  108. (define_insn "tstsf"
  109.   [(set (cc0)
  110.     (match_operand:SF 0 "register_operand" "r"))]
  111.   ""
  112.   "*
  113.     extern rtx cmp_op0, cmp_op1;
  114.     cmp_op0=operands[0]; cmp_op1=0;
  115.     return \";\\ttstsf\\t%0\";
  116. ")
  117.  
  118. (define_insn "cmpdi"
  119.   [(set (cc0)
  120.     (compare (match_operand:DI 0 "register_operand" "r")
  121.          (match_operand:DI 1 "general_operand" "rm")))]
  122.   ""
  123.   "*
  124.     extern rtx cmp_op0, cmp_op1;
  125.     cmp_op0=operands[0]; cmp_op1=operands[1];
  126.     return \";\\tcmpdi\\t%0,%1\";
  127. ")
  128.  
  129. (define_insn "cmpdf"
  130.   [(set (cc0)
  131.     (compare (match_operand:DF 0 "register_operand" "r")
  132.          (match_operand:DF 1 "general_operand" "rm")))]
  133.   ""
  134.   "*
  135.     extern rtx cmp_op0, cmp_op1;
  136.     cmp_op0=operands[0]; cmp_op1=operands[1];
  137.     return \";\\tcmpdf\\t%0,%1\";
  138. ")
  139.  
  140. (define_insn "cmpsf"
  141.   [(set (cc0)
  142.     (compare (match_operand:SF 0 "register_operand" "r")
  143.          (match_operand:SF 1 "general_operand" "rm")))]
  144.   ""
  145.   "*
  146.     extern rtx cmp_op0, cmp_op1;
  147.     cmp_op0=operands[0]; cmp_op1=operands[1];
  148.     return \";\\tcmpsf\\t%0,%1\";
  149. ")
  150.  
  151. (define_insn ""
  152.   [(set (match_operand:DI 0 "register_operand" "=r")
  153.         (eq (match_operand:DI 1 "register_operand" "r")
  154.              (match_operand:DI 2 "general_operand" "g")))]
  155.   ""
  156.   "cmp.64\\t%0,%1,%2:eq")
  157.  
  158. (define_insn ""
  159.   [(set (match_operand:DI 0 "register_operand" "=r")
  160.         (ne (match_operand:DI 1 "register_operand" "r")
  161.              (match_operand:DI 2 "general_operand" "g")))]
  162.   ""
  163.   "cmp.64\\t%0,%1,%2:ne")
  164.  
  165. (define_insn ""
  166.   [(set (match_operand:DI 0 "register_operand" "=r")
  167.         (le (match_operand:DI 1 "register_operand" "r")
  168.              (match_operand:DI 2 "general_operand" "g")))]
  169.   ""
  170.   "cmp.64\\t%0,%1,%2:le")
  171.  
  172. (define_insn ""
  173.   [(set (match_operand:DI 0 "register_operand" "=r")
  174.         (leu (match_operand:DI 1 "register_operand" "r")
  175.              (match_operand:DI 2 "general_operand" "g")))]
  176.   ""
  177.   "cmpu.64\\t%0,%1,%2:le")
  178.  
  179. (define_insn ""
  180.   [(set (match_operand:DI 0 "register_operand" "=r")
  181.         (lt (match_operand:DI 1 "register_operand" "r")
  182.              (match_operand:DI 2 "general_operand" "g")))]
  183.   ""
  184.   "cmp.64\\t%0,%1,%2:lt")
  185.  
  186. (define_insn ""
  187.   [(set (match_operand:DI 0 "register_operand" "=r")
  188.         (ltu (match_operand:DI 1 "register_operand" "r")
  189.              (match_operand:DI 2 "general_operand" "g")))]
  190.   ""
  191.   "cmpu.64\\t%0,%1,%2:lt")
  192.  
  193. (define_insn ""
  194.   [(set (match_operand:DI 0 "register_operand" "=r")
  195.         (ge (match_operand:DI 1 "register_operand" "r")
  196.              (match_operand:DI 2 "general_operand" "g")))]
  197.   ""
  198.   "cmp.64\\t%0,%1,%2:ge")
  199.  
  200. (define_insn ""
  201.   [(set (match_operand:DI 0 "register_operand" "=r")
  202.         (geu (match_operand:DI 1 "register_operand" "r")
  203.              (match_operand:DI 2 "general_operand" "g")))]
  204.   ""
  205.   "cmpu.64\\t%0,%1,%2:ge")
  206.  
  207. (define_insn ""
  208.   [(set (match_operand:DI 0 "register_operand" "=r")
  209.         (gt (match_operand:DI 1 "register_operand" "r")
  210.              (match_operand:DI 2 "general_operand" "g")))]
  211.   ""
  212.   "cmp.64\\t%0,%1,%2:gt")
  213.  
  214. (define_insn ""
  215.   [(set (match_operand:DI 0 "register_operand" "=r")
  216.         (gtu (match_operand:DI 1 "register_operand" "r")
  217.              (match_operand:DI 2 "general_operand" "g")))]
  218.   ""
  219.   "cmpu.64\\t%0,%1,%2:gt")
  220.  
  221. (define_insn "seq"
  222.   [(set (match_operand:DI 0 "register_operand" "=r")
  223.     (eq (cc0) (const_int 0)))]
  224.   ""
  225.   "* return cmp_set(\"\", \"eq\", operands[0]); ")
  226.  
  227. (define_insn "sne"
  228.   [(set (match_operand:DI 0 "register_operand" "=r")
  229.     (ne (cc0) (const_int 0)))]
  230.   ""
  231.   "* return cmp_set(\"\", \"ne\", operands[0]); ")
  232.  
  233. (define_insn "sle"
  234.   [(set (match_operand:DI 0 "register_operand" "=r")
  235.     (le (cc0) (const_int 0)))]
  236.   ""
  237.   "* return cmp_set(\"\", \"le\", operands[0]); ")
  238.  
  239. (define_insn "sleu"
  240.   [(set (match_operand:DI 0 "register_operand" "=r")
  241.     (leu (cc0) (const_int 0)))]
  242.   ""
  243.   "* return cmp_set(\"u\", \"le\", operands[0]); ")
  244.  
  245. (define_insn "slt"
  246.   [(set (match_operand:DI 0 "register_operand" "=r")
  247.     (lt (cc0) (const_int 0)))]
  248.   ""
  249.   "* return cmp_set(\"\", \"lt\", operands[0]); ")
  250.  
  251. (define_insn "sltu"
  252.   [(set (match_operand:DI 0 "register_operand" "=r")
  253.     (ltu (cc0) (const_int 0)))]
  254.   ""
  255.   "* return cmp_set(\"u\", \"lt\", operands[0]); ")
  256.  
  257. (define_insn "sge"
  258.   [(set (match_operand:DI 0 "register_operand" "=r")
  259.     (ge (cc0) (const_int 0)))]
  260.   ""
  261.   "* return cmp_set(\"\", \"ge\", operands[0]); ")
  262.  
  263. (define_insn "sgeu"
  264.   [(set (match_operand:DI 0 "register_operand" "=r")
  265.     (geu (cc0) (const_int 0)))]
  266.   ""
  267.   "* return cmp_set(\"u\", \"ge\", operands[0]); ")
  268.  
  269. (define_insn "sgt"
  270.   [(set (match_operand:DI 0 "register_operand" "=r")
  271.     (gt (cc0) (const_int 0)))]
  272.   ""
  273.   "* return cmp_set(\"\", \"gt\", operands[0]); ")
  274.  
  275. (define_insn "sgtu"
  276.   [(set (match_operand:DI 0 "register_operand" "=r")
  277.     (gtu (cc0) (const_int 0)))]
  278.   ""
  279.   "* return cmp_set(\"u\", \"gt\", operands[0]); ")
  280.  
  281. (define_insn ""
  282.   [(set (match_operand:SI 0 "register_operand" "=r")
  283.     (eq (match_operand:SI 1 "register_operand" "r")
  284.         (match_operand:SI 2 "general_operand" "m")))]
  285.   ""
  286.   "cmp.32\\t%0,%1,%2:eq")
  287.  
  288. (define_insn ""
  289.   [(set (match_operand:SI 0 "register_operand" "=r")
  290.     (ne (match_operand:SI 1 "register_operand" "r")
  291.         (match_operand:SI 2 "general_operand" "m")))]
  292.   ""
  293.   "cmp.32\\t%0,%1,%2:ne")
  294.  
  295. (define_insn ""
  296.   [(set (match_operand:SI 0 "register_operand" "=r")
  297.     (le (match_operand:SI 1 "register_operand" "r")
  298.         (match_operand:SI 2 "general_operand" "m")))]
  299.   ""
  300.   "cmp.32\\t%0,%1,%2:le")
  301.  
  302. (define_insn ""
  303.   [(set (match_operand:SI 0 "register_operand"