rust/compiler/rustc_codegen_gcc/src
bors 1e978a3627 Auto merge of #96946 - WaffleLapkin:ptr_mask, r=scottmcm
Add pointer masking convenience functions

This PR adds the following public API:
```rust
impl<T: ?Sized> *const T {
    fn mask(self, mask: usize) -> *const T;
}

impl<T: ?Sized> *mut T {
    fn mask(self, mask: usize) -> *const T;
}

// mod intrinsics
fn mask<T>(ptr: *const T, mask: usize) -> *const T
```
This is equivalent to `ptr.map_addr(|a| a & mask)` but also uses a cool llvm intrinsic.

Proposed in https://github.com/rust-lang/rust/pull/95643#issuecomment-1121562352

cc `@Gankra` `@scottmcm` `@RalfJung`

r? rust-lang/libs-api
2022-08-28 01:34:47 +00:00
..
back simplify a self-profiling activity call in the cg_gcc backend 2022-04-07 15:47:20 +02:00
intrinsic Auto merge of #96946 - WaffleLapkin:ptr_mask, r=scottmcm 2022-08-28 01:34:47 +00:00
abi.rs Move ArgAbi::pad_i32 into PassMode::Cast. 2022-08-26 11:12:36 +10:00
allocator.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
archive.rs Introduce an ArchiveBuilderBuilder 2022-07-28 09:08:47 +00:00
asm.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
base.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
builder.rs Auto merge of #95548 - rcvalle:rust-cfi-2, r=nagisa 2022-07-24 01:22:36 +00:00
callee.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
common.rs slightly cleaner, if more verbose, vtable handling in codegen backends 2022-07-20 17:12:07 -04:00
consts.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
context.rs Avoid unnecessary string interning for const_str 2022-06-28 18:38:36 +00:00
coverageinfo.rs Merge commit 'e228f0c16ea8c34794a6285bf57aab627c26b147' into libgccjit-codegen 2021-08-15 08:29:07 -04:00
debuginfo.rs debuginfo: Refactor debuginfo generation for types -- Rename DebugInfoMethods::create_vtable_metadata() to DebugInfoMethods::create_vtable_debuginfo() 2022-03-14 17:25:24 +01:00
declare.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
int.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
lib.rs Introduce an ArchiveBuilderBuilder 2022-07-28 09:08:47 +00:00
mono_item.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
type_.rs Add fine-grained LLVM CFI support to the Rust compiler 2022-07-23 10:51:34 -07:00
type_of.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00