[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-amd64
Subject:    Re: ABI question, porting ports to amd64
From:       marcov () stack ! nl (Marco van de Voort)
Date:       2004-05-17 14:53:59
Message-ID: 20040517145359.6CE759A () toad ! stack ! nl
[Download RAW message or body]

> > > 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 


?




_______________________________________________
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic