Skip to content

Commit 63dfd34

Browse files
committed
Implement F8 min/max
1 parent 5290ed7 commit 63dfd34

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

softfloat/fall_maxmin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ float ## bits ## _t f ## bits ## _min( float ## bits ## _t a, float ## bits ## _
7272
} \
7373
}
7474

75+
COMPARE_MAX(a, b, 8);
7576
COMPARE_MAX(a, b, 16);
7677
COMPARE_MAX(a, b, 32);
7778
COMPARE_MAX(a, b, 64);
7879

80+
COMPARE_MIN(a, b, 8);
7981
COMPARE_MIN(a, b, 16);
8082
COMPARE_MIN(a, b, 32);
8183
COMPARE_MIN(a, b, 64);

softfloat/softfloat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ float8_t f8_sub( float8_t, float8_t );
160160
float8_t f8_add( float8_t, float8_t );
161161
float8_t f8_mulAdd( float8_t, float8_t , float8_t );
162162
uint_fast16_t f8_classify( float8_t );
163+
float8_t f8_max( float8_t, float8_t );
164+
float8_t f8_min( float8_t, float8_t );
163165

164166
float8_t f8_emulation_3_operands(float8_t a8, float8_t b8, float8_t c8, float16_t (*operation)(float16_t, float16_t, float16_t));
165167
float8_t f8_emulation_2_operands(float8_t a8, float8_t b8, float16_t (*operation)(float16_t, float16_t));

0 commit comments

Comments
 (0)