home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / compiler / machines / sparc / instr3.scm < prev    next >
Encoding:
Text File  |  1999-01-02  |  3.1 KB  |  107 lines

  1. #| -*-Scheme-*-
  2.  
  3. $Id: instr3.scm,v 1.2 1999/01/02 06:06:43 cph Exp $
  4.  
  5. Copyright (c) 1987-1999 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. |#
  21.  
  22. ;;;; SPARC instruction set, part 3
  23.  
  24. (declare (usual-integrations))
  25.  
  26. (let-syntax
  27.     ((float-instruction-3
  28.       (macro (keyword major minor)
  29.     `(define-instruction ,keyword
  30.        (((? destination) (? source1) (? source2))
  31.         (LONG (2 2)
  32.           (5 destination)
  33.           (6 ,major)
  34.           (5 source1)
  35.           (9 ,minor)
  36.           (5 source2)))))))
  37.   (float-instruction-3 fadds 52 65)
  38.   (float-instruction-3 faddd 52 66)
  39.   (float-instruction-3 faddq 52 67)
  40.   (float-instruction-3 fsubs 52 69)
  41.   (float-instruction-3 fsubd 52 70)
  42.   (float-instruction-3 fsubq 52 71)
  43.   (float-instruction-3 fmuls 52 73)
  44.   (float-instruction-3 fmuld 52 74)
  45.   (float-instruction-3 fmulq 52 75)
  46.   (float-instruction-3 fsmuld 52 #x69)
  47.   (float-instruction-3 fdmulq 52 #x6e)
  48.   (float-instruction-3 fdivs 52 #x4d)
  49.   (float-instruction-3 fdivd 52 #x4e)
  50.   (float-instruction-3 fdivq 52 #x4f))
  51.  
  52. (let-syntax
  53.     ((float-instruction-cmp
  54.       (macro (keyword major minor)
  55.     `(define-instruction ,keyword
  56.        (((? source1) (? source2))
  57.         (LONG (2 2)
  58.           (5 0)
  59.           (6 ,major)
  60.           (5 source1)
  61.           (9 ,minor)
  62.           (5 source2)))))))
  63.   (float-instruction-cmp fcmps 53 #x51)
  64.   (float-instruction-cmp fcmpd 53 #x52)
  65.   (float-instruction-cmp fcmpq 53 #x53)
  66.   (float-instruction-cmp fcmpes 53 #x55)
  67.   (float-instruction-cmp fcmped 53 #x56)
  68.   (float-instruction-cmp fcmpeq 53 #x57))
  69.   
  70. (let-syntax
  71.     ((float-instruction-2
  72.       (macro (keyword major minor)
  73.     `(define-instruction ,keyword
  74.        (((? destination) (? source))
  75.         (LONG (2 2)
  76.           (5 destination)
  77.           (6 ,major)
  78.           (5 0)
  79.           (9 ,minor)
  80.           (5 source)))))))
  81.   (float-instruction-2 fsqrts #x34 #x29)
  82.   (float-instruction-2 fsqrtd #x34 #x2a)
  83.   (float-instruction-2 fsqrtq #x34 #x2b)
  84.  
  85.   (float-instruction-2 fmovs #x34 #x01)
  86.   (float-instruction-2 fnegs #x34 #x05)
  87.   (float-instruction-2 fabss #x34 #x09)
  88.   
  89.   (float-instruction-2 fstoi #x34 #xd1)
  90.   (float-instruction-2 fdtoi #x34 #xd2)
  91.   (float-instruction-2 fqtoi #x34 #xd3)
  92.  
  93.   (float-instruction-2 fitos #x34 #xc4)
  94.   (float-instruction-2 fitod #x34 #xc8)
  95.   (float-instruction-2 fitoq #x34 #xcc)
  96.     
  97.   (float-instruction-2 fstod #x34 #xc9)
  98.   (float-instruction-2 fstoq #x34 #xcd)
  99.   
  100.   (float-instruction-2 fdtos #x34 #xc6)
  101.   (float-instruction-2 fstod #x34 #xce)
  102.   
  103.   (float-instruction-2 fstod #x34 #xc7)
  104.   (float-instruction-2 fstod #x34 #xcb))
  105.   
  106.   
  107.