Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
584aa9d7
...
584aa9d7a066294d58071e57e91dd1cb37d87b7c
authored
2003-07-26 11:21:30 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(instr_nop): New function
(instr_allof, instr_anyof): Removed
1 parent
beea043b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
48 deletions
libsieve/runtime.c
libsieve/runtime.c
View file @
584aa9d
...
...
@@ -31,6 +31,14 @@
&& (m)->debug_printer)
#define INSTR_DISASS(m) ((m)->debug_level & MU_SIEVE_DEBUG_DISAS)
void
instr_nop
(
sieve_machine_t
mach
)
{
if
(
INSTR_DEBUG
(
mach
))
sieve_debug
(
mach
,
"%4lu: NOP
\n
"
,
(
unsigned
long
)
(
mach
->
pc
-
1
));
}
static
int
instr_run
(
sieve_machine_t
mach
)
{
...
...
@@ -113,54 +121,6 @@ instr_pop (sieve_machine_t mach)
}
void
instr_allof
(
sieve_machine_t
mach
)
{
int
num
=
SIEVE_ARG
(
mach
,
0
,
number
);
int
val
=
1
;
SIEVE_ADJUST
(
mach
,
1
);
if
(
INSTR_DEBUG
(
mach
))
{
sieve_debug
(
mach
,
"%4lu: ALLOF %d
\n
"
,
(
unsigned
long
)(
mach
->
pc
-
2
),
num
);
if
(
INSTR_DISASS
(
mach
))
return
;
}
while
(
num
--
>
0
)
{
instr_pop
(
mach
);
val
&=
mach
->
reg
;
}
mach
->
reg
=
val
;
}
void
instr_anyof
(
sieve_machine_t
mach
)
{
int
num
=
SIEVE_ARG
(
mach
,
0
,
number
);
int
val
=
0
;
SIEVE_ADJUST
(
mach
,
1
);
if
(
INSTR_DEBUG
(
mach
))
{
sieve_debug
(
mach
,
"%4lu: ANYOF %d
\n
"
,
(
unsigned
long
)(
mach
->
pc
-
2
),
num
);
if
(
INSTR_DISASS
(
mach
))
return
;
}
while
(
num
--
>
0
)
{
instr_pop
(
mach
);
val
|=
mach
->
reg
;
}
mach
->
reg
=
val
;
}
void
instr_not
(
sieve_machine_t
mach
)
{
if
(
INSTR_DEBUG
(
mach
))
...
...
@@ -210,6 +170,25 @@ instr_brz (sieve_machine_t mach)
}
void
instr_brnz
(
sieve_machine_t
mach
)
{
long
num
=
SIEVE_ARG
(
mach
,
0
,
number
);
SIEVE_ADJUST
(
mach
,
1
);
if
(
INSTR_DEBUG
(
mach
))
{
sieve_debug
(
mach
,
"%4lu: BRNZ %lu
\n
"
,
(
unsigned
long
)(
mach
->
pc
-
2
),
(
unsigned
long
)(
mach
->
pc
+
num
));
if
(
INSTR_DISASS
(
mach
))
return
;
}
if
(
mach
->
reg
)
mach
->
pc
+=
num
;
}
void
sieve_abort
(
sieve_machine_t
mach
)
{
longjmp
(
mach
->
errbuf
,
1
);
...
...
Please
register
or
sign in
to post a comment