public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Cui, Lili" <lili.cui@intel.com>
To: binutils@sourceware.org
Cc: hongjiu.lu@intel.com, jbeulich@suse.com
Subject: [PATCH] x86: Fix indentation and use true/false instead of 1/0
Date: Thu, 11 Jan 2024 09:22:06 +0000	[thread overview]
Message-ID: <20240111092206.4134322-1-lili.cui@intel.com> (raw)

   This patch is to Fix indentation and use true/false instead of 1/0.

Regards,
Lili.

gas/ChangeLog:

        * config/tc-i386.c (establish_rex): Fix indentation.
        (check_EgprOperands): Use true/false instead of 1/0.
---
 gas/config/tc-i386.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index d599306b12c..856edbe557c 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4300,7 +4300,7 @@ static void establish_rex (void)
 	}
     }
 
-   if (i.rex == 0 && i.rex2 == 0 && (i.rex_encoding || i.rex2_encoding))
+  if (i.rex == 0 && i.rex2 == 0 && (i.rex_encoding || i.rex2_encoding))
     {
       /* Check if we can add a REX_OPCODE byte.  Look for 8 bit operand
 	 that uses legacy register.  If it is "hi" register, don't add
@@ -4323,14 +4323,14 @@ static void establish_rex (void)
 	i.rex = REX_OPCODE;
     }
 
-   if (is_apx_rex2_encoding ())
-     {
-       build_rex2_prefix ();
-       /* The individual REX.RXBW bits got consumed.  */
-       i.rex &= REX_OPCODE;
-     }
-   else if (i.rex != 0)
-     add_prefix (REX_OPCODE | i.rex);
+  if (is_apx_rex2_encoding ())
+    {
+      build_rex2_prefix ();
+      /* The individual REX.RXBW bits got consumed.  */
+      i.rex &= REX_OPCODE;
+    }
+  else if (i.rex != 0)
+    add_prefix (REX_OPCODE | i.rex);
 }
 
 static void
@@ -7197,7 +7197,7 @@ static bool
 check_EgprOperands (const insn_template *t)
 {
   if (!t->opcode_modifier.noegpr)
-    return 0;
+    return false;
 
   for (unsigned int op = 0; op < i.operands; op++)
     {
@@ -7207,7 +7207,7 @@ check_EgprOperands (const insn_template *t)
       if (i.op[op].regs->reg_flags & RegRex2)
 	{
 	  i.error = register_type_mismatch;
-	  return 1;
+	  return true;
 	}
     }
 
@@ -7215,17 +7215,17 @@ check_EgprOperands (const insn_template *t)
       || (i.base_reg && (i.base_reg->reg_flags & RegRex2)))
     {
       i.error = unsupported_EGPR_for_addressing;
-      return 1;
+      return true;
     }
 
   /* Check if pseudo prefix {rex2} is valid.  */
   if (i.rex2_encoding)
     {
       i.error = invalid_pseudo_prefix;
-      return 1;
+      return true;
     }
 
-  return 0;
+  return false;
 }
 
 /* Check if APX operands are valid for the instruction.  */
-- 
2.25.1


             reply	other threads:[~2024-01-11  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  9:22 Cui, Lili [this message]
2024-01-11  9:56 ` Jan Beulich

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=20240111092206.4134322-1-lili.cui@intel.com \
    --to=lili.cui@intel.com \
    --cc=binutils@sourceware.org \
    --cc=hongjiu.lu@intel.com \
    --cc=jbeulich@suse.com \
    /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).