]> git.lizzy.rs Git - rust.git/commitdiff
Implement intrinsic write_bytes
authorbjorn3 <bjorn3@users.noreply.github.com>
Sat, 6 Oct 2018 08:43:01 +0000 (10:43 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Sat, 6 Oct 2018 08:43:01 +0000 (10:43 +0200)
src/intrinsics.rs

index 4f3e0c88195a277964638af79939453636a35043..1cc16419413cc18e8ee4ee4c4fef26371d8b7c56 100644 (file)
@@ -308,6 +308,9 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
             let uninit_val = uninit_place.to_cvalue(fx);
             ret.write_cvalue(fx, uninit_val);
         };
+        write_bytes, <T> (v dst, v val, v count) {
+            fx.bcx.call_memset(fx.isa, dst, val, count);
+        };
         uninit, <T> () {
             let layout = fx.layout_of(T);
             let stack_slot = fx.bcx.create_stack_slot(StackSlotData {