small correction for floating point h
This commit is contained in:
parent
ec5fb1e87e
commit
8220c00a3d
@ -123,18 +123,18 @@ uint16_t fcvt_h(uint16_t v1, uint16_t op, uint8_t mode) {
|
|||||||
softfloat_exceptionFlags = 0;
|
softfloat_exceptionFlags = 0;
|
||||||
float16_t r;
|
float16_t r;
|
||||||
switch(op) {
|
switch(op) {
|
||||||
case 0: { // FCVT__W__S
|
case 0: { // FCVT__W__H
|
||||||
uint_fast16_t res = f16_to_i32(v1f, mode, true);
|
uint_fast16_t res = f16_to_i32(v1f, mode, true);
|
||||||
return (uint16_t)res;
|
return (uint16_t)res;
|
||||||
}
|
}
|
||||||
case 1: { // FCVT__WU__S
|
case 1: { // FCVT__WU__H
|
||||||
uint_fast16_t res = f16_to_ui32(v1f, mode, true);
|
uint_fast16_t res = f16_to_ui32(v1f, mode, true);
|
||||||
return (uint16_t)res;
|
return (uint16_t)res;
|
||||||
}
|
}
|
||||||
case 2: // FCVT__S__W
|
case 2: // FCVT__H__W
|
||||||
r = i32_to_f16((int16_t)v1);
|
r = i32_to_f16((int16_t)v1);
|
||||||
return r.v;
|
return r.v;
|
||||||
case 3: // FCVT__S__WU
|
case 3: // FCVT__H__WU
|
||||||
r = ui32_to_f16(v1);
|
r = ui32_to_f16(v1);
|
||||||
return r.v;
|
return r.v;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user