From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id ABDB038197E5 for ; Mon, 1 Jul 2024 08:08:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABDB038197E5 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ABDB038197E5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719821331; cv=none; b=nI75XYybrlPD0NLcDSefBB3LLL5dhbXALlac1EkDFyGCrTL0YAir2V6I3g0YdcjEvYizHLvcM5TrlMhcza83GB6W9CPBpLPR3h/PSIIK0oHrMfO2ZO2xa3CCoUBgmAbaqqzwU8/KSf2aQe34cGokKoGFjyNf1Q31Tz/7mYbMKRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719821331; c=relaxed/simple; bh=mlRwoJGH6QjsYBEFR6Ea5htC7OL9fsXepbaT5Fs1IjE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=bv2UtlYngRGMaNglMw+NwGXozICsuoP7haJHAwwRcJwAPchDtY/Kjg2Et/kC+EdZvS5ekepEEJJ0PF8KkQUTgclpWPAsK8v3qEnJj3Rm5b+J74txt9WkNGr2ZE7ubYFwJNeU+snp14szFRALziLslq1aLaviWhxAwfUzgP5DWiQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42565697036so21591845e9.1 for ; Mon, 01 Jul 2024 01:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1719821327; x=1720426127; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=xzEJyR8lthd8WqYnTLuOauZGe4aNHTKtIkv1js/Lzjc=; b=dEChbuYzqYbKzLR64qDN+OdgreMFber1W1l9ItzmaZUUwUthByNY3lwNxs7J/cuaK2 iSTzgeSWG6VoYVjaSknvQlZhsm0nLYzli7ca+BOTFMFQyaKDSZiUeDTCEsvFsScLSJVG ShPXYukEg7DPzi3UH11yXU+KR3f0NdLI9Hb/ka4KrWPMe8zW1GlryJEfa2ozNN4fGxey gKpjjmqiy6tKoNxXR9Ir1Q9tHkAXfIgsZ4kPLoT4JEFFtmeFhjmhYsNTvUUEJcSV6g7E piUB+PZsp8zN1wsJV0np4ikExVvhkIZL81iKrCu7MfM/zxpGEn3jV9yaZfgHYCUDBRU8 oqfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719821327; x=1720426127; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xzEJyR8lthd8WqYnTLuOauZGe4aNHTKtIkv1js/Lzjc=; b=nmOLHqmoNowJ5a4+Q36NO6e69+GQSYQmzTyVRRMKzbCdT2nYSAzOJiZj3BleozVHCT 5oLlLXK/gUPY79nZTaY6SlcVFxnhCcsl+z6thxxZIAvIjRVvzuZ1rnqmJsHNlVfJVnsV eVgXoro0iV2DjZ6wTnwN8lw8cSPmeroMLXT+U2gQfzBxAv8EZLhHTyZyQ6QDcZo2FNjY yC6/HfxYKC9FBcR22cgOR+BfZ+XSZ+gsNk9cwRr0ihys4Q7Ss1ZQpIKhMrqC/IU2wNUO 64mxHz9abcldn/NGCrsEfs9IVUt/nf+jp94S1jda3txPDtbd/HsXyHYYQZzZgkR+rehu zJDQ== X-Forwarded-Encrypted: i=1; AJvYcCXTHDmOhIY52d7RE3CD2nLuGEPf166sdoiSgxWptZ3DyGuwGatUbT2YWF5B5IZ05rBYurdgFVVfk6fYMlklNZRiRVELXfk2jg== X-Gm-Message-State: AOJu0YzUCqLZue5iS0r+GjFkyosfc09YHcIqPkRUZ6ZiqmkCh5lti2W3 nZvOgxd2/XSG6ijeLbHGTeAxEGN5s+FCOMY7uCLvphPdvWOTe2II61ZRKnyW6A== X-Google-Smtp-Source: AGHT+IFWX5ghWTwJyM81UnOlxcZnh4W/RelVDGuTRErtI7mQ3VD9EipJ93j2rXwpielJyAXEv+7GAw== X-Received: by 2002:a5d:47c2:0:b0:366:df35:b64f with SMTP id ffacd0b85a97d-36760a62fb7mr8854336f8f.4.1719821326836; Mon, 01 Jul 2024 01:08:46 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac1549f2esm60144905ad.164.2024.07.01.01.08.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Jul 2024 01:08:46 -0700 (PDT) Message-ID: <3aae1f88-f15e-4a75-93a3-fec448512ea2@suse.com> Date: Mon, 1 Jul 2024 10:08:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] x86-64: Relax BFD_RELOC_X86_64_GOTTPOFF check To: "Kong, Lingling" Cc: "H. J. Lu" , "binutils@sourceware.org" References: <289780a1-6b2e-4bd7-bf0d-f924d21bd700@suse.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsC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UvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3024.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 01.07.2024 09:21, Kong, Lingling wrote: >> -----Original Message----- >> From: Jan Beulich >> Sent: Monday, July 1, 2024 2:15 PM >> To: Kong, Lingling >> Cc: H. J. Lu ; binutils@sourceware.org >> Subject: Re: [PATCH v2] x86-64: Relax BFD_RELOC_X86_64_GOTTPOFF check >> >> On 01.07.2024 05:03, Kong, Lingling wrote: >>> --- a/gas/config/tc-i386.c >>> +++ b/gas/config/tc-i386.c >>> @@ -7137,8 +7137,14 @@ md_assemble (char *line) >>> && i.base_reg >>> && i.base_reg->reg_num == RegIP >>> && i.tm.operand_types[0].bitfield.class == Reg >>> - && i.tm.operand_types[2].bitfield.class == Reg) >>> - /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2. */ >>> + && (i.tm.operand_types[2].bitfield.class == Reg >>> + || i.tm.operands == 2)) >> >> As before: You allow more than what you claim in the comment below, unless I >> continue to be overlooking something: Aiui you want to exclude forms with >> memory destination. >> >>> + /* Allow APX: >>> + add %reg1, foo@gottpoff(%rip), %reg2 >>> + add foo@gottpoff(%rip), %reg, %reg2 >>> + {nf} add foo@gottpoff(%rip), %reg >>> + {nf} add %reg1, foo@gottpoff(%rip), %reg2 >>> + {nf} add foo@gottpoff(%rip), %reg, %reg2. >>> + */ >>> break; >> >> I don't think the {nf} forms need naming specially. Or if they did, I wouldn't see - >> as mentioned before - why the {evex} forms won't need/want mentioning, too. >> >> From the presentation below one can get the impression that you're altering >> indentation of the comment. It was properly indented though. >> However, your patch also pretty clearly came through with corrupted whitespace >> (no hard tabs at all), so it's not really clear what changes. > > Sorry for my corrupted whitespace, there was a problem with the format of my email, so I re-sent the attachment. This version only modified the comment part, and the rest remained unchanged. Thanks. Formatting there indeed looks okay. > For such TLS sequences, it should only generated by compiler like GCC or LLVM not handwritten assembly codes. Who or what says that hand-written assembly isn't permitted here? Who or what says that compilers will only ever emit correct sequences? See my earlier question to H.J. (which sadly has been left without actual answer) - imo this either wants making as strict as possible or as relaxed as possible. Anything in the middle is going to be entirely arbitrary, and would hence need to come with a good explanation of why exactly it is done like this. Jan