Raymond Toy pushed to branch sparc64-dev at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/compiler/sparc64/insts.lisp
    ... ... @@ -2063,52 +2063,10 @@ about function addresses and register values.")
    2063 2063
     
    
    2064 2064
     ;;;; li, jali, ji, nop, cmp, not, neg, move, and more
    
    2065 2065
     
    
    2066
    -#-sparc-v9
    
    2067
    -(defun %li (reg value)
    
    2068
    -  (etypecase value
    
    2069
    -    ((signed-byte 13)
    
    2070
    -     (inst add reg zero-tn value))
    
    2071
    -    ((or (signed-byte 32) (unsigned-byte 32))
    
    2072
    -     (let ((hi (ldb (byte 22 10) value))
    
    2073
    -	   (lo (ldb (byte 10 0) value)))
    
    2074
    -       (inst sethi reg hi)
    
    2075
    -       (unless (zerop lo)
    
    2076
    -	 (inst add reg lo))))
    
    2077
    -    (fixup
    
    2078
    -     (inst sethi reg value)
    
    2079
    -     (inst add reg value))))
    
    2080
    -
    
    2081
    -#+sparc-v9
    
    2082
    -(defun %li (reg value)
    
    2083
    -  (etypecase value
    
    2084
    -    ((signed-byte 13)
    
    2085
    -     (inst add reg zero-tn value))
    
    2086
    -    ((unsigned-byte 32)
    
    2087
    -     (let ((hi (ldb (byte 22 10) value))
    
    2088
    -	   (lo (ldb (byte 10 0) value)))
    
    2089
    -       ;; Sethi sets the top 32-bits to zero.
    
    2090
    -       (inst sethi reg hi)
    
    2091
    -       (unless (zerop lo)
    
    2092
    -	 (inst add reg lo))))
    
    2093
    -    ((signed-byte 32)
    
    2094
    -     (let ((hi (ldb (byte 22 10) value))
    
    2095
    -	   (lo (ldb (byte 10 0) value)))
    
    2096
    -       ;; Sethi sets the top 32-bits to zero.
    
    2097
    -       (inst sethi reg hi)
    
    2098
    -       (unless (zerop lo)
    
    2099
    -	 (inst add reg lo))
    
    2100
    -       ;; Sign-extend the result
    
    2101
    -       (inst signx reg)))
    
    2102
    -    (fixup
    
    2103
    -     (inst sethi reg value)
    
    2104
    -     (inst add reg value))))
    
    2105
    -
    
    2106 2066
     (define-instruction-macro li (reg value)
    
    2107 2067
       `(%li ,reg ,value))
    
    2108 2068
     
    
    2109
    -#+sparc-v9
    
    2110
    -(progn
    
    2111
    -(defun %li64 (reg value &optional temp)
    
    2069
    +(defun %li (reg value &optional temp)
    
    2112 2070
       (etypecase value
    
    2113 2071
         ((signed-byte 13)
    
    2114 2072
          (inst add reg zero-tn value))
    
    ... ... @@ -2168,10 +2126,6 @@ about function addresses and register values.")
    2168 2126
          (inst sethi reg value)
    
    2169 2127
          (inst add reg value))))
    
    2170 2128
     
    
    2171
    -(define-instruction-macro li64 (reg value &optional temp)
    
    2172
    -  `(%li64 ,reg ,value ,temp))
    
    2173
    -
    
    2174
    -)
    
    2175 2129
     
    
    2176 2130
     ;; Define LDN/STN synthetic instructions to do "natural" loads and
    
    2177 2131
     ;; stores for 32-bit or 64-bit objects depending on whether this is a