Skip to content

Commit 684aebb

Browse files
committed
Fix unaligned_volatile_store by removing MemFlags::UNALIGNED
1 parent 382936a commit 684aebb

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
11551155
// NOTE: libgccjit does not support specifying the alignment on the assignment, so we cast
11561156
// to type so it gets the proper alignment.
11571157
let destination_type = destination.to_rvalue().get_type().unqualified();
1158-
let align = if flags.contains(MemFlags::UNALIGNED) { 1 } else { align.bytes() };
1158+
let align = align.bytes();
11591159
let mut modified_destination_type = destination_type.get_aligned(align);
11601160
if flags.contains(MemFlags::VOLATILE) {
11611161
modified_destination_type = modified_destination_type.make_volatile();

src/intrinsic/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,6 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc
377377
load
378378
}
379379
}
380-
sym::volatile_store => {
381-
let dst = args[0].deref(self.cx());
382-
args[1].val.volatile_store(self, dst);
383-
return IntrinsicResult::WroteIntoPlace;
384-
}
385-
sym::unaligned_volatile_store => {
386-
let dst = args[0].deref(self.cx());
387-
args[1].val.unaligned_volatile_store(self, dst);
388-
return IntrinsicResult::WroteIntoPlace;
389-
}
390380
sym::prefetch_read_data
391381
| sym::prefetch_write_data
392382
| sym::prefetch_read_instruction

0 commit comments

Comments
 (0)