diff libgsmefr/d1035pf.c @ 187:6ad363f7ea30

libgsmefr/d1035pf.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 03 Jan 2023 03:22:04 +0000
parents d80e9f12a1d1
children
line wrap: on
line diff
--- a/libgsmefr/d1035pf.c	Tue Jan 03 03:05:38 2023 +0000
+++ b/libgsmefr/d1035pf.c	Tue Jan 03 03:22:04 2023 +0000
@@ -41,8 +41,8 @@
         i = tmp & 7;                                    logic16 (); 
         i = dgray[i];                                   move16 (); 
 
-        i = extract_l (L_shr (L_mult (i, 5), 1));
-        pos1 = add (i, j); /* position of pulse "j" */
+        i *= 5;
+        pos1 = i + j; /* position of pulse "j" */
 
         i = shr (tmp, 3) & 1;                           logic16 (); 
         if (i == 0)
@@ -60,11 +60,11 @@
 
         i = index[add (j, 5)] & 7;                      logic16 (); 
         i = dgray[i];                                   move16 (); 
-        i = extract_l (L_shr (L_mult (i, 5), 1));
+        i *= 5;
 
-        pos2 = add (i, j);      /* position of pulse "j+5" */
+        pos2 = i + j;      /* position of pulse "j+5" */
 
-        if (sub (pos2, pos1) < 0)
+        if (pos2 < pos1)
         {
             sign = negate (sign);
         }