Skip to content

Commit b8738d3

Browse files
authored
Merge pull request #33 from zedar/support_for_f16_and_f128_types
Add Float16, Float32, Float64 and Float128 types
2 parents 6971df6 + 9c3df28 commit b8738d3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

gccjit_sys/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ pub enum gcc_jit_types {
120120
GCC_JIT_TYPE_INT128_T,
121121

122122
GCC_JIT_TYPE_BFLOAT16,
123+
GCC_JIT_TYPE_FLOAT16,
124+
GCC_JIT_TYPE_FLOAT32,
125+
GCC_JIT_TYPE_FLOAT64,
126+
GCC_JIT_TYPE_FLOAT128,
123127
}
124128

125129
#[repr(C)]

src/context.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,10 @@ pub enum CType {
13321332
UInt128t,
13331333
ConstCharPtr,
13341334
BFloat16,
1335+
Float16,
1336+
Float32,
1337+
Float64,
1338+
Float128,
13351339
}
13361340

13371341
impl CType {
@@ -1365,6 +1369,10 @@ impl CType {
13651369
UInt128t => GCC_JIT_TYPE_UINT128_T,
13661370
ConstCharPtr => GCC_JIT_TYPE_CONST_CHAR_PTR,
13671371
BFloat16 => GCC_JIT_TYPE_BFLOAT16,
1372+
Float16 => GCC_JIT_TYPE_FLOAT16,
1373+
Float32 => GCC_JIT_TYPE_FLOAT32,
1374+
Float64 => GCC_JIT_TYPE_FLOAT64,
1375+
Float128 => GCC_JIT_TYPE_FLOAT128,
13681376
}
13691377
}
13701378
}

0 commit comments

Comments
 (0)