comparison gcc/tree-mudflap.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
23 23
24 #include "config.h" 24 #include "config.h"
25 #include "system.h" 25 #include "system.h"
26 #include "coretypes.h" 26 #include "coretypes.h"
27 #include "tm.h" 27 #include "tm.h"
28 #include "hard-reg-set.h"
29 #include "rtl.h"
30 #include "tree.h" 28 #include "tree.h"
31 #include "tm_p.h" 29 #include "tm_p.h"
32 #include "basic-block.h" 30 #include "basic-block.h"
33 #include "flags.h" 31 #include "flags.h"
34 #include "function.h" 32 #include "function.h"
330 layout_type (struct_type); 328 layout_type (struct_type);
331 329
332 return struct_type; 330 return struct_type;
333 } 331 }
334 332
335 #define build_function_type_0(rtype) \
336 build_function_type (rtype, void_list_node)
337 #define build_function_type_1(rtype, arg1) \
338 build_function_type (rtype, tree_cons (0, arg1, void_list_node))
339 #define build_function_type_3(rtype, arg1, arg2, arg3) \
340 build_function_type (rtype, \
341 tree_cons (0, arg1, \
342 tree_cons (0, arg2, \
343 tree_cons (0, arg3, \
344 void_list_node))))
345 #define build_function_type_4(rtype, arg1, arg2, arg3, arg4) \
346 build_function_type (rtype, \
347 tree_cons (0, arg1, \
348 tree_cons (0, arg2, \
349 tree_cons (0, arg3, \
350 tree_cons (0, arg4, \
351 void_list_node)))))
352
353 /* Initialize the global tree nodes that correspond to mf-runtime.h 333 /* Initialize the global tree nodes that correspond to mf-runtime.h
354 declarations. */ 334 declarations. */
355 void 335 void
356 mudflap_init (void) 336 mudflap_init (void)
357 { 337 {
375 355
376 mf_cache_struct_type = mf_make_mf_cache_struct_type (mf_uintptr_type); 356 mf_cache_struct_type = mf_make_mf_cache_struct_type (mf_uintptr_type);
377 mf_cache_structptr_type = build_pointer_type (mf_cache_struct_type); 357 mf_cache_structptr_type = build_pointer_type (mf_cache_struct_type);
378 mf_cache_array_type = build_array_type (mf_cache_struct_type, 0); 358 mf_cache_array_type = build_array_type (mf_cache_struct_type, 0);
379 mf_check_register_fntype = 359 mf_check_register_fntype =
380 build_function_type_4 (void_type_node, ptr_type_node, size_type_node, 360 build_function_type_list (void_type_node, ptr_type_node, size_type_node,
381 integer_type_node, mf_const_string_type); 361 integer_type_node, mf_const_string_type, NULL_TREE);
382 mf_unregister_fntype = 362 mf_unregister_fntype =
383 build_function_type_3 (void_type_node, ptr_type_node, size_type_node, 363 build_function_type_list (void_type_node, ptr_type_node, size_type_node,
384 integer_type_node); 364 integer_type_node, NULL_TREE);
385 mf_init_fntype = 365 mf_init_fntype =
386 build_function_type_0 (void_type_node); 366 build_function_type_list (void_type_node, NULL_TREE);
387 mf_set_options_fntype = 367 mf_set_options_fntype =
388 build_function_type_1 (integer_type_node, mf_const_string_type); 368 build_function_type_list (integer_type_node, mf_const_string_type, NULL_TREE);
389 369
390 mf_cache_array_decl = mf_make_builtin (VAR_DECL, "__mf_lookup_cache", 370 mf_cache_array_decl = mf_make_builtin (VAR_DECL, "__mf_lookup_cache",
391 mf_cache_array_type); 371 mf_cache_array_type);
392 mf_cache_shift_decl = mf_make_builtin (VAR_DECL, "__mf_lc_shift", 372 mf_cache_shift_decl = mf_make_builtin (VAR_DECL, "__mf_lc_shift",
393 unsigned_char_type_node); 373 unsigned_char_type_node);
407 mf_init_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_init", 387 mf_init_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_init",
408 mf_init_fntype); 388 mf_init_fntype);
409 mf_set_options_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_set_options", 389 mf_set_options_fndecl = mf_make_builtin (FUNCTION_DECL, "__mf_set_options",
410 mf_set_options_fntype); 390 mf_set_options_fntype);
411 } 391 }
412 #undef build_function_type_4
413 #undef build_function_type_3
414 #undef build_function_type_1
415 #undef build_function_type_0
416 392
417 393
418 /* ------------------------------------------------------------------------ */ 394 /* ------------------------------------------------------------------------ */
419 /* This is the second part of the mudflap instrumentation. It works on 395 /* This is the second part of the mudflap instrumentation. It works on
420 low-level GIMPLE using the CFG, because we want to run this pass after 396 low-level GIMPLE using the CFG, because we want to run this pass after