[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A20 delay
- Date: 16 Dec 1999 00:02:32 -0500
- From: ian at zembu.com (Ian Lance Taylor)
- Subject: A20 delay
Date: Wed, 15 Dec 1999 23:40:01 -0500 (EST)
From: Quality Quorum <qqi at world.std.com>
> BTW, gas still does not like 'jnz $1b' .
>
> I'd be happy to look at a test case.
Apply patch, replace `more:' with `1:' and `jnz more' with `jnz $1b'
First, I made a mistake talking about $1b. Temporary dollar labels
use a trailing '$'. The expression $1b refers to the label 1b as an
immediate value.
It helps a lot to talk about a specific test case. You gave me
instructions, but I might be starting from the wrong file, or I might
follow the instructions incorrectly, or I might misinterpret the
result.
So, to be precise:
This test case:
movl $0x200, %eax
1: dec %eax
jnz $1b
ret
fails, as I expect it to. jnz does not take an immediate operand. I
get this error message:
/home/ian/foo.s:3: Error: suffix or operands invalid for `jnz'
This test case:
movl $0x200, eax
1: decl eax
jnz 1b
ret
appears to succeed.
> Note that gas supports two different conventions for local variables:
> the dollar sign convention and the numeric f/b convention. If you are
> literally using `jnz $1b' then you are mixing them, which won't work.
I am really puzzled, because there a few places in pc386 where various
forms of
jz $1f
1:
are both assembled without a hitch and seems working ok.
Again, a specific test case helps. I could not find any code in pc386
matching your description. It may be there even though I was unable
to find it.
I did find this case:
ljmpl $0x08, $1f
1:
This is not a branch instruction. In gas syntax, the two operand ljmp
instruction takes an immediate operand. $1f is an immediate operand
referring to the label 1f.
To see this, this test case fails:
ljmpl $0x08, foo
foo:
while this test case succeeds:
ljmpl $0x08, $foo
foo:
If you really have a test case which uses
jz $1f
1:
and which succeeds, please send it to me.
Ian
- Follow-Ups:
- A20 delay
- From: qqi at world.std.com (Quality Quorum)
- References:
- A20 delay
- From: qqi at world.std.com (Quality Quorum)