about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorDavid Morrison <drmorr@evokewonder.com>2021-11-10 20:14:23 -0800
committerDavid Morrison <drmorr@evokewonder.com>2022-04-02 17:21:08 -0700
commitaa670166243e264985f95a21490f92c91addf48c (patch)
tree10b46e2f285c1472fff7e506f97be809c0e6d1b5 /compiler/rustc_codegen_gcc
parent8f96ef4bb56f5d905ed89ed569ef97f50731c977 (diff)
downloadrust-aa670166243e264985f95a21490f92c91addf48c.tar.gz
rust-aa670166243e264985f95a21490f92c91addf48c.zip
make memcmp return a value of c_int_width instead of i32
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/common.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs
index 61709dd92de..19127c7612d 100644
--- a/compiler/rustc_codegen_gcc/src/common.rs
+++ b/compiler/rustc_codegen_gcc/src/common.rs
@@ -91,6 +91,10 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
         self.const_uint(self.type_i1(), val as u64)
     }
 
+    fn const_i16(&self, i: i16) -> RValue<'gcc> {
+        self.const_int(self.type_i16(), i as i64)
+    }
+
     fn const_i32(&self, i: i32) -> RValue<'gcc> {
         self.const_int(self.type_i32(), i as i64)
     }