Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2004 16:53:59 +0200 (CEST)
From:      marcov@stack.nl (Marco van de Voort)
To:        freebsd-amd64@freebsd.org
Subject:   Re: ABI question, porting ports to amd64
Message-ID:  <20040517145359.6CE759A@toad.stack.nl>
In-Reply-To: <200405161607.20644.peter@wemm.org> "from Peter Wemm at May 16, 2004 04:07:20 pm"

index | next in thread | previous in thread | raw e-mail

> > > Or, we'd declare the syscall prototypes with an explicit override
> > > of the register parameter assignments or something.  (bad luck
> > > though if you neglect to use the right #includes for your code and
> > > miss out a prototype)
> >
> > I was always curious why the (basic) *nix syscalls weren't inlined?
> > Can't gcc do that?
> 
> The errno handling is the sticky point.  Error return is indicated by 
> the 'carry' bit set in the flags register.  At which point the return 
> value of the syscall is copied to the 'errno' variable and the function 
> returns -1. 

Hmm, but the x86-64 can surely branch further than the size of procedure?

int bla()
{
 ...
...
  syscall
  jb .bla_cerror
 ..
..
}

.bla_cerror: jmp .cerror 


?





home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040517145359.6CE759A>