From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 0413C3858C62 for ; Thu, 23 May 2024 19:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0413C3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0413C3858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716493085; cv=none; b=Pr4htYfdrjp9IbHRGaSRZlOqlnBjKroppxY4CIeMOR0zO7Ndw2H8G+/k2ZQOn1posUrskWmSXc4WS9sqTBld2DfoPY9vLPYinZ+6WfQ8g7EQFakBEHquxWZUS+tXTesWLR6POrFN2t9uj2rGNehV7gy7UBPiemGe4yKwTm7C0c8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716493085; c=relaxed/simple; bh=qiblvZtXNyRcKmph2qXGOx2MKVDVprXre69BFV+kB7k=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=C2M3psgZqDG6D992pNqzC/iH2rM1Yr2CahZoKgJVG9UCcLFIEjpu6T0jpANWfaOvTETYuI3idjBLHOpytK3dBEj29GdCMN6zsTqyXs4cBBZ5DWPzgSrmWBOMto236p2dgDHjpAEsafrvObmwcySg3MCJgP0cuvTTG0eUglMhbKE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2e8a8ff4083so22900561fa.1 for ; Thu, 23 May 2024 12:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716493081; x=1717097881; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rReDSuqzULORyvBFN9ednNpc1TnVYRsQXy8w4deZMf8=; b=YVCA+2GMsqcW1SJEQEwS19r/1BcpHED80wZbzist07Hqz4sHQ0RI/1zwcOfSVS0hQr v8Kgp3FEg4jKDCicaVJInSBbGHccU4ihOCQttbfGOu+kBMOEkctdKm1MWJUoEe8Zqi+/ /aOyPemdwTzx6AfMgWzYXWV5AqjAyhQI/RL1e3GrA/OoCBpx6IeU9LxHk8paoyFtWDQ1 3KSqDng8MqSvkT+2T5YvQUY5xnoKmDTamS93BEdwOjHWCeaiR/LpmK+QgYOGmFR5hXt0 GRQtAP2EhvqqunSECSmzn3y/K9kMEx3yrrolgUjkXcP6vyFQmDdLDPMrDjw2oRXJSs+r cRPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716493081; x=1717097881; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rReDSuqzULORyvBFN9ednNpc1TnVYRsQXy8w4deZMf8=; b=bU8m4j5D/K+834FjvmS3Yi9YOy/1nS2DvAUJsg9TOzmARAvEtwqHALf8i44SCrYwRF W3b784TVYwux0pWuXCG3hm6Ov1+S57J8x8tZuNlAi59xIbx7Hsg+77CcWCQRnJAJdqP/ cg6BfGx+FfqKJ31GjNIScINgDgC/DriOhtdN7rU+h2NZ8yceb4rjV//GCEbXUkrGtKpc /5tz/vOdwI6UkTlKVN7oxvAvrnKO57NM7u3vYRdC/3AuDHWLqwuVE98Uuhd7m0cZzL20 TaPAAx58dzKs1GCJkQYIw8usePFzoPvaw8Tplbd0ElXPCikrLn8f05/CU0uOxMz4A/eo o7LQ== X-Forwarded-Encrypted: i=1; AJvYcCVmbU/AkAF8hzVNqY+BQmZXIi0z5Fz4EcjTRpLT61WCMJSCnmgNncXILEIwfGnexXoAWUw83Qn/eLVQ1d+bPC50VoDhq7E5eA== X-Gm-Message-State: AOJu0Yy5UtxKOpEOHNvKm5xlEmbp3gbi7B28ceoVVAspFsoZiaAq3td+ c5VI5kru42/OwQlhbT3C9FTG9h7WBR8d2o8NPBHD4/u12wQkOZqzs1uJytvI757+QXS50R4aDMM TC/+1tFAgcg1ZU8VyOKCe82G4oj5EwRUFCsQ= X-Google-Smtp-Source: AGHT+IHi2umeUTdOaMSelwvohUSAysvCO5H08jpPC+WgfKNuw6gMbuunn53mTvmRKLLQCYre+yrIVF4h7mbU0R6Nczo= X-Received: by 2002:a2e:a3d2:0:b0:2d4:535a:e7a with SMTP id 38308e7fff4ca-2e95a1058e2mr1004011fa.24.1716493081046; Thu, 23 May 2024 12:38:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Uros Bizjak Date: Thu, 23 May 2024 21:37:49 +0200 Message-ID: Subject: Re: [PATCH v1 2/6] Extract ix86 dllimport implementation to mingw To: Evgeny Karpov Cc: "hubicka@ucw.cz" , Richard Sandiford , "gcc-patches@gcc.gnu.org" , "Richard Earnshaw (lists)" , Maxim Kuvyrkov , Radek Barton Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, May 23, 2024 at 7:53=E2=80=AFPM Evgeny Karpov wrote: > > > Thursday, May 23, 2024 10:35 AM > Uros Bizjak wrote: > > > Richard Sandiford wrote: > > > > > > > This looks good to me apart from a couple of very minor comments > > > > below, but please get approval from the x86 maintainers as well. I= n > > > > particular, they might prefer to handle ix86_legitimize_pe_coff_sym= bol in > > some other way. > > > > > > Jan and Uros, could you please review x86 refactoring for mingw part? > > > > Yes, perhaps legitimize_pe_coff_symbol should be handled similar to how > > machopic_legitimize_pic_address is handled.and just use "#if TARGET_PEC= OFF" > > at call sites when calling functions from the new winnt-dll.h. This wou= ld also > > allow us to remove the early check for !TARGET_PECOFF in > > legitimize_pe_coff_symbol. > > > > Uros. > > > The function legitimize_pe_coff_symbol is now part of mingw and will not = be used for linux targets. > This is why ix86_legitimize_pe_coff_symbol has been introduced, to be ava= ilable for all platforms. There is no need for a ix86_legitimize_pe_coff_symbol. This function is now defined in a header that is not included by default, so the call sites should use #if TARGET_PECOFF to isolate its use. Please see how "#if TARGET_MACHO" is used in config/i386/* files for the similar issue. I think that TARGET_PECOFF should follow this example. Uros.