- `(define-vop (,name)
- (:args (x :scs (,from-sc)))
- (:results (y :scs (signed-reg)))
- (:temporary (:from (:argument 0) :sc ,from-sc) temp)
- (:temporary (:sc non-descriptor-reg) status-save new-status)
- (:temporary (:sc non-descriptor-reg :offset nl4-offset)
- pa-flag)
- (:arg-types ,from-type)
- (:result-types signed-num)
- (:translate %unary-truncate)
- (:policy :fast-safe)
- (:note "inline float truncate")
- (:vop-var vop)
- (:save-p :compute-only)
- (:generator 16
- (pseudo-atomic (pa-flag)
- (inst cfc1 status-save 31)
- (inst li new-status (lognot 3))
- (inst and new-status status-save)
- (inst or new-status float-round-to-zero)
- (inst ctc1 new-status 31)
-
- ;; These instructions seem to be necessary to ensure that
- ;; the new modes affect the fcvt instruction.
- (inst nop)
- (inst cfc1 new-status 31)
-
- (note-this-location vop :internal-error)
- (inst fcvt :word ,from-format temp x)
- (inst mfc1 y temp)
- (inst nop)
- (inst ctc1 status-save 31))))))
+ `(define-vop (,name)
+ (:args (x :scs (,from-sc)))
+ (:results (y :scs (signed-reg)))
+ (:temporary (:from (:argument 0) :sc ,from-sc) temp)
+ (:temporary (:sc non-descriptor-reg) status-save new-status)
+ (:temporary (:sc non-descriptor-reg :offset nl4-offset)
+ pa-flag)
+ (:arg-types ,from-type)
+ (:result-types signed-num)
+ (:translate ,name)
+ (:policy :fast-safe)
+ (:note "inline float truncate")
+ (:vop-var vop)
+ (:save-p :compute-only)
+ (:generator 16
+ (pseudo-atomic (pa-flag)
+ (inst cfc1 status-save 31)
+ (inst li new-status (lognot 3))
+ (inst and new-status status-save)
+ (inst or new-status float-round-to-zero)
+ (inst ctc1 new-status 31)
+
+ ;; These instructions seem to be necessary to ensure that
+ ;; the new modes affect the fcvt instruction.
+ (inst nop)
+ (inst cfc1 new-status 31)
+
+ (note-this-location vop :internal-error)
+ (inst fcvt :word ,from-format temp x)
+ (inst mfc1 y temp)
+ (inst nop)
+ (inst ctc1 status-save 31))))))