From 9176f51a9b67be197c5b8c9da3f5bf6eaf114f03 Mon Sep 17 00:00:00 2001 From: DonoughLiu Date: Sat, 10 Jun 2023 03:21:39 +0800 Subject: [PATCH] Support 128-bit enum variant in debuginfo codegen --- src/common.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common.rs b/src/common.rs index bad87db4732..b62f4676f70 100644 --- a/src/common.rs +++ b/src/common.rs @@ -108,6 +108,10 @@ fn const_u64(&self, i: u64) -> RValue<'gcc> { 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 @@ fn const_bitcast(&self, value: RValue<'gcc>, typ: Type<'gcc>) -> RValue<'gcc> { // 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) }