aboutsummaryrefslogtreecommitdiff
path: root/gcc/brig
AgeCommit message (Collapse)AuthorFilesLines
2017-12-15tree-core.h (struct attribute_spec): Swap affects_type_identity and handler ↵Jakub Jelinek2-13/+18
fields. * tree-core.h (struct attribute_spec): Swap affects_type_identity and handler fields. * config/alpha/alpha.c (vms_attribute_table): Swap affects_type_identity and handler fields, adjust comments. * config/mips/mips.c (mips_attribute_table): Likewise. * config/visium/visium.c (visium_attribute_table): Likewise. * config/epiphany/epiphany.c (epiphany_attribute_table): Likewise. * config/microblaze/microblaze.c (microblaze_attribute_table): Likewise. * config/spu/spu.c (spu_attribute_table): Likewise. * config/mcore/mcore.c (mcore_attribute_table): Likewise. * config/arc/arc.c (arc_attribute_table): Likewise. * config/m68k/m68k.c (m68k_attribute_table): Likewise. * config/v850/v850.c (v850_handle_interrupt_attribute, v850_handle_data_area_attribute): Formatting fixes. (v850_attribute_table): Swap affects_type_identity and handler fields, adjust comments. * config/m32r/m32r.c (m32r_attribute_table): Likewise. * config/arm/arm.c (arm_attribute_table): Likewise. * config/avr/avr.c (avr_attribute_table): Likewise. * config/s390/s390.c (s390_attribute_table): Likewise. * config/sh/sh.c (sh_attribute_table): Likewise. * config/i386/i386.c (ix86_handle_cconv_attribute, ix86_handle_callee_pop_aggregate_return): Formatting fixes. (ix86_attribute_table): Swap affects_type_identity and handler fields, adjust comments. * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise. * config/sparc/sparc.c (sparc_attribute_table): Likewise. * config/m32c/m32c.c (m32c_attribute_table): Likewise. * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Likewise. * config/ia64/ia64.c (ia64_attribute_table): Likewise. * config/msp430/msp430.c (msp430_attribute_table): Likewise. * config/rx/rx.c (rx_attribute_table): Likewise. * config/cr16/cr16.c (cr16_attribute_table): Likewise. * config/h8300/h8300.c (h8300_attribute_table): Likewise. * config/nvptx/nvptx.c (nvptx_attribute_table): Likewise. * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Likewise. * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise. * config/stormy16/stormy16.c (xstormy16_attribute_table): Likewise. * config/bfin/bfin.c (bfin_attribute_table): Likewise. * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise. * config/rl78/rl78.c (rl78_attribute_table): Likewise. * config/nds32/nds32.c (nds32_attribute_table): Likewise. * doc/plugins.texi (user_attr): Likewise. Add NULL for exclude. * attribs.c (empty_attribute_table): Swap affects_type_identity and handler fields. (register_scoped_attributes, decl_attributes): Formatting fixes. ada/ * gcc-interface/utils.c (gnat_internal_attribute_table): Swap affects_type_identity and handler fields, adjust comments. brig/ * brig-lang.c (brig_attribute_table): Swap affects_type_identity and handler fields, adjust comments. c-family/ * c-attribs.c (c_common_attribute_table, c_common_format_attribute_table): Swap affects_type_identity and handler fields, adjust comments. cp/ * tree.c (cxx_attribute_table, std_attribute_table): Swap affects_type_identity and handler fields, adjust comments. fortran/ * f95-lang.c (gfc_attribute_table): Swap affects_type_identity and handler fields, adjust comments. lto/ * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap affects_type_identity and handler fields, adjust comments. testsuite/ * g++.dg/plugin/attribute_plugin.c (user_attr): Swap affects_type_identity and handler fields, add NULL for exclude. From-SVN: r255699
2017-12-08arc.c (arc_attribute_table): Add exclusions to the comment.Jakub Jelinek2-1/+5
* config/arc/arc.c (arc_attribute_table): Add exclusions to the comment. * config/avr/avr.c (avr_attribute_table): Likewise. * config/msp430/msp430.c (msp430_attribute_table): Likewise. * config/rl78/rl78.c (rl78_attribute_table): Likewise. * config/nds32/nds32.c (nds32_attribute_table): Likewise. * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member of struct attribute_spec. * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise. ada/ * gcc-interface/utils.c (gnat_internal_attribute_table): Add exclusions to the comment. brig/ * brig-lang.c (brig_attribute_table): Fix up comment. From-SVN: r255509
2017-12-07PR c/81544 - attribute noreturn and warn_unused_result on the same function ↵Martin Sebor1-6/+6
accepted PR c/81544 - attribute noreturn and warn_unused_result on the same function accepted PR c/81566 - invalid attribute aligned accepted on functions gcc/ada/ChangeLog: PR c/81544 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize new member of struct attribute_spec. gcc/c/ChangeLog: PR c/81544 * c-decl.c (c_decl_attributes): Look up existing declaration and pass it to decl_attributes. gcc/c-family/ChangeLog: PR c/81544 PR c/81566 * c-attribs.c (attr_aligned_exclusions): New array. (attr_alloc_exclusions, attr_cold_hot_exclusions): Same. (attr_common_exclusions, attr_const_pure_exclusions): Same. (attr_gnu_inline_exclusions, attr_inline_exclusions): Same. (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same. (attr_warn_unused_result_exclusions): Same. (handle_hot_attribute, handle_cold_attribute): Simplify. (handle_const_attribute): Warn on function returning void. (handle_pure_attribute): Same. (handle_aligned_attribute): Diagnose conflicting attribute specifications. * c-warn.c (diagnose_mismatched_attributes): Simplify. gcc/cp/ChangeLog: PR c/81544 * cp-tree.h (decls_match): Add default argument. * decl.c (decls_match): Avoid calling into the target back end and triggering an error. * decl2.c (cplus_decl_attributes): Look up existing declaration and pass it to decl_attributes. * tree.c (cxx_attribute_table): Initialize new member of struct attribute_spec. gcc/fortran/ChangeLog: PR c/81544 * f95-lang.c (gfc_attribute_table): Initialize new member of struct attribute_spec. gcc/lto/ChangeLog: PR c/81544 * lto-lang.c (lto_attribute_table): Initialize new member of struct attribute_spec. gcc/ChangeLog: PR c/81544 * attribs.c (empty_attribute_table): Initialize new member of struct attribute_spec. (decl_attributes): Add argument. Handle mutually exclusive combinations of attributes. (selftests::test_attribute_exclusions): New function. (selftests::attribute_c_tests): Ditto. * attribs.h (decl_attributes): Add default argument. * selftest.h (attribute_c_tests): Declare. * selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests. * tree-core.h (attribute_spec::exclusions, exclude): New type and member. * doc/extend.texi (Common Function Attributes): Update const and pure. gcc/testsuite/ChangeLog: PR c/81544 * c-c++-common/Wattributes-2.c: New test. * c-c++-common/Wattributes.c: New test. * c-c++-common/attributes-3.c: Adjust. * gcc.dg/Wattributes-6.c: New test. * gcc.dg/Wattributes-7.c: New test. * gcc.dg/attr-noinline.c * gcc.dg/pr44964.c: Same. * gcc.dg/torture/pr42363.c: Same. * gcc.dg/tree-ssa/ssa-ccp-2.c: Same. From-SVN: r255469
2017-11-28tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.Jakub Jelinek2-2/+8
* tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree. Adjust comment. * tree.h (SWITCH_LABELS): Remove. * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS, assert SWITCH_BODY is non-NULL. * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS handling. * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR. c/ * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead of build3. cp/ * cp-gimplify.c (genericize_switch_stmt): Build SWITCH_EXPR using build2_loc instead of build3_loc. ada/ * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR using build2 instead of build3. jit/ * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead of build3. Formatting fixes. Adjust funciton comment. fortran/ * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR using fold_build2_loc instead of fold_build3_loc. * trans-io.c (io_result): Likewise. * trans-stmt.c (gfc_trans_integer_select, gfc_trans_character_select): Likewise. go/ * go-gcc.cc (Gcc_backend::switch_statement): Build SWITCH_EXPR using build2_loc instead of build3_loc. brig/ * brigfrontend/brig-branch-inst-handler.cc (brig_branch_inst_handler::operator): Build SWITCH_EXPR using build2 instead of build3. From-SVN: r255192
2017-11-17[BRIGFE] Fix sprintf format string type mismatch on 32b machines.Henry Linjamäki2-2/+8
From-SVN: r254870
2017-11-16[BRIGFE] Reduce the number of type conversions due toHenry Linjamäki13-144/+407
the untyped HSAIL regs. Instead of always representing the HSAIL's untyped registers as unsigned int, the gccbrig now pre-analyzes the BRIG code and builds the register variables as a type used the most when storing or reading data to/from each register. This reduces the total conversions which cannot be always optimized away. From-SVN: r254837
2017-11-16[BRIG] added documentation in gccbrig.texiPekka Jääskeläinen2-1/+153
From-SVN: r254820
2017-10-31[BRIGFE] Fix PR 82771.Henry Linjamäki2-5/+9
From-SVN: r254265
2017-10-23Use scalar_int/float_mode in brig_langhook_type_for_modeRichard Sandiford2-6/+12
This follows on from similar changes a couple of months ago and is needed when general modes have variable size. 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org> gcc/brig/ * brig-lang.c (brig_langhook_type_for_mode): Use scalar_int_mode and scalar_float_mode. From-SVN: r254000
2017-10-09[BRIGFE] Support BRIG_KIND_NONE directives.Pekka Jääskeläinen4-8/+31
These directives are legal everywhere. They can be used to patch away BRIG entries at the binary level. Also add extra error detection for zeroed regions: make sure the byteCount field is never zero. The call code still failed a few PRM test cases. Now all PRM branch cases pass again. From-SVN: r253545
2017-10-03[BRIGFE] Fix (more) crash with calls with more than 4 args.Henry Linjamäki2-1/+7
It missed a reference which is required because vector expansion can move the object to another location. From-SVN: r253382
2017-09-29[BRIGFE] Fix crash with calls with more than 4 args.Henry Linjamäki2-2/+11
Also fix a misexecution issue with kernels that have both unexpanded ID functions and calls to subfunctions. From-SVN: r253298
2017-09-28[BRIGFE] Changed pure attributes to const for the brig-builtinsHenry Linjamäki2-0/+135
that are actually const. Also: * Fixed brig-lang.c such that the builtin attributes actually have effect... * Made -O3 the default optimization level for BRIG. From-SVN: r253254
2017-09-27[BRIGFE] Improved support for function and module scope groupPekka Jääskeläinen13-126/+377
segment variables. PRM specs defines function and module scope group segment variables as an experimental feature. However, PRM test suite uses and hcc relies on them. In addition, hcc assumes certain group variable layout in its dynamic group segment allocation code. We cannot have global group memory offsets if we want to both have kernel-specific group segment size and multiple kernels calling the same functions that use function scope group memory variables. Now group segment is handled by separate book keeping of module scope and function (kernel) offsets. Each function has a "frame" in the group segment offset to which is given as an argument. From-SVN: r253233
2017-09-25BRIGFE fixes:Pekka Jääskeläinen2-3/+24
* brig-builtins.def: Treat HSAIL barrier builtins as setjmp/longjump style functions. * brigfrontend/brig-to-generic.cc: Ensure per WI copies of private variables are aligned too. * rt/workitems.c: Assume the host runtime allocates the work group memory. From-SVN: r253160
2017-09-17Fix gccbrig documentation buildThomas Schwinge3-24/+44
gcc/brig/ * Make-lang.in (GO_TEXI_FILES): Rename to... (BRIG_TEXI_FILES): ... this. (doc/gccbrig.info, doc/gccbrig.dvi, doc/gccbrig.pdf, brig.info) (brig.srcinfo, brig.man, brig.srcman, brig.install-man) ($(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)): Uncomment/enable targets. (gccbrig.pod): New target. * gccbrig.texi: New file. From-SVN: r252893
2017-08-04re PR hsa/81713 (BIT_FIELD_REF produced by Brig FE do not pass new verification)Henry Linjamäki3-17/+19
Fix PR 81713 * brigfrontend/brig-basic-inst-handler.cc: replace build_int_cst with bitsize_int in building BIT_FIELD_REF. * brigfrontend/brig-code-entry-handler.cc: likewise. From-SVN: r250874
2017-07-05Remove enum before machine_modeRichard Sandiford3-2/+9
r216834 did a mass removal of "enum" before "machine_mode". This patch removes some new uses that have been added since then. 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * combine.c (simplify_if_then_else): Remove "enum" before "machine_mode". * compare-elim.c (can_eliminate_compare): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type): Likewise. (aarch64_lookup_simd_builtin_type): Likewise. (aarch64_simd_builtin_type): Likewise. (aarch64_init_simd_builtin_types): Likewise. (aarch64_simd_expand_args): Likewise. * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist): Likewise. (aarch64_reverse_mask): Likewise. (aarch64_simd_emit_reg_reg_move): Likewise. (aarch64_gen_adjusted_ldpstp): Likewise. (aarch64_ccmp_mode_to_code): Likewise. (aarch64_operands_ok_for_ldpstp): Likewise. (aarch64_operands_adjust_ok_for_ldpstp): Likewise. * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class): Likewise. (aarch64_min_divisions_for_recip_mul): Likewise. (aarch64_reassociation_width): Likewise. (aarch64_get_condition_code_1): Likewise. (aarch64_simd_emit_reg_reg_move): Likewise. (aarch64_simd_attr_length_rglist): Likewise. (aarch64_reverse_mask): Likewise. (aarch64_operands_ok_for_ldpstp): Likewise. (aarch64_operands_adjust_ok_for_ldpstp): Likewise. (aarch64_gen_adjusted_ldpstp): Likewise. * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename): Likewise. * config/arc/arc.c (legitimate_offset_address_p): Likewise. * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise. (arm_lookup_simd_builtin_type): Likewise. (arm_simd_builtin_type): Likewise. (arm_init_simd_builtin_types): Likewise. (arm_expand_builtin_args): Likewise. * config/arm/arm-protos.h (arm_expand_builtin): Likewise. * config/ft32/ft32.c (ft32_libcall_value): Likewise. (ft32_setup_incoming_varargs): Likewise. (ft32_function_arg): Likewise. (ft32_function_arg_advance): Likewise. (ft32_pass_by_reference): Likewise. (ft32_arg_partial_bytes): Likewise. (ft32_valid_pointer_mode): Likewise. (ft32_addr_space_pointer_mode): Likewise. (ft32_addr_space_legitimate_address_p): Likewise. * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple): Likewise. * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise. (ix86_emit_outlined_ms2sysv_restore): Likewise. (iamcu_alignment): Likewise. (canonicalize_vector_int_perm): Likewise. (ix86_noce_conversion_profitable_p): Likewise. (ix86_mpx_bound_mode): Likewise. (ix86_operands_ok_for_move_multiple): Likewise. * config/microblaze/microblaze-protos.h (microblaze_expand_conditional_branch_reg): Likewise. * config/microblaze/microblaze.c (microblaze_expand_conditional_branch_reg): Likewise. * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok): Likewise. (rs6000_reassociation_width): Likewise. (rs6000_invalid_binary_op): Likewise. (fusion_p9_p): Likewise. (emit_fusion_p9_load): Likewise. (emit_fusion_p9_store): Likewise. * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p): Likewise. (riscv_hard_regno_mode_ok_p): Likewise. (riscv_address_insns): Likewise. (riscv_split_symbol): Likewise. (riscv_legitimize_move): Likewise. (riscv_function_value): Likewise. (riscv_hard_regno_nregs): Likewise. (riscv_expand_builtin): Likewise. * config/riscv/riscv.c (riscv_build_integer_1): Likewise. (riscv_build_integer): Likewise. (riscv_split_integer): Likewise. (riscv_legitimate_constant_p): Likewise. (riscv_cannot_force_const_mem): Likewise. (riscv_regno_mode_ok_for_base_p): Likewise. (riscv_valid_base_register_p): Likewise. (riscv_valid_offset_p): Likewise. (riscv_valid_lo_sum_p): Likewise. (riscv_classify_address): Likewise. (riscv_legitimate_address_p): Likewise. (riscv_address_insns): Likewise. (riscv_load_store_insns): Likewise. (riscv_force_binary): Likewise. (riscv_split_symbol): Likewise. (riscv_force_address): Likewise. (riscv_legitimize_address): Likewise. (riscv_move_integer): Likewise. (riscv_legitimize_const_move): Likewise. (riscv_legitimize_move): Likewise. (riscv_address_cost): Likewise. (riscv_subword): Likewise. (riscv_output_move): Likewise. (riscv_canonicalize_int_order_test): Likewise. (riscv_emit_int_order_test): Likewise. (riscv_function_arg_boundary): Likewise. (riscv_pass_mode_in_fpr_p): Likewise. (riscv_pass_fpr_single): Likewise. (riscv_pass_fpr_pair): Likewise. (riscv_get_arg_info): Likewise. (riscv_function_arg): Likewise. (riscv_function_arg_advance): Likewise. (riscv_arg_partial_bytes): Likewise. (riscv_function_value): Likewise. (riscv_pass_by_reference): Likewise. (riscv_setup_incoming_varargs): Likewise. (riscv_print_operand): Likewise. (riscv_elf_select_rtx_section): Likewise. (riscv_save_restore_reg): Likewise. (riscv_for_each_saved_reg): Likewise. (riscv_register_move_cost): Likewise. (riscv_hard_regno_mode_ok_p): Likewise. (riscv_hard_regno_nregs): Likewise. (riscv_class_max_nregs): Likewise. (riscv_memory_move_cost): Likewise. * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise. * config/rl78/rl78.c (rl78_split_movsi): Likewise. (rl78_addr_space_address_mode): Likewise. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise. (rs6000_reassociation_width): Likewise. (rs6000_invalid_binary_op): Likewise. (fusion_p9_p): Likewise. (emit_fusion_p9_load): Likewise. (emit_fusion_p9_store): Likewise. * config/visium/visium-protos.h (prepare_move_operands): Likewise. (ok_for_simple_move_operands): Likewise. (ok_for_simple_move_strict_operands): Likewise. (ok_for_simple_arith_logic_operands): Likewise. (visium_legitimize_reload_address): Likewise. (visium_select_cc_mode): Likewise. (output_cbranch): Likewise. (visium_split_double_move): Likewise. (visium_expand_copysign): Likewise. (visium_expand_int_cstore): Likewise. (visium_expand_fp_cstore): Likewise. * config/visium/visium.c (visium_pass_by_reference): Likewise. (visium_function_arg): Likewise. (visium_function_arg_advance): Likewise. (visium_libcall_value): Likewise. (visium_setup_incoming_varargs): Likewise. (visium_legitimate_constant_p): Likewise. (visium_legitimate_address_p): Likewise. (visium_legitimize_address): Likewise. (visium_secondary_reload): Likewise. (visium_register_move_cost): Likewise. (visium_memory_move_cost): Likewise. (prepare_move_operands): Likewise. (ok_for_simple_move_operands): Likewise. (ok_for_simple_move_strict_operands): Likewise. (ok_for_simple_arith_logic_operands): Likewise. (visium_function_value_1): Likewise. (rtx_ok_for_offset_p): Likewise. (visium_legitimize_reload_address): Likewise. (visium_split_double_move): Likewise. (visium_expand_copysign): Likewise. (visium_expand_int_cstore): Likewise. (visium_expand_fp_cstore): Likewise. (visium_split_cstore): Likewise. (visium_select_cc_mode): Likewise. (visium_split_cbranch): Likewise. (output_cbranch): Likewise. (visium_print_operand_address): Likewise. * expmed.c (flip_storage_order): Likewise. * expmed.h (emit_cstore): Likewise. (flip_storage_order): Likewise. * genrecog.c (validate_pattern): Likewise. * hsa-gen.c (gen_hsa_addr): Likewise. * internal-fn.c (expand_arith_overflow): Likewise. * ira-color.c (allocno_copy_cost_saving): Likewise. * lra-assigns.c (find_hard_regno_for_1): Likewise. * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise. (process_invariant_for_inheritance): Likewise. * lra-eliminations.c (move_plus_up): Likewise. * omp-low.c (lower_oacc_reductions): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise. (TARGET_CHKP_BOUND_MODE): Likewise.. * targhooks.c (default_chkp_bound_mode): Likewise. (default_setup_incoming_vararg_bounds): Likewise. * targhooks.h (default_chkp_bound_mode): Likewise. (default_setup_incoming_vararg_bounds): Likewise. * tree-ssa-math-opts.c (divmod_candidate_p): Likewise. * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise. (have_whole_vector_shift): Likewise. * tree-vect-stmts.c (vectorizable_load): Likewise. * doc/tm.texi: Regenerate. gcc/brig/ * brig-c.h (brig_type_for_mode): Remove "enum" before "machine_mode". * brig-lang.c (brig_langhook_type_for_mode): Likewise. gcc/jit/ * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before "machine_mode". Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r250003
2017-07-04brig-function.cc: Include profile-count.h.Jakub Jelinek3-0/+7
* brigfrontend/brig-function.cc: Include profile-count.h. * brigfrontend/brig-to-generic.cc: Likewise. From-SVN: r249962
2017-05-18More dump_flags_t conversionThomas Schwinge2-1/+6
gcc/brig/ * brigfrontend/brig-to-generic.h (class brig_to_generic): Use "dump_flags_t" for "m_dump_flags" member. From-SVN: r248200
2017-05-13BRIG FE: Fix an assertion when doing an 'lda' ofPekka Jääskeläinen2-3/+12
a private array offset. From-SVN: r248006
2017-05-04Minor BRIG/HSAIL frontend updates and bug fixes:Pekka Jääskeläinen2-1/+30
* brig-builtins.def: Added a builtin for class_f64. * builtin-types.def: Added a builtin type needed by class_f64. * brigfrontend/brig-code-entry-handler.cc (brig_code_entry_handler::build_address_operand): Fix a bug with reg+offset addressing on 32b segments. In large mode, the offset is treated as 32bits unless it's global, readonly or kernarg address space. * rt/workitems.c: Removed a leftover comment. * rt/arithmetic.c (__hsail_class_f32, __hsail_class_f64): Fix the check for signaling/non-signalling NaN. Add class_f64 default implementation. From-SVN: r247576
2017-02-01re PR other/79250 (brig/brigfrontend/brig-to-generic.cc: two small problems)Pekka Jääskeläinen4-4/+19
* brigfrontend/brig-code-entry-handler.cc: fix address expressions which refer only to offset 0, but nothing else. * brigfrontend/brig-lane-inst-handler.cc: fix activelanepermute_b64 HSAIL instruction. * brigfrontend/brig-to-generic.cc: remove useless c_str() call. Add missing va_end (). Fix PR79250 From-SVN: r245084
2017-01-30* brigfrontend/brig-code-entry-handler.ccJakub Jelinek2-4/+11
(brig_code_entry_handler::get_tree_cst_for_hsa_operand): For %lu cast size_t arguments to unsigned long. From-SVN: r245036
2017-01-27[brigfe] Small fixesMartin Jambor2-1/+5
2017-01-27 Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> * configure.ac: Moved the white list of enabling BRIG FE to libhsail-rt/configure.tgt. * configure: Regenerated. * MAINTAINERS: Updated maintainers for BRIG FE and libhsail-rt. gcc/ * builtin-types.def: Use unsigned_char_type_node for BT_UINT8. Use uint16_type_node for BT_UINT16. gcc/brig/ * config-lang.in: Removed stale target-libbrig reference. libhsail-rt/ * configure.tgt: Moved the white list of supported targets here from configure.ac. Added i[3456789]86-*-linux* as a supported env for the BRIG FE. * README: Added a proper description of what libhsail-rt is. From-SVN: r244978
2017-01-26update-copyright.py: Add libhsail-rt to self.default_dirs and call ↵Jakub Jelinek1-1/+5
self.add_dir on it. contrib/ * update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it. Add Intel Corporation to external authors. gcc/ * brig-builtins.def: Update copyright years. * config/arm/arm_acle_builtins.def: Update copyright years. gcc/brig/ Update copyright years. gcc/testsuite/ * brig.dg/dg.exp: Update copyright years. * lib/brig-dg.exp: Update copyright years. * lib/brig.exp: Update copyright years. libhsail-rt/ Update copyright years. libstdc++-v3/ * libsupc++/eh_atomics.h: Update copyright years. * testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years. From-SVN: r244920
2017-01-26update-copyright.py: Add libhsail-rt to self.default_dirs and call ↵Jakub Jelinek39-39/+39
self.add_dir on it. contrib/ * update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it. Add Intel Corporation to external authors. gcc/ * brig-builtins.def: Update copyright years. * config/arm/arm_acle_builtins.def: Update copyright years. gcc/brig/ Update copyright years. gcc/testsuite/ * brig.dg/dg.exp: Update copyright years. * lib/brig-dg.exp: Update copyright years. * lib/brig.exp: Update copyright years. libhsail-rt/ Update copyright years. libstdc++-v3/ * libsupc++/eh_atomics.h: Update copyright years. * testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years. From-SVN: r244919
2017-01-24Brig front-endPekka Jääskeläinen40-0/+9707
2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> Martin Jambor <mjambor@suse.cz> * Makefile.def (target_modules): Added libhsail-rt. (languages): Added language brig. * Makefile.in: Regenerated. * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Added tgarget-libhsail-rt. Make brig unsupported on untested architectures. * configure: Regenerated. gcc/ * brig-builtins.def: New file. * builtins.def (DEF_HSAIL_BUILTIN): New macro. (DEF_HSAIL_ATOMIC_BUILTIN): Likewise. (DEF_HSAIL_SAT_BUILTIN): Likewise. (DEF_HSAIL_INTR_BUILTIN): Likewise. (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise. * builtin-types.def (BT_INT8): New. (BT_INT16): Likewise. (BT_UINT8): Likewise. (BT_UINT16): Likewise. (BT_FN_ULONG): Likewise. (BT_FN_UINT_INT): Likewise. (BT_FN_UINT_ULONG): Likewise. (BT_FN_UINT_LONG): Likewise. (BT_FN_UINT_PTR): Likewise. (BT_FN_ULONG_PTR): Likewise. (BT_FN_INT8_FLOAT): Likewise. (BT_FN_INT16_FLOAT): Likewise. (BT_FN_UINT32_FLOAT): Likewise. (BT_FN_UINT16_FLOAT): Likewise. (BT_FN_UINT8_FLOAT): Likewise. (BT_FN_UINT64_FLOAT): Likewise. (BT_FN_UINT16_UINT32): Likewise. (BT_FN_UINT32_UINT16): Likewise. (BT_FN_UINT16_UINT16_UINT16): Likewise. (BT_FN_INT_PTR_INT): Likewise. (BT_FN_UINT_PTR_UINT): Likewise. (BT_FN_LONG_PTR_LONG): Likewise. (BT_FN_ULONG_PTR_ULONG): Likewise. (BT_FN_VOID_UINT64_UINT64): Likewise. (BT_FN_UINT8_UINT8_UINT8): Likewise. (BT_FN_INT8_INT8_INT8): Likewise. (BT_FN_INT16_INT16_INT16): Likewise. (BT_FN_INT_INT_INT): Likewise. (BT_FN_UINT_FLOAT_UINT): Likewise. (BT_FN_FLOAT_UINT_UINT): Likewise. (BT_FN_ULONG_UINT_UINT): Likewise. (BT_FN_ULONG_UINT_PTR): Likewise. (BT_FN_ULONG_ULONG_ULONG): Likewise. (BT_FN_UINT_UINT_UINT): Likewise. (BT_FN_VOID_UINT_PTR): Likewise. (BT_FN_UINT_UINT_PTR: Likewise. (BT_FN_UINT32_UINT64_PTR): Likewise. (BT_FN_INT_INT_UINT_UINT): Likewise. (BT_FN_UINT_UINT_UINT_UINT): Likewise. (BT_FN_UINT_UINT_UINT_PTR): Likewise. (BT_FN_UINT_ULONG_ULONG_UINT): Likewise. (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise. (BT_FN_LONG_LONG_UINT_UINT): Likewise. (BT_FN_ULONG_ULONG_UINT_UINT): Likewise. (BT_FN_VOID_UINT32_UINT64_PTR): Likewise. (BT_FN_VOID_UINT32_UINT32_PTR): Likewise. (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise. (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise. (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise. * doc/frontends.texi: List BRIG FE. * doc/install.texi (Testing): Add BRIG tesring requirements. * doc/invoke.texi (Overall Options): Mention BRIG. * doc/standards.texi (Standards): Doucment BRIG HSA version. gcc/brig/ * Make-lang.in: New file. * brig-builtins.h: Likewise. * brig-c.h: Likewise. * brig-lang.c: Likewise. * brigspec.c: Likewise. * config-lang.in: Likewise. * lang-specs.h: Likewise. * lang.opt: Likewise. * brigfrontend/brig-arg-block-handler.cc: Likewise. * brigfrontend/brig-atomic-inst-handler.cc: Likewise. * brigfrontend/brig-basic-inst-handler.cc: Likewise. * brigfrontend/brig-branch-inst-handler.cc: Likewise. * brigfrontend/brig-cmp-inst-handler.cc: Likewise. * brigfrontend/brig-code-entry-handler.cc: Likewise. * brigfrontend/brig-code-entry-handler.h: Likewise. * brigfrontend/brig-comment-handler.cc: Likewise. * brigfrontend/brig-control-handler.cc: Likewise. * brigfrontend/brig-copy-move-inst-handler.cc: Likewise. * brigfrontend/brig-cvt-inst-handler.cc: Likewise. * brigfrontend/brig-fbarrier-handler.cc: Likewise. * brigfrontend/brig-function-handler.cc: Likewise. * brigfrontend/brig-function.cc: Likewise. * brigfrontend/brig-function.h: Likewise. * brigfrontend/brig-inst-mod-handler.cc: Likewise. * brigfrontend/brig-label-handler.cc: Likewise. * brigfrontend/brig-lane-inst-handler.cc: Likewise. * brigfrontend/brig-machine.c: Likewise. * brigfrontend/brig-machine.h: Likewise. * brigfrontend/brig-mem-inst-handler.cc: Likewise. * brigfrontend/brig-module-handler.cc: Likewise. * brigfrontend/brig-queue-inst-handler.cc: Likewise. * brigfrontend/brig-seg-inst-handler.cc: Likewise. * brigfrontend/brig-signal-inst-handler.cc: Likewise. * brigfrontend/brig-to-generic.cc: Likewise. * brigfrontend/brig-to-generic.h: Likewise. * brigfrontend/brig-util.cc: Likewise. * brigfrontend/brig-util.h: Likewise. * brigfrontend/brig-variable-handler.cc: Likewise. * brigfrontend/phsa.h: Likewise. gcc/testsuite/ * lib/brig-dg.exp: New file. * lib/brig.exp: Likewise. * brig.dg/README: Likewise. * brig.dg/dg.exp: Likewise. * brig.dg/test/gimple/alloca.hsail: Likewise. * brig.dg/test/gimple/atomics.hsail: Likewise. * brig.dg/test/gimple/branches.hsail: Likewise. * brig.dg/test/gimple/fbarrier.hsail: Likewise. * brig.dg/test/gimple/function_calls.hsail: Likewise. * brig.dg/test/gimple/kernarg.hsail: Likewise. * brig.dg/test/gimple/mem.hsail: Likewise. * brig.dg/test/gimple/mulhi.hsail: Likewise. * brig.dg/test/gimple/packed.hsail: Likewise. * brig.dg/test/gimple/smoke_test.hsail: Likewise. * brig.dg/test/gimple/variables.hsail: Likewise. * brig.dg/test/gimple/vector.hsail: Likewise. include/ * hsa.h: Moved here from libgomp/plugin/hsa.h. libgomp/ * plugin/hsa.h: Moved to top level include. * plugin/plugin-hsa.c: Chanfgd include of hsa.h accordingly. libhsail-rt/ * Makefile.am: New file. * target-config.h.in: Likewise. * configure.ac: Likewise. * configure: Likewise. * config.h.in: Likewise. * aclocal.m4: Likewise. * README: Likewise. * Makefile.in: Likewise. * include/internal/fibers.h: Likewise. * include/internal/phsa-queue-interface.h: Likewise. * include/internal/phsa-rt.h: Likewise. * include/internal/workitems.h: Likewise. * rt/arithmetic.c: Likewise. * rt/atomics.c: Likewise. * rt/bitstring.c: Likewise. * rt/fbarrier.c: Likewise. * rt/fibers.c: Likewise. * rt/fp16.c: Likewise. * rt/misc.c: Likewise. * rt/multimedia.c: Likewise. * rt/queue.c: Likewise. * rt/sat_arithmetic.c: Likewise. * rt/segment.c: Likewise. * rt/workitems.c: Likewise. Co-Authored-By: Martin Jambor <mjambor@suse.cz> From-SVN: r244867