Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Daede
Opus
Commits
4c6bae50
Unverified
Commit
4c6bae50
authored
2 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
More ubsan fixes for the debug macros themselves
Reviewed by Mark Harris
parent
e05aea97
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
silk/MacroDebug.h
+9
-9
9 additions, 9 deletions
silk/MacroDebug.h
with
9 additions
and
9 deletions
silk/MacroDebug.h
+
9
−
9
View file @
4c6bae50
...
...
@@ -101,9 +101,9 @@ static OPUS_INLINE opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file
#undef silk_SUB32
#define silk_SUB32(a,b) silk_SUB32_((a), (b), __FILE__, __LINE__)
static
OPUS_INLINE
opus_int32
silk_SUB32_
(
opus_int32
a
,
opus_int32
b
,
char
*
file
,
int
line
){
opus_int
32
ret
;
opus_int
64
ret
;
ret
=
a
-
b
;
ret
=
a
-
(
opus_int64
)
b
;
if
(
ret
!=
silk_SUB_SAT32
(
a
,
b
)
)
{
fprintf
(
stderr
,
"silk_SUB32(%d, %d) in %s: line %d
\n
"
,
a
,
b
,
file
,
line
);
...
...
@@ -333,8 +333,8 @@ static OPUS_INLINE opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char
#define silk_SMLAWB(a,b,c) silk_SMLAWB_((a), (b), (c), __FILE__, __LINE__)
static
OPUS_INLINE
opus_int32
silk_SMLAWB_
(
opus_int32
a32
,
opus_int32
b32
,
opus_int32
c32
,
char
*
file
,
int
line
){
opus_int32
ret
;
ret
=
silk_ADD32
(
a32
,
silk_SMULWB
(
b32
,
c32
)
);
if
(
silk_ADD32
(
a32
,
silk_SMULWB
(
b32
,
c32
)
)
!=
silk_ADD_SAT32
(
a32
,
silk_SMULWB
(
b32
,
c32
)
)
)
ret
=
silk_ADD32
_ovflw
(
a32
,
silk_SMULWB
(
b32
,
c32
)
);
if
(
ret
!=
silk_ADD_SAT32
(
a32
,
silk_SMULWB
(
b32
,
c32
)
)
)
{
fprintf
(
stderr
,
"silk_SMLAWB(%d, %d, %d) in %s: line %d
\n
"
,
a32
,
b32
,
c32
,
file
,
line
);
#ifdef FIXED_DEBUG_ASSERT
...
...
@@ -465,7 +465,7 @@ static OPUS_INLINE opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char
if
(
fail
)
{
fprintf
(
stderr
,
"silk_SMULW
T
(%d, %d) in %s: line %d
\n
"
,
a32
,
b32
,
file
,
line
);
fprintf
(
stderr
,
"silk_SMULW
W
(%d, %d) in %s: line %d
\n
"
,
a32
,
b32
,
file
,
line
);
#ifdef FIXED_DEBUG_ASSERT
silk_assert
(
0
);
#endif
...
...
@@ -723,7 +723,7 @@ static OPUS_INLINE int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int
#define silk_ADD_LSHIFT32(a,b,c) silk_ADD_LSHIFT32_((a), (b), (c), __FILE__, __LINE__)
static
OPUS_INLINE
opus_int32
silk_ADD_LSHIFT32_
(
opus_int32
a
,
opus_int32
b
,
opus_int32
shift
,
char
*
file
,
int
line
){
opus_int32
ret
;
ret
=
a
+
(
opus_int32
)((
opus_uint32
)
b
<<
shift
);
ret
=
silk_ADD32_ovflw
(
a
,
(
opus_int32
)((
opus_uint32
)
b
<<
shift
)
)
;
if
(
(
shift
<
0
)
||
(
shift
>
31
)
||
((
opus_int64
)
ret
!=
(
opus_int64
)
a
+
(
opus_int64
)(((
opus_uint64
)
b
)
<<
shift
))
)
{
fprintf
(
stderr
,
"silk_ADD_LSHIFT32(%d, %d, %d) in %s: line %d
\n
"
,
a
,
b
,
shift
,
file
,
line
);
...
...
@@ -768,7 +768,7 @@ static OPUS_INLINE int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int
#define silk_ADD_RSHIFT32(a,b,c) silk_ADD_RSHIFT32_((a), (b), (c), __FILE__, __LINE__)
static
OPUS_INLINE
opus_int32
silk_ADD_RSHIFT32_
(
opus_int32
a
,
opus_int32
b
,
opus_int32
shift
,
char
*
file
,
int
line
){
opus_int32
ret
;
ret
=
a
+
(
b
>>
shift
);
ret
=
silk_ADD32_ovflw
(
a
,
(
b
>>
shift
)
)
;
if
(
(
shift
<
0
)
||
(
shift
>
31
)
||
((
opus_int64
)
ret
!=
(
opus_int64
)
a
+
(((
opus_int64
)
b
)
>>
shift
))
)
{
fprintf
(
stderr
,
"silk_ADD_RSHIFT32(%d, %d, %d) in %s: line %d
\n
"
,
a
,
b
,
shift
,
file
,
line
);
...
...
@@ -798,7 +798,7 @@ static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32
#define silk_SUB_LSHIFT32(a,b,c) silk_SUB_LSHIFT32_((a), (b), (c), __FILE__, __LINE__)
static
OPUS_INLINE
opus_int32
silk_SUB_LSHIFT32_
(
opus_int32
a
,
opus_int32
b
,
opus_int32
shift
,
char
*
file
,
int
line
){
opus_int32
ret
;
ret
=
a
-
(
opus_int32
)((
opus_uint32
)
b
<<
shift
);
ret
=
silk_SUB32_ovflw
(
a
,
(
opus_int32
)((
opus_uint32
)
b
<<
shift
)
)
;
if
(
(
shift
<
0
)
||
(
shift
>
31
)
||
((
opus_int64
)
ret
!=
(
opus_int64
)
a
-
(
opus_int64
)(((
opus_uint64
)
b
)
<<
shift
))
)
{
fprintf
(
stderr
,
"silk_SUB_LSHIFT32(%d, %d, %d) in %s: line %d
\n
"
,
a
,
b
,
shift
,
file
,
line
);
...
...
@@ -813,7 +813,7 @@ static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opu
#define silk_SUB_RSHIFT32(a,b,c) silk_SUB_RSHIFT32_((a), (b), (c), __FILE__, __LINE__)
static
OPUS_INLINE
opus_int32
silk_SUB_RSHIFT32_
(
opus_int32
a
,
opus_int32
b
,
opus_int32
shift
,
char
*
file
,
int
line
){
opus_int32
ret
;
ret
=
a
-
(
b
>>
shift
);
ret
=
silk_SUB32_ovflw
(
a
,
(
b
>>
shift
)
)
;
if
(
(
shift
<
0
)
||
(
shift
>
31
)
||
((
opus_int64
)
ret
!=
(
opus_int64
)
a
-
(((
opus_int64
)
b
)
>>
shift
))
)
{
fprintf
(
stderr
,
"silk_SUB_RSHIFT32(%d, %d, %d) in %s: line %d
\n
"
,
a
,
b
,
shift
,
file
,
line
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment