public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ibuclaw at gdcproject dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/96347] note: non-delegitimized UNSPEC UNSPEC_TP (19) found in variable location
Date: Tue, 28 Jul 2020 14:55:36 +0000	[thread overview]
Message-ID: <bug-96347-4-BXkC0XgsM7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96347-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96347

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Created attachment 48946
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48946&action=edit
disallow tpoff+offset from being stored in a temp

Patch prevents the forced temp from being used to replace the rhs of the
original PLUS expr at memory_address_addr_space (explow.c:434), so the excess
errors are gone.

Alters the resultant assembly in the following way:
---
@@ -35,15 +35,11 @@ _Z5chain6Darray:
 main:
 .LFB4:
        .cfi_startproc
-       pushq   %rbp
-       .cfi_def_cfa_offset 16
-       .cfi_offset 6, -16
-       leaq    8+testYearsBC@tpoff, %rbp
        pushq   %rbx
-       .cfi_def_cfa_offset 24
-       .cfi_offset 3, -24
-       subq    $40, %rsp
-       .cfi_def_cfa_offset 64
+       .cfi_def_cfa_offset 16
+       .cfi_offset 3, -16
+       subq    $32, %rsp
+       .cfi_def_cfa_offset 48
        leaq    17(%rsp), %rbx
        jmp     .L6
        .p2align 4,,10
@@ -56,11 +52,11 @@ main:
        movl    $0, (%rbx)
        movw    %ax, 4(%rbx)
        movb    $0, 6(%rbx)
-       movq    %fs:0(%rbp), %rdx
        movq    %fs:testYearsBC@tpoff, %rax
+       movq    %fs:8+testYearsBC@tpoff, %rdx
        movb    $0, 16(%rsp)
-       movq    %rdx, 8(%rsp)
        movq    %rax, (%rsp)
+       movq    %rdx, 8(%rsp)
        testq   %rax, %rax
        je      .L7
        jmp     .L9
@@ -71,9 +67,8 @@ main:
 main.cold:
 .LFSB4:
 .L7:
-       .cfi_def_cfa_offset 64
-       .cfi_offset 3, -24
-       .cfi_offset 6, -16
+       .cfi_def_cfa_offset 48
+       .cfi_offset 3, -16
        call    abort@PLT
        .cfi_endproc
 .LFE4:

  parent reply	other threads:[~2020-07-28 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 22:19 [Bug target/96347] New: " ibuclaw at gdcproject dot org
2020-07-27 22:22 ` [Bug target/96347] " ibuclaw at gdcproject dot org
2020-07-28 13:06 ` ibuclaw at gdcproject dot org
2020-07-28 14:55 ` ibuclaw at gdcproject dot org [this message]
2020-07-29 18:12 ` ibuclaw at gdcproject dot org
2020-08-06 12:02 ` ibuclaw at gdcproject dot org
2023-10-18 18:59 ` ibuclaw at gdcproject dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-96347-4-BXkC0XgsM7@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).