Changeset 7218fe6 in mainline
- Timestamp:
- 2014-03-01T22:50:05Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 440f57f
- Parents:
- 8aaf9dc
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/Makefile.inc
r8aaf9dc r7218fe6 36 36 37 37 ifeq ($(CONFIG_FPU),y) 38 # This is necessary to allow vmsr insn and fpexc manipulation39 # Use vfp32 to allow context save/restore of d16-d31 regs.40 AFLAGS += -mfloat-abi=hard -mfpu=vfp338 # This is necessary to allow vmsr insn and fpexc manipulation 39 # Use vfp32 to allow context save/restore of d16-d31 regs. 40 AFLAGS += -mfloat-abi=hard -mfpu=vfp3 41 41 endif 42 42 … … 86 86 87 87 ifeq ($(MACHINE),beaglebone) 88 88 ARCH_SOURCES += arch/$(KARCH)/src/mach/beaglebone/beaglebone.c 89 89 endif 90 90 -
uspace/app/tester/Makefile
r8aaf9dc r7218fe6 29 29 30 30 USPACE_PREFIX = ../.. 31 31 32 LIBS = \ 32 33 $(LIBBLOCK_PREFIX)/libblock.a \ -
uspace/app/tester/float/softfloat1.c
r8aaf9dc r7218fe6 39 39 #include "../tester.h" 40 40 41 #define OPERANDS 1041 #define OPERANDS 10 42 42 #define PRECISION 10000 43 43 … … 56 56 cmptype_t *); 57 57 58 #define NUMBERS 58 #define NUMBERS \ 59 59 3.5, -2.1, 100.0, 50.0, -1024.0, 0.0, 768.3156, 1080.499999, -600.0, 1.0 60 60 … … 63 63 }; 64 64 65 static double dop_a[OPERANDS] = 65 static double dop_a[OPERANDS] = { 66 66 NUMBERS 67 67 }; … … 83 83 if (a < b) 84 84 return -1; 85 else if (a > b) 85 86 if (a > b) 86 87 return 1; 87 88 88 89 return 0; 89 90 } 90 91 91 static void 92 uint_to_double_template(void *f, unsigned i, cmptype_t *pic, cmptype_t *pisc) 93 { 92 static void uint_to_double_template(void *f, unsigned i, cmptype_t *pic, 93 cmptype_t *pisc) 94 { 95 uint_to_double_op_t op = (uint_to_double_op_t) f; 96 94 97 double c; 95 98 double_t sc; 96 97 uint_to_double_op_t op = (uint_to_double_op_t) f;98 99 99 op(uop_a[i], &c, &sc); 100 100 101 101 *pic = (cmptype_t) (c * PRECISION); 102 102 *pisc = (cmptype_t) (sc.val * PRECISION); 103 103 } 104 104 105 static void 106 double_to_uint_template(void *f, unsigned i, cmptype_t *pic, cmptype_t *pisc) 107 { 105 static void double_to_uint_template(void *f, unsigned i, cmptype_t *pic, 106 cmptype_t *pisc) 107 { 108 double_to_uint_op_t op = (double_to_uint_op_t) f; 109 108 110 unsigned int c; 109 111 unsigned int sc; 110 111 double_to_uint_op_t op = (double_to_uint_op_t) f;112 113 112 op(dop_a[i], &c, &sc); 114 113 115 114 *pic = (cmptype_t) c; 116 115 *pisc = (cmptype_t) sc; … … 118 117 119 118 120 static void 121 float_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic, 122 cmptype_t *pisc) 123 { 119 static void float_template_binary(void *f, unsigned i, unsigned j, 120 cmptype_t *pic, cmptype_t *pisc) 121 { 122 float_binary_op_t op = (float_binary_op_t) f; 123 124 124 float c; 125 125 float_t sc; 126 127 float_binary_op_t op = (float_binary_op_t) f;128 129 126 op(fop_a[i], fop_a[j], &c, &sc); 130 127 131 128 *pic = (cmptype_t) (c * PRECISION); 132 129 *pisc = (cmptype_t) (sc.val * PRECISION); 133 130 } 134 131 135 static void 136 double_template_binary(void *f, unsigned i, unsigned j, cmptype_t *pic, 137 cmptype_t *pisc) 138 { 132 static void double_template_binary(void *f, unsigned i, unsigned j, 133 cmptype_t *pic, cmptype_t *pisc) 134 { 135 double_binary_op_t op = (double_binary_op_t) f; 136 139 137 double c; 140 138 double_t sc; 141 142 double_binary_op_t op = (double_binary_op_t) f;143 144 139 op(dop_a[i], dop_a[j], &c, &sc); 145 140 146 141 *pic = (cmptype_t) (c * PRECISION); 147 142 *pisc = (cmptype_t) (sc.val * PRECISION); 148 143 } 149 144 150 static void 151 double_compare_template(void *f, unsigned i, unsigned j, cmptype_t *pis, 152 cmptype_t *piss) 145 static void double_compare_template(void *f, unsigned i, unsigned j, 146 cmptype_t *pis, cmptype_t *piss) 153 147 { 154 148 double_cmp_op_t op = (double_cmp_op_t) f; … … 164 158 cmptype_t ic; 165 159 cmptype_t isc; 166 167 template(f, i, &ic, &isc); 160 161 template(f, i, &ic, &isc); 168 162 cmptype_t diff = cmpabs(ic - isc); 169 163 170 164 if (diff != 0) { 171 165 TPRINTF("i=%u diff=%" PRIdCMPTYPE "\n", i, diff); … … 182 176 183 177 for (unsigned int i = 0; i < OPERANDS; i++) { 184 for (unsigned int j = 0; j < OPERANDS; j++) { 178 for (unsigned int j = 0; j < OPERANDS; j++) { 185 179 cmptype_t ic; 186 180 cmptype_t isc; 187 188 template(f, i, j, &ic, &isc); 181 182 template(f, i, j, &ic, &isc); 189 183 cmptype_t diff = cmpabs(ic - isc); 190 184 … … 206 200 } 207 201 208 static void 209 double_to_uint_operator(double a, unsigned int *pc,unsigned int *psc)210 { 211 double_t sa; 212 213 sa.val = a; 214 202 static void double_to_uint_operator(double a, unsigned int *pc, 203 unsigned int *psc) 204 { 205 double_t sa; 206 207 sa.val = a; 208 215 209 *pc = (unsigned int) a; 216 210 *psc = double_to_uint(sa.data); 217 211 } 218 212 219 static void 220 double_to_int_operator(double a, unsigned int *pc,unsigned int *psc)221 { 222 double_t sa; 223 224 sa.val = a; 225 213 static void double_to_int_operator(double a, unsigned int *pc, 214 unsigned int *psc) 215 { 216 double_t sa; 217 218 sa.val = a; 219 226 220 *pc = (int) a; 227 221 *psc = double_to_int(sa.data); … … 237 231 sa.val = a; 238 232 sb.val = b; 239 if (sa.data.parts.sign == sb.data.parts.sign) 233 234 if (sa.data.parts.sign == sb.data.parts.sign) { 240 235 psc->data = add_float(sa.data, sb.data); 241 else if (sa.data.parts.sign) {236 } else if (sa.data.parts.sign) { 242 237 sa.data.parts.sign = 0; 243 238 psc->data = sub_float(sb.data, sa.data); … … 267 262 return; 268 263 } 269 264 270 265 *pc = a / b; 271 266 … … 287 282 sa.val = a; 288 283 sb.val = b; 289 if (sa.data.parts.sign == sb.data.parts.sign) 284 285 if (sa.data.parts.sign == sb.data.parts.sign) { 290 286 psc->data = add_double(sa.data, sb.data); 291 else if (sa.data.parts.sign) {287 } else if (sa.data.parts.sign) { 292 288 sa.data.parts.sign = 0; 293 289 psc->data = sub_double(sb.data, sa.data); … … 317 313 return; 318 314 } 319 315 320 316 *pc = a / b; 321 317 … … 328 324 } 329 325 330 static void 331 double_cmp_operator(double a, double b, cmptype_t *pis,cmptype_t *piss)326 static void double_cmp_operator(double a, double b, cmptype_t *pis, 327 cmptype_t *piss) 332 328 { 333 329 *pis = dcmp(a, b); 334 330 335 331 double_t sa; 336 332 double_t sb; 337 338 sa.val = a; 339 sb.val = b; 340 333 334 sa.val = a; 335 sb.val = b; 336 341 337 if (is_double_lt(sa.data, sb.data)) 342 338 *piss = -1; … … 352 348 { 353 349 const char *err = NULL; 354 350 355 351 if (!test_template_binary(float_template_binary, float_add_operator)) { 356 352 err = "Float addition failed"; 357 353 TPRINTF("%s\n", err); 358 354 } 355 359 356 if (!test_template_binary(float_template_binary, float_mul_operator)) { 360 357 err = "Float multiplication failed"; 361 358 TPRINTF("%s\n", err); 362 359 } 360 363 361 if (!test_template_binary(float_template_binary, float_div_operator)) { 364 362 err = "Float division failed"; 365 363 TPRINTF("%s\n", err); 366 364 } 365 367 366 if (!test_template_binary(double_template_binary, double_add_operator)) { 368 367 err = "Double addition failed"; 369 368 TPRINTF("%s\n", err); 370 369 } 370 371 371 if (!test_template_binary(double_template_binary, double_mul_operator)) { 372 372 err = "Double multiplication failed"; 373 373 TPRINTF("%s\n", err); 374 374 } 375 375 376 if (!test_template_binary(double_template_binary, double_div_operator)) { 376 377 err = "Double division failed"; 377 378 TPRINTF("%s\n", err); 378 379 } 380 379 381 if (!test_template_binary(double_compare_template, double_cmp_operator)) { 380 382 err = "Double comparison failed"; 381 383 TPRINTF("%s\n", err); 382 384 } 385 383 386 if (!test_template_unary(uint_to_double_template, 384 387 uint_to_double_operator)) { … … 386 389 TPRINTF("%s\n", err); 387 390 } 391 388 392 if (!test_template_unary(double_to_uint_template, 389 393 double_to_uint_operator)) { … … 391 395 TPRINTF("%s\n", err); 392 396 } 397 393 398 if (!test_template_unary(double_to_uint_template, 394 399 double_to_int_operator)) { … … 399 404 return err; 400 405 } 401 -
uspace/app/vdemo/Makefile
r8aaf9dc r7218fe6 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \ 31 $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 32 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \ 30 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 37 EXTRA_CFLAGS += \ 38 -I$(LIBGUI_PREFIX) \ 39 -I$(LIBDRAW_PREFIX) \ 33 40 -I$(LIBSOFTREND_PREFIX) 41 34 42 BINARY = vdemo 35 43 -
uspace/app/viewer/Makefile
r8aaf9dc r7218fe6 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \ 31 $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 32 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \ 30 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 37 EXTRA_CFLAGS += \ 38 -I$(LIBGUI_PREFIX) \ 39 -I$(LIBDRAW_PREFIX) \ 33 40 -I$(LIBSOFTREND_PREFIX) 41 34 42 BINARY = viewer 35 43 -
uspace/app/vlaunch/Makefile
r8aaf9dc r7218fe6 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \ 31 $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 32 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \ 30 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 37 EXTRA_CFLAGS += \ 38 -I$(LIBGUI_PREFIX) \ 39 -I$(LIBDRAW_PREFIX) \ 33 40 -I$(LIBSOFTREND_PREFIX) 41 34 42 BINARY = vlaunch 35 43 -
uspace/app/vterm/Makefile
r8aaf9dc r7218fe6 28 28 29 29 USPACE_PREFIX = ../.. 30 LIBS = $(LIBGUI_PREFIX)/libgui.a $(LIBDRAW_PREFIX)/libdraw.a \ 31 $(LIBSOFTREND_PREFIX)/libsoftrend.a $(LIBGRAPH_PREFIX)/libgraph.a \ 30 31 LIBS = \ 32 $(LIBGUI_PREFIX)/libgui.a \ 33 $(LIBDRAW_PREFIX)/libdraw.a \ 34 $(LIBSOFTREND_PREFIX)/libsoftrend.a \ 35 $(LIBGRAPH_PREFIX)/libgraph.a \ 32 36 $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 33 EXTRA_CFLAGS += -I$(LIBGUI_PREFIX) -I$(LIBDRAW_PREFIX) \ 34 -I$(LIBSOFTREND_PREFIX) -I$(LIBGRAPH_PREFIX) 37 38 EXTRA_CFLAGS += \ 39 -I$(LIBGUI_PREFIX) \ 40 -I$(LIBDRAW_PREFIX) \ 41 -I$(LIBSOFTREND_PREFIX) \ 42 -I$(LIBGRAPH_PREFIX) 43 35 44 BINARY = vterm 36 45 -
uspace/lib/c/Makefile
r8aaf9dc r7218fe6 31 31 ROOT_PATH = $(USPACE_PREFIX)/.. 32 32 33 COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common 34 COMMON_HEADER = $(ROOT_PATH)/common.h 33 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config 35 34 COMMON_HEADER_ARCH = arch/$(UARCH)/include/libarch/common.h 36 37 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config38 35 39 36 LINKER_SCRIPTS = \ … … 50 47 LSONAME = libc.so0 51 48 52 53 -include $(COMMON_MAKEFILE)54 49 -include $(CONFIG_MAKEFILE) 55 50 -include arch/$(UARCH)/Makefile.inc … … 160 155 include $(USPACE_PREFIX)/Makefile.common 161 156 162 163 157 $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 164 158 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@ -
uspace/lib/c/arch/arm32/Makefile.common
r8aaf9dc r7218fe6 31 31 32 32 ifeq ($(CONFIG_FPU),y) 33 GCC_CFLAGS += -mfloat-abi=hard33 GCC_CFLAGS += -mfloat-abi=hard 34 34 else 35 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a35 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a 36 36 endif 37 37 -
uspace/srv/loader/Makefile
r8aaf9dc r7218fe6 29 29 30 30 USPACE_PREFIX = ../.. 31 ROOT_PATH = $(USPACE_PREFIX)/..32 33 COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common34 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config35 36 -include $(COMMON_MAKEFILE)37 -include $(CONFIG_MAKEFILE)38 31 39 32 LINKER_SCRIPT = $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld
Note:
See TracChangeset
for help on using the changeset viewer.