Re: 16 bit jumps in pmode linux
From: Tim Roberts (timr_at_probo.com)
Date: 05/14/04
- Previous message: John Lynn: "MIP rating of today's Pentiums?"
- In reply to: No Spam: "16 bit jumps in pmode linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 May 2004 06:20:43 +0000 (UTC)
sekibkert@yahoo.com (No Spam) wrote:
>
>I am hardcoding transition tables of a trie into p4 machine code. 95%
>of it is near jmp immediates. Since the overall size of the state
>table is less than 5k, I hoped I could use 16 bit offset jumps and
>cache a few more states. However, I think it was the gas manual that
>said that eip was masked to 16 bits when this is tried. Is that what
>I'm seeing when the following code segs?
>##########################
> .globl _start
>_start:
> .code16
> jmp Lab
> nop
>Lab:
> xorl %ebx,%ebx
> movl $1,%eax
> int $0x80
>##########################
No, the seg fault comes because you've told the assembler you are building
a 16-bit code segment, but you REALLY have a 32-bit code segment.
-- - Tim Roberts, timr@probo.com Providenza & Boekelheide, Inc.
- Previous message: John Lynn: "MIP rating of today's Pentiums?"
- In reply to: No Spam: "16 bit jumps in pmode linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]