cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/05/17:08:39

Sender: nate AT cartsys DOT com
Message-ID: <37092682.C73A3F42@cartsys.com>
Date: Mon, 05 Apr 1999 14:09:22 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: inline asm & jmp
References: <37084934 DOT 6866274 AT news3 DOT ibm DOT net> <7ea3lu$egk$1 AT news DOT luth DOT se>
Reply-To: djgpp AT delorie DOT com

Martin Str|mberg wrote:

> The extra slack is because your memchr_alias() function takes
> arguments.
> 
> Try
> asm("
> .text
> .align 2,0x90
> 
> .globl _memchr_alias
> _memchr_alias:
> 
> jmp _memchr
> 
> ");
> 
> but note that my version of memchr_alias() doesn't take any
> arguments. Hence some massaging is necessary.

Actually not; the `jmp' will leave all the arguments as they were, so it
doesn't matter what arguments the target wants.

All you need to make that compile is a declaration of memchr_alias,
claiming it takes args like memchr.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019