about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-16 17:52:52 +0000
committerbors <bors@rust-lang.org>2021-05-16 17:52:52 +0000
commit7dc9ff5c629753b6930ecfe9a0446538b8e25fb7 (patch)
tree497b34e49454d1f24eb481c8b546061d6a47d747 /compiler/rustc_codegen_ssa/src
parentf8e1e9238077a829ce1ac0cc1f2c7e0eaa4e679d (diff)
parent1605e0ec4e21d563703f4504740fa90b16089c20 (diff)
Auto merge of #85290 - Amanieu:asm_const_int, r=nagisa
Remove support for floating-point constants in asm!

Floating-point constants aren't very useful anyways and this simplifies
the code since the type check can now be done in typeck.

cc `@rust-lang/wg-inline-asm`

r? `@nagisa`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/common.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/common.rs b/compiler/rustc_codegen_ssa/src/common.rs
index 955f658eb1c..1fa60612d26 100644
--- a/compiler/rustc_codegen_ssa/src/common.rs
+++ b/compiler/rustc_codegen_ssa/src/common.rs
@@ -219,8 +219,6 @@ pub fn asm_const_to_str<'tcx>(
             ty::IntTy::I128 => (value as i128).to_string(),
             ty::IntTy::Isize => unreachable!(),
         },
-        ty::Float(ty::FloatTy::F32) => f32::from_bits(value as u32).to_string(),
-        ty::Float(ty::FloatTy::F64) => f64::from_bits(value as u64).to_string(),
         _ => span_bug!(sp, "asm const has bad type {}", ty_and_layout.ty),
     }
 }