info.scm 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ;;; GNU Mes --- Maxwell Equations of Software
  2. ;;; Copyright © 2018,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  3. ;;; Copyright © 2019 Danny Milosavljevic <dannym@scratchpost.org>
  4. ;;;
  5. ;;; This file is part of GNU Mes.
  6. ;;;
  7. ;;; GNU Mes is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Mes 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
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
  19. ;;; Commentary:
  20. ;;; Initialize MesCC as arm compiler
  21. ;;; Code:
  22. (define-module (mescc armv4 info)
  23. #:use-module (mescc info)
  24. #:use-module (mescc armv4 as)
  25. #:export (armv4-info))
  26. (define (armv4-info)
  27. (make <info> #:types armv4:type-alist #:registers armv4:registers #:instructions armv4:instructions))
  28. (define armv4:registers '("r0" "r1" "r2" "r3" "r4" "r5"))
  29. (define armv4:type-alist
  30. `(("char" . ,(make-type 'signed 1 #f))
  31. ("short" . ,(make-type 'signed 2 #f))
  32. ("int" . ,(make-type 'signed 4 #f))
  33. ("long" . ,(make-type 'signed 4 #f))
  34. ("default" . ,(make-type 'signed 4 #f))
  35. ("*" . ,(make-type 'unsigned 4 #f))
  36. ("long long" . ,(make-type 'signed 4 #f))
  37. ("long long int" . ,(make-type 'signed 4 #f))
  38. ("void" . ,(make-type 'void 1 #f))
  39. ("signed char" . ,(make-type 'signed 1 #f))
  40. ("unsigned char" . ,(make-type 'unsigned 1 #f))
  41. ("unsigned short" . ,(make-type 'unsigned 2 #f))
  42. ("unsigned" . ,(make-type 'unsigned 4 #f))
  43. ("unsigned int" . ,(make-type 'unsigned 4 #f))
  44. ("unsigned long" . ,(make-type 'unsigned 4 #f))
  45. ("unsigned long long" . ,(make-type 'unsigned 4 #f))
  46. ("unsigned long long int" . ,(make-type 'unsigned 4 #f))
  47. ("float" . ,(make-type 'float 4 #f))
  48. ("double" . ,(make-type 'float 4 #f)) ; FIXME
  49. ("long double" . ,(make-type 'float 4 #f)) ; FIXME
  50. ("short int" . ,(make-type 'signed 2 #f))
  51. ("unsigned short int" . ,(make-type 'unsigned 2 #f))
  52. ("long int" . ,(make-type 'signed 4 #f))
  53. ("unsigned long int" . ,(make-type 'unsigned 4 #f))))