Norbert Koch wrote:
So
how can I fix this in assembly. I am not an expert with inlined assembly,
so
maybe someone can correct me if I am wrong, but something like this needs
to
be added:
or %ecx, %ecx
jz 2
2:
This is wrong beacause the result is stored in ecx. Better using
JECXZ instruction
b
>No, it's a correct method to set/reset the zero flag:
>(X | X) == X just as (X & X) == X
>
Yes but it stores result in ecx(using or, really, is not a problem)... however
jecxz just is 2 bytes sized while or + jmp is 4 bytes. It means lesser FDE
latency time and the pseudocode is enough simil
On Monday 13 June 2005 18:27, Joerg Sonnenberger wrote:
> On Mon, Jun 13, 2005 at 05:58:24PM +0200, Hans Petter Selasky wrote:
> > static void
> > filter(struct fifo *f)
> > {
> > do {
> > if(!f->len)
> > {
> > if(f->m) ...;
> >
> > f->m = get_mbuf();
> > if(!
On Mon, Jun 13, 2005 at 05:58:24PM +0200, Hans Petter Selasky wrote:
> static void
> filter(struct fifo *f)
> {
> do {
> if(!f->len)
> {
> if(f->m) ...;
>
> f->m = get_mbuf();
> if(!f->m) break;
>
> f->len = m->m_len;
> f->ptr = m->m_data;
On Monday 13 June 2005 14:44, Joerg Sonnenberger wrote:
> On Mon, Jun 13, 2005 at 02:12:38PM +0200, Hans Petter Selasky wrote:
> > This is equivalent to:
> >
> > while(--count)
> > {
> > /* I/O */
> > }
> >
> > which is obviously wrong, because it doesn't check for count equal to
> > zero.
>
> Wh
> >So
> >how can I fix this in assembly. I am not an expert with inlined assembly,
> >so
> >maybe someone can correct me if I am wrong, but something like this needs
> >to
> >be added:
> >
> >or %ecx, %ecx
> >jz 2
> >
> >2:
>
> This is wrong beacause the result is stored in ecx. Better using
> JECX
On Mon, Jun 13, 2005 at 02:12:38PM +0200, Hans Petter Selasky wrote:
> This is equivalent to:
>
> while(--count)
> {
> /* I/O */
> }
>
> which is obviously wrong, because it doesn't check for count equal to
> zero.
Why do you think it is a bug? It is part of the interface contract and
useful t
>http://www.freebsd.org/cgi/query-pr.cgi?pr=80980
>
>In FreeBSD 6-current the code for "bus_space_write_multi_1()" says:
>
>__asm __volatile(" \n\
>cld \n\
>1: lodsb
8 matches
Mail list logo