diff options
| author | Ralf Jung <post@ralfj.de> | 2023-06-17 17:42:18 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-06-17 17:42:18 +0200 |
| commit | 14155e95b14495e1713da596cef337c64e1e9f3e (patch) | |
| tree | b95862aa9f90c4103b873905c729d3364e280bc5 /compiler/rustc_codegen_gcc | |
| parent | dfd5037fa5bea87da79eace69fb6b0c3335f1fd6 (diff) | |
| parent | b866113d1918e64140bf15647850373d5a3bbe62 (diff) | |
| download | rust-14155e95b14495e1713da596cef337c64e1e9f3e.tar.gz rust-14155e95b14495e1713da596cef337c64e1e9f3e.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs index bad87db4732..b62f4676f70 100644 --- a/compiler/rustc_codegen_gcc/src/common.rs +++ b/compiler/rustc_codegen_gcc/src/common.rs @@ -108,6 +108,10 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> { self.const_uint(self.type_u64(), i) } + fn const_u128(&self, i: u128) -> RValue<'gcc> { + self.const_uint_big(self.type_u128(), i) + } + fn const_usize(&self, i: u64) -> RValue<'gcc> { let bit_size = self.data_layout().pointer_size.bits(); if bit_size < 64 { @@ -254,7 +258,7 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> { // SIMD builtins require a constant value. self.bitcast_if_needed(value, typ) } - + fn const_ptr_byte_offset(&self, base_addr: Self::Value, offset: abi::Size) -> Self::Value { self.context.new_array_access(None, base_addr, self.const_usize(offset.bytes())).get_address(None) } |
