Changeset 00e3ad2 in mainline
- Timestamp:
- 2012-11-24T12:11:46Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9f730a
- Parents:
- 2f33fbc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/float/softfloat1.c
r2f33fbc r00e3ad2 44 44 45 45 typedef int32_t cmptype_t; 46 typedef void (* float_ op_t)(float, float, float *, float_t *);47 typedef void (* double_ op_t)(double, double, double *, double_t *);46 typedef void (* float_binary_op_t)(float, float, float *, float_t *); 47 typedef void (* double_binary_op_t)(double, double, double *, double_t *); 48 48 typedef void (* double_cmp_op_t)(double, double, cmptype_t *, cmptype_t *); 49 typedef void (* template_ t)(void *, unsigned, unsigned, cmptype_t *,49 typedef void (* template_binary_t)(void *, unsigned, unsigned, cmptype_t *, 50 50 cmptype_t *); 51 51 … … 81 81 82 82 static void 83 float_template (void *f, unsigned i, unsigned j, cmptype_t *pic,83 float_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic, 84 84 cmptype_t *pisc) 85 85 { … … 87 87 float_t sc; 88 88 89 float_ op_t op = (float_op_t) f;89 float_binary_op_t op = (float_binary_op_t) f; 90 90 91 91 op(fop_a[i], fop_b[j], &c, &sc); … … 96 96 97 97 static void 98 double_template (void *f, unsigned i, unsigned j, cmptype_t *pic,98 double_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic, 99 99 cmptype_t *pisc) 100 100 { … … 102 102 double_t sc; 103 103 104 double_ op_t op = (double_op_t) f;104 double_binary_op_t op = (double_binary_op_t) f; 105 105 106 106 op(dop_a[i], dop_b[j], &c, &sc); … … 119 119 } 120 120 121 static bool test_template (template_t template, void *f)121 static bool test_template_binary(template_binary_t template, void *f) 122 122 { 123 123 bool correct = true; … … 267 267 const char *err = NULL; 268 268 269 if (!test_template (float_template, float_add_operator)) {269 if (!test_template_binary(float_template_binary, float_add_operator)) { 270 270 err = "Float addition failed"; 271 271 TPRINTF("%s\n", err); 272 272 } 273 if (!test_template (float_template, float_mul_operator)) {273 if (!test_template_binary(float_template_binary, float_mul_operator)) { 274 274 err = "Float multiplication failed"; 275 275 TPRINTF("%s\n", err); 276 276 } 277 if (!test_template (float_template, float_div_operator)) {277 if (!test_template_binary(float_template_binary, float_div_operator)) { 278 278 err = "Float division failed"; 279 279 TPRINTF("%s\n", err); 280 280 } 281 if (!test_template (double_template, double_add_operator)) {281 if (!test_template_binary(double_template_binary, double_add_operator)) { 282 282 err = "Double addition failed"; 283 283 TPRINTF("%s\n", err); 284 284 } 285 if (!test_template (double_template, double_mul_operator)) {285 if (!test_template_binary(double_template_binary, double_mul_operator)) { 286 286 err = "Double multiplication failed"; 287 287 TPRINTF("%s\n", err); 288 288 } 289 if (!test_template (double_template, double_div_operator)) {289 if (!test_template_binary(double_template_binary, double_div_operator)) { 290 290 err = "Double division failed"; 291 291 TPRINTF("%s\n", err); 292 292 } 293 if (!test_template (double_compare_template, double_cmp_operator)) {293 if (!test_template_binary(double_compare_template, double_cmp_operator)) { 294 294 err = "Double comparison failed"; 295 295 TPRINTF("%s\n", err);
Note:
See TracChangeset
for help on using the changeset viewer.