public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107731] loongarch Operand Modifiers are not documented
Date: Thu, 17 Nov 2022 07:44:16 +0000	[thread overview]
Message-ID: <bug-107731-4-iMEjTVWtLX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107731-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #2)
> Interestingly it "worked" with GCC 12.2...

I don't see how it could work though.
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4499)     default:
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4500)       switch (code)
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4501)        {
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4502)        case REG:
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4503)          {
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4504)            unsigned
int regno = REGNO (op);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4505)            if (letter
&& letter != 'z')
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4506)             
output_operand_lossage ("invalid use of '%%%c'", letter);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4507)            fprintf
(file, "%s", reg_names[regno]);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4508)          }
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4509)          break;
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4510)
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4511)        case MEM:
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4512)          if (letter ==
'D')
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4513)           
output_address (GET_MODE (op),
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4514)                       
    plus_constant (Pmode, XEXP (op, 0), 4));
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4515)          else if
(letter == 'b')
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4516)            {
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4517)             
gcc_assert (REG_P (XEXP (op, 0)));
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4518)             
loongarch_print_operand (file, XEXP (op, 0), 0);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4519)            }
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4520)          else if
(letter && letter != 'z')
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4521)           
output_operand_lossage ("invalid use of '%%%c'", letter);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4522)          else
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4523)           
output_address (GET_MODE (op), XEXP (op, 0));
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4524)          break;
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4525)
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4526)        default:
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4527)          if (letter ==
'z' && op == CONST0_RTX (GET_MODE (op)))
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4528)            fputs
(reg_names[GP_REG_FIRST], file);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4529)          else if
(letter && letter != 'z')
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4530)           
output_operand_lossage ("invalid use of '%%%c'", letter);
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4531)          else
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4532)           
output_addr_const (file, loongarch_strip_unspec_address (op));
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4533)          break;
62ec3b5352b3 (chenglulu  2021-11-27 14:58:21 +0800 4534)        }

  parent reply	other threads:[~2022-11-17  7:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  6:45 [Bug target/107731] New: error: invalid 'asm': invalid use of '%c' chenglulu at loongson dot cn
2022-11-17  7:38 ` [Bug target/107731] loongarch Operand Modifiers are not documented pinskia at gcc dot gnu.org
2022-11-17  7:40 ` xry111 at gcc dot gnu.org
2022-11-17  7:41 ` pinskia at gcc dot gnu.org
2022-11-17  7:44 ` pinskia at gcc dot gnu.org [this message]
2022-11-17  7:47 ` xry111 at gcc dot gnu.org
2022-11-17  7:50 ` chenglulu at loongson dot cn
2022-11-17  7:54 ` chenglulu at loongson dot cn
2023-01-24  4:56 ` cvs-commit at gcc dot gnu.org
2023-01-24  5:00 ` chenglulu at loongson dot cn

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-107731-4-iMEjTVWtLX@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).