#include <stdio.h>
#include <assert.h>
#include "private.h"
#include "gsm.h"
#include "proto.h"
Go to the source code of this file.
|
word gsm_abs | P1 ((a), word a) |
|
word gsm_norm | P1 ((a), longword a) |
|
word gsm_add | P2 ((a, b), word a, word b) |
|
longword gsm_L_add | P2 ((a, b), longword a, longword b) |
|
longword gsm_L_asl | P2 ((a, n), longword a, int n) |
|
word gsm_asl | P2 ((a, n), word a, int n) |
|
word gsm_div | P2 ((num, denum), word num, word denum) |
|
|
static unsigned char const | bitoff [256] |
|
◆ saturate
Definition at line 20 of file add.c.
Referenced by P2().
◆ P1() [1/2]
◆ P1() [2/2]
Definition at line 117 of file add.c.
References a.
140 if (
a <= -1073741824)
return 0;
144 return a & 0xffff0000
146 ? -1 +
bitoff[ 0xFF & (
a >> 24) ]
147 : 7 +
bitoff[ 0xFF & (
a >> 16) ] )
149 ? 15 +
bitoff[ 0xFF & (
a >> 8) ]
static unsigned char const bitoff[256]
◆ P2() [1/5]
◆ P2() [2/5]
◆ P2() [3/5]
Definition at line 153 of file add.c.
155 if (n >= 32)
return 0;
156 if (n <= -32)
return -(
a < 0);
157 if (n < 0)
return gsm_L_asr(
a, -n);
◆ P2() [4/5]
Definition at line 161 of file add.c.
References P2().
163 if (n >= 16)
return 0;
164 if (n <= -16)
return -(
a < 0);
165 if (n < 0)
return gsm_asr(
a, -n);
◆ P2() [5/5]
Definition at line 206 of file add.c.
220 assert(num >= 0 && denum >= num);
228 if (L_num >= L_denum) {
◆ bitoff
unsigned char const bitoff[256] |
|
static |
Definition at line 98 of file add.c.