File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
cranelift/codegen/src/isa/pulley_shared Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 389
389
(rule 0 (imm $I64 x) (pulley_xconst64 (u64_as_i64 x)))
390
390
391
391
;; Base cases for floats.
392
- (rule 0 (imm $F32 c) (gen_bitcast (imm $I32 c) $I32 $F32))
393
- (rule 0 (imm $F64 c) (gen_bitcast (imm $I64 c) $I64 $F64))
394
-
395
- ;;;; Bitcasts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
396
-
397
- ;; Bitcast from the first type, into the second type.
398
- (decl gen_bitcast (Reg Type Type) Reg)
399
- (rule (gen_bitcast r $F32 $I32) (pulley_bitcast_float_from_int_32 r))
400
- (rule (gen_bitcast r $F64 $I64) (pulley_bitcast_float_from_int_64 r))
401
- (rule (gen_bitcast r $I32 $F32) (pulley_bitcast_int_from_float_32 r))
402
- (rule (gen_bitcast r $I64 $F64) (pulley_bitcast_int_from_float_64 r))
403
- (rule -1 (gen_bitcast r ty ty) r)
392
+ (rule 0 (imm $F32 (u64_as_u32 c)) (pulley_fconst32 c))
393
+ (rule 0 (imm $F64 c) (pulley_fconst64 c))
404
394
405
395
;;;; Instruction Constructors ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
406
396
Original file line number Diff line number Diff line change 161
161
162
162
;;;; Rules for `f32const`;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
163
163
164
- (rule (lower (f32const (u32_from_ieee32 x)))
165
- (pulley_fconst32 x))
164
+ (rule (lower (f32const (u32_from_ieee32 x))) (imm $F32 x))
166
165
167
166
;;;; Rules for `f64const`;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
168
167
169
- (rule (lower (f64const (u64_from_ieee64 x)))
170
- (pulley_fconst64 x))
168
+ (rule (lower (f64const (u64_from_ieee64 x))) (imm $F64 x))
171
169
172
170
;;;; Rules for `iadd` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
173
171
You can’t perform that action at this time.
0 commit comments