home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / gcc-2.6.0-src.lha / GNU / src / amiga / gcc-2.6.0 / config / 1750a / m1750.inc < prev   
Encoding:
Text File  |  1994-07-12  |  1.4 KB  |  76 lines

  1. ;; Includefile for GCC-1750A assembler files
  2. ;;
  3. ;; Macros defined:
  4. ;;   EFLR.M  #d,#s    Load the three regs starting at R#s to R#d following.
  5. ;;   RET.M   #fs    Return from function (uses the framesize #fs)
  6.  
  7.  
  8. UC    EQU    15
  9.  
  10.     STRING ONE(3),TWO(3)
  11.  
  12. ; Return from function ; parameter: framesize
  13.      MACRO RET.M
  14.     IF ~1~ > 0
  15.         IF ~1~ <= 16
  16.         AISP R14,~1~
  17.         ELSE
  18.         AIM  R14,~1~
  19.         ENDIF
  20.     ENDIF
  21.     LR   R15,R14
  22.     URS  R15
  23.      ENDM
  24.  
  25. ; Useful instructions missing from the 1750A standard:
  26.  
  27. ; Extended Float Load from Registers
  28.      MACRO EFLR.M    ; args : #1=dest-regno, #2=source-regno
  29. REG1    SET  ~1~ + 2
  30. REG2    SET  ~2~ + 2
  31. ONE    SET  REG1
  32. TWO    SET  REG2
  33.     IF ~1~ >= ~2~ ! ~1~+2 < ~2~
  34.         LR    R~ONE~,R~TWO~
  35.         DLR   R~1~,R~2~
  36.     ELSE
  37.         DLR   R~1~,R~2~
  38.         LR    R~ONE~,R~TWO~
  39.         DLR   R~1~,R~1~    ; Just to update condition codes
  40.     ENDIF
  41.      ENDM
  42.  
  43. ; The following leave the condition codes haywire. But that is
  44. ; accounted for (see notice_update_cc in config/1750a.c.)
  45.  
  46. ; Double ANd Register with Register
  47.      MACRO DANR.M
  48. REG1    SET  ~1~ + 1
  49. REG2    SET  ~2~ + 1
  50. ONE    SET  REG1
  51. TWO    SET  REG2
  52.     ANDR  R~1~,R~2~
  53.     ANDR  R~ONE~,R~TWO~
  54.      ENDM
  55.  
  56. ; Double OR Register with Register
  57.      MACRO DORR.M
  58. REG1    SET  ~1~ + 1
  59. REG2    SET  ~2~ + 1
  60. ONE    SET  REG1
  61. TWO    SET  REG2
  62.     ORR   R~1~,R~2~
  63.     ORR   R~ONE~,R~TWO~
  64.      ENDM
  65.  
  66. ; Double eXoR Register with Register
  67.      MACRO DXRR.M
  68. REG1    SET  ~1~ + 1
  69. REG2    SET  ~2~ + 1
  70. ONE    SET  REG1
  71. TWO    SET  REG2
  72.     XORR  R~1~,R~2~
  73.     XORR  R~ONE~,R~TWO~
  74.      ENDM
  75.  
  76.