[{"id":1762413,"web_url":"http://patchwork.ozlabs.org/comment/1762413/","msgid":"<dda92e16-aa26-f7ff-b35d-f704dde642f6@redhat.com>","list_archive_url":null,"date":"2017-09-04T04:54:09","subject":"Re: PR82045: Avoid passing machine modes through \"...\"","submitter":{"id":4400,"url":"http://patchwork.ozlabs.org/api/people/4400/","name":"Jeff Law","email":"law@redhat.com"},"content":"On 09/01/2017 07:55 AM, Richard Sandiford wrote:\n> PR82045 is about a bootstrap failure on sparc-sun-solaris2.11.\n> The problem was that we were passing the new machine_mode wrapper\n> classes through \"...\"  to emit_library_call(_value), which then\n> read them back as ints instead.\n> \n> The simplest fix seemed to be replace \"...\" with an array of\n> rtx_mode_ts, then provide wrappers for the common cases.  This\n> bulks out rtl.h a bit, but it does make things a bit more typesafe.\n> \n> AFAICT this is the only place where we passed machine_modes this way.\n> \n> Tested so far on aarch64-linux-gnu, powerpc64le-linux-gnu and\n> x86_64-linux-gnu.  Rainer also tested an earlier version on\n> sparc-sun-solaris2.11 (thanks).  Some multi-target testing is\n> still in progress.  OK to install if the remaining tests pass?\n> \n> Richard\n> \n> \n> 2017-09-01  Richard Sandiford  <richard.sandiford@linaro.org>\n> \n> gcc/\n> \tPR bootstrap/82045\n> \t* rtl.h (emit_library_call_value_1): Declare.\n> \t(emit_library_call): Replace declaration with a series of overloads.\n> \tRemove the parameter count argument.\n> \t(emit_library_call_value): Likewise.\n> \t* calls.c (emit_library_call_value_1): Make global.  Replace varargs\n> \twith an \"rtx_mode_t *\".\n> \t(emit_library_call_value): Delete.\n> \t(emit_library_call): Likewise.\n> \t* asan.c (asan_emit_stack_protection): Update calls accordingly.\n> \t(asan_emit_allocas_unpoison): Likewise.\n> \t* builtins.c (expand_builtin_powi): Likewise.\n> \t(expand_asan_emit_allocas_unpoison): Likewise.\n> \t* cfgexpand.c (expand_main_function): Likewise.\n> \t* config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.\n> \t* config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.\n> \t* config/alpha/alpha.c (alpha_trampoline_init): Likewise.\n> \t* config/arm/arm.c (arm_trampoline_init): Likewise.\n> \t(arm_call_tls_get_addr): Likewise.\n> \t(arm_expand_divmod_libfunc): Likewise.\n> \t* config/bfin/bfin.md (umulsi3_highpart): Likewise.\n> \t(smulsi3_highpart): Likewise.\n> \t* config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.\n> \t(c6x_expand_compare): Likewise.\n> \t(c6x_expand_movmem): Likewise.\n> \t* config/frv/frv.c (frv_trampoline_init): Likewise.\n> \t* config/i386/i386.c (ix86_trampoline_init): Likewise.\n> \t(ix86_expand_divmod_libfunc): Likewise.\n> \t* config/ia64/ia64.c (ia64_expand_tls_address): Likewise.\n> \t(ia64_expand_compare): Likewise.\n> \t(ia64_profile_hook): Likewise.\n> \t* config/ia64/ia64.md (save_stack_nonlocal): Likewise.\n> \t(nonlocal_goto): Likewise.\n> \t(restore_stack_nonlocal): Likewise.\n> \t* config/m32r/m32r.c (block_move_call): Likewise.\n> \t(m32r_trampoline_init): Likewise.\n> \t* config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.\n> \t* config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.\n> \t(m68k_call_m68k_read_tp): Likewise.\n> \t* config/microblaze/microblaze.c (microblaze_call_tls_get_addr)\n> \t(microblaze_expand_divide): Likewise.\n> \t* config/mips/mips.h (mips_args): Likewise.\n> \t* config/mips/sdemtk.h (mips_sync_icache): Likewise.\n> \t(MIPS_ICACHE_SYNC): Likewise.\n> \t* config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.\n> \t(nios2_trampoline_init): Likewise.\n> \t* config/pa/pa.c (hppa_tls_call): Likewise.\n> \t(pa_trampoline_init): Likewise.\n> \t* config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.\n> \t* config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)\n> \t(expand_strn_compare): Likewise.\n> \t(rs6000_generate_compare): Likewise.\n> \t(rs6000_expand_float128_convert): Likewise.\n> \t(output_profile_hook): Likewise.\n> \t(rs6000_trampoline_init): Likewise.\n> \t* config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.\n> \t* config/riscv/riscv.h (PROFILE_HOOK): Likewise.\n> \t* config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.\n> \t* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.\n> \t(rs6000_generate_compare): Likewise.\n> \t(rs6000_expand_float128_convert): Likewise.\n> \t(output_profile_hook): Likewise.\n> \t(rs6000_trampoline_init): Likewise.\n> \t* config/rs6000/rs6000.md (neg<mode>2): Likewise.\n> \t* config/sh/sh.c (sh_trampoline_init): Likewise.\n> \t* config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.\n> \t(sparc_emit_float_lib_cmp): Likewise.\n> \t(sparc32_initialize_trampoline): Likewise.\n> \t(sparc64_initialize_trampoline): Likewise.\n> \t(sparc_profile_hook): Likewise.\n> \t* config/spu/spu.c (ea_load_store): Likewise.\n> \t* config/spu/spu.md (floatunssidf2): Likewise.\n> \t* config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.\n> \t* config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.\n> \t* config/visium/visium.c (expand_block_move_4): Likewise.\n> \t(expand_block_move_2): Likewise.\n> \t(expand_block_move_1): Likewise.\n> \t(expand_block_set_4): Likewise.\n> \t(expand_block_set_2): Likewise.\n> \t(expand_block_set_1): Likewise.\n> \t(visium_trampoline_init): Likewise.\n> \t(visium_profile_hook): Likewise.\n> \t* config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.\n> \t(xtensa_setup_frame_addresses): Likewise.\n> \t(xtensa_trampoline_init): Likewise.\n> \t* except.c (sjlj_emit_function_enter): Likewise.\n> \t(sjlj_emit_function_exit): Likewise.\n> \t* explow.c (allocate_dynamic_stack_space): Likewise.\n> \t(probe_stack_range): Likewise.\n> \t* expr.c (convert_mode_scalar): Likewise.\n> \t* optabs.c (expand_binop): Likewise.\n> \t(expand_twoval_binop_libfunc): Likewise.\n> \t(expand_unop): Likewise.\n> \t(prepare_cmp_insn): Likewise.\n> \t(prepare_float_lib_cmp): Likewise.\n> \t(expand_float): Likewise.\n> \t(expand_fix): Likewise.\n> \t(expand_fixed_convert): Likewise.\n> \t(maybe_emit_sync_lock_test_and_set): Likewise.\n> \t(expand_atomic_compare_and_swap): Likewise.\n> \t(expand_mem_thread_fence): Likewise.\n> \t(expand_atomic_fetch_op): Likewise.\nOK.\njeff","headers":{"Return-Path":"<gcc-patches-return-461369-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461369-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"IF/3BQ+b\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=law@redhat.com"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xlyG00SzLz9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  4 Sep 2017 14:55:18 +1000 (AEST)","(qmail 55631 invoked by alias); 4 Sep 2017 04:54:42 -0000","(qmail 55502 invoked by uid 89); 4 Sep 2017 04:54:21 -0000","from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tMon, 04 Sep 2017 04:54:14 +0000","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.14])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 83411C0587D7;\n\tMon,  4 Sep 2017 04:54:11 +0000 (UTC)","from localhost.localdomain (ovpn-112-3.rdu2.redhat.com\n\t[10.10.112.3])\tby smtp.corp.redhat.com (Postfix) with ESMTP\n\tid 900BB757A9; Mon,  4 Sep 2017 04:54:10 +0000 (UTC)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type:content-transfer-encoding; q=dns; s=\n\tdefault; b=hHNF01WHeCtS12cYvTT2GiqmXiYaRWMGDQRJhzMvwOv6FPBnhiFdq\n\tjNxkAFeAHdFOoxVTuFmzxRwJ99XPqxVuvSCqPGQBfdBX3fuW4ZtsyZxk6mZaZAlJ\n\t8P5GKHqb6XKCtduaSE+E9zkOPlOOPOl7cruwoSt7z8ahg9a/M3l+LI=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type:content-transfer-encoding; s=default;\n\tbh=WqRIoFhUn5HeyzR+yN23rKXU5Fc=; b=IF/3BQ+bpgTlaMYWiH4oqk2oUnad\n\tBaneOvIi9l/VKpP7X5/+WpVQPrqY2F65O792Nl1em0X1oH0TH3Lo/hATIOs75oHD\n\ts0OS6sMiYU4aq5/0ndqQKIEoFDJamc2zwCWumXOwqBPHvPHqmROg5kWQU/lFbPC7\n\txL3HL6AkCh1ToM8=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-1.9 required=5.0 tests=BAYES_00,\n\tRP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:sparc64,\n\tH*M:aa26","X-HELO":"mx1.redhat.com","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 83411C0587D7","Subject":"Re: PR82045: Avoid passing machine modes through \"...\"","To":"gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org","References":"<87efrq1q2v.fsf@linaro.org>","From":"Jeff Law <law@redhat.com>","Message-ID":"<dda92e16-aa26-f7ff-b35d-f704dde642f6@redhat.com>","Date":"Sun, 3 Sep 2017 22:54:09 -0600","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<87efrq1q2v.fsf@linaro.org>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"8bit","X-IsSubscribed":"yes"}}]