qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 08/17] x86: fix coding style in helper_template.h
Date: Thu, 21 Jun 2012 20:54:05 +0000	[thread overview]
Message-ID: <1669f9a84d4b9a0ca966115bf6aedac3d905b50f.1340311897.git.blauwirbel@gmail.com> (raw)
In-Reply-To: <cover.1340311897.git.blauwirbel@gmail.com>
In-Reply-To: <cover.1340311897.git.blauwirbel@gmail.com>

Fix coding style in helper_template.h before next commit.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 target-i386/helper_template.h |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/target-i386/helper_template.h b/target-i386/helper_template.h
index afc41fb..8b2d4f0 100644
--- a/target-i386/helper_template.h
+++ b/target-i386/helper_template.h
@@ -16,6 +16,7 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #define DATA_BITS (1 << (3 + SHIFT))
 #define SHIFT_MASK (DATA_BITS - 1)
 #define SIGN_MASK (((target_ulong)1) << (DATA_BITS - 1))
@@ -55,6 +56,7 @@ static int glue(compute_all_add, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
     target_long src1, src2;
+
     src1 = CC_SRC;
     src2 = CC_DST - CC_SRC;
     cf = (DATA_TYPE)CC_DST < (DATA_TYPE)src1;
@@ -70,6 +72,7 @@ static int glue(compute_c_add, SUFFIX)(void)
 {
     int cf;
     target_long src1;
+
     src1 = CC_SRC;
     cf = (DATA_TYPE)CC_DST < (DATA_TYPE)src1;
     return cf;
@@ -79,6 +82,7 @@ static int glue(compute_all_adc, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
     target_long src1, src2;
+
     src1 = CC_SRC;
     src2 = CC_DST - CC_SRC - 1;
     cf = (DATA_TYPE)CC_DST <= (DATA_TYPE)src1;
@@ -94,6 +98,7 @@ static int glue(compute_c_adc, SUFFIX)(void)
 {
     int cf;
     target_long src1;
+
     src1 = CC_SRC;
     cf = (DATA_TYPE)CC_DST <= (DATA_TYPE)src1;
     return cf;
@@ -103,6 +108,7 @@ static int glue(compute_all_sub, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
     target_long src1, src2;
+
     src1 = CC_DST + CC_SRC;
     src2 = CC_SRC;
     cf = (DATA_TYPE)src1 < (DATA_TYPE)src2;
@@ -118,6 +124,7 @@ static int glue(compute_c_sub, SUFFIX)(void)
 {
     int cf;
     target_long src1, src2;
+
     src1 = CC_DST + CC_SRC;
     src2 = CC_SRC;
     cf = (DATA_TYPE)src1 < (DATA_TYPE)src2;
@@ -128,6 +135,7 @@ static int glue(compute_all_sbb, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
     target_long src1, src2;
+
     src1 = CC_DST + CC_SRC + 1;
     src2 = CC_SRC;
     cf = (DATA_TYPE)src1 <= (DATA_TYPE)src2;
@@ -143,6 +151,7 @@ static int glue(compute_c_sbb, SUFFIX)(void)
 {
     int cf;
     target_long src1, src2;
+
     src1 = CC_DST + CC_SRC + 1;
     src2 = CC_SRC;
     cf = (DATA_TYPE)src1 <= (DATA_TYPE)src2;
@@ -152,6 +161,7 @@ static int glue(compute_c_sbb, SUFFIX)(void)
 static int glue(compute_all_logic, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
+
     cf = 0;
     pf = parity_table[(uint8_t)CC_DST];
     af = 0;
@@ -170,6 +180,7 @@ static int glue(compute_all_inc, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
     target_long src1, src2;
+
     src1 = CC_DST - 1;
     src2 = 1;
     cf = CC_SRC;
@@ -192,6 +203,7 @@ static int glue(compute_all_dec, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
     target_long src1, src2;
+
     src1 = CC_DST + 1;
     src2 = 1;
     cf = CC_SRC;
@@ -206,6 +218,7 @@ static int glue(compute_all_dec, SUFFIX)(void)
 static int glue(compute_all_shl, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
+
     cf = (CC_SRC >> (DATA_BITS - 1)) & CC_C;
     pf = parity_table[(uint8_t)CC_DST];
     af = 0; /* undefined */
@@ -231,6 +244,7 @@ static int glue(compute_c_sar, SUFFIX)(void)
 static int glue(compute_all_sar, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
+
     cf = CC_SRC & 1;
     pf = parity_table[(uint8_t)CC_DST];
     af = 0; /* undefined */
@@ -245,6 +259,7 @@ static int glue(compute_all_sar, SUFFIX)(void)
 static int glue(compute_c_mul, SUFFIX)(void)
 {
     int cf;
+
     cf = (CC_SRC != 0);
     return cf;
 }
@@ -255,6 +270,7 @@ static int glue(compute_c_mul, SUFFIX)(void)
 static int glue(compute_all_mul, SUFFIX)(void)
 {
     int cf, pf, af, zf, sf, of;
+
     cf = (CC_SRC != 0);
     pf = parity_table[(uint8_t)CC_DST];
     af = 0; /* undefined */
@@ -283,8 +299,9 @@ target_ulong glue(helper_rcl, SUFFIX)(target_ulong t0, target_ulong t1)
         t0 &= DATA_MASK;
         src = t0;
         res = (t0 << count) | ((target_ulong)(eflags & CC_C) << (count - 1));
-        if (count > 1)
+        if (count > 1) {
             res |= t0 >> (DATA_BITS + 1 - count);
+        }
         t0 = res;
         env->cc_tmp = (eflags & ~(CC_C | CC_O)) |
             (lshift(src ^ t0, 11 - (DATA_BITS - 1)) & CC_O) |
@@ -311,9 +328,11 @@ target_ulong glue(helper_rcr, SUFFIX)(target_ulong t0, target_ulong t1)
         eflags = helper_cc_compute_all(CC_OP);
         t0 &= DATA_MASK;
         src = t0;
-        res = (t0 >> count) | ((target_ulong)(eflags & CC_C) << (DATA_BITS - count));
-        if (count > 1)
+        res = (t0 >> count) |
+            ((target_ulong)(eflags & CC_C) << (DATA_BITS - count));
+        if (count > 1) {
             res |= t0 << (DATA_BITS + 1 - count);
+        }
         t0 = res;
         env->cc_tmp = (eflags & ~(CC_C | CC_O)) |
             (lshift(src ^ t0, 11 - (DATA_BITS - 1)) & CC_O) |
-- 
1.7.2.5

  parent reply	other threads:[~2012-06-21 20:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 20:53 [Qemu-devel] [PATCH v4 00/17] x86 AREG0 conversion Blue Swirl
2012-06-21 20:53 ` [Qemu-devel] [PATCH 01/17] x86: prepare op_helper.c for splitting Blue Swirl
2012-06-21 20:53 ` [Qemu-devel] [PATCH 02/17] x86: avoid AREG0 for exceptions Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 03/17] x86: split off exception handlers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 04/17] x86: avoid an extern declaration Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 05/17] x86: fix coding style in ops_sse.h Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 06/17] x86: split off FPU helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 07/17] x86: improve SSE table type safety Blue Swirl
2012-07-02  8:53   ` Markus Armbruster
2012-07-03 19:00     ` Blue Swirl
2012-06-21 20:54 ` Blue Swirl [this message]
2012-06-21 20:54 ` [Qemu-devel] [PATCH 09/17] x86: split condition code and shift templates Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 10/17] x86: prepare eflags helpers for general use Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 11/17] x86: split off condition code helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 12/17] x86: split off integer helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 13/17] x86: split off SVM helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 14/17] x86: split off SMM helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 15/17] x86: split off misc helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 16/17] x86: split off memory access helpers Blue Swirl
2012-06-21 20:54 ` [Qemu-devel] [PATCH 17/17] x86: rename op_helper.c to seg_helper.c Blue Swirl

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=1669f9a84d4b9a0ca966115bf6aedac3d905b50f.1340311897.git.blauwirbel@gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).