Message-Id: <5.0.2.1.0.20001229134831.03488a10@pop5.banet.net> X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Fri, 29 Dec 2000 13:53:59 -0500 To: djgpp-workers AT delorie DOT com From: "Peter J. Farley III" Subject: Re: fcntl locking changes #3: ljmp/lcall patches for gcc 2.952 Cc: Morten Welinder In-Reply-To: <5.0.2.1.0.20001229131516.00a88910@pop5.banet.net> References: <20001229141228 DOT 26833 DOT qmail AT tyr DOT diku DOT dk> <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20001229065313 DOT 00a50220 AT pop5 DOT banet DOT net> <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20001229065313 DOT 00a50220 AT pop5 DOT banet DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 01:25 PM 12/29/00 -0500, Peter J. Farley III wrote: >At 02:12 PM 12/29/00 +0000, Morten Welinder wrote: > > > >Would it be possible to simply define an LCALL macro to hide the > >assembler differences? It seems to me that spreading a complicated > >version test out to a zillion places is going to bring grief in > >the future. > >An *excellent* idea, if only I knew how to code gas macros. I only >know IBM 3[679]0 Assembler well enough to know how to code macros, and >that doesn't help much here. > >If you (or someone) can code the macros, I would be happy to change the > >code to use them. We would need LJMP as well as LCALL. I would also >need some advice on how gas searches for macros (do I #include them or >does gas look in someplace like /include or what?). And how do we use >a macro in something like dbgcom.c, which has lots and lots in inline >asm? FWIW, dbgcom.c has the most occurrences of lcall and ljmp >instructions, so that's where the macro is needed most at the moment. Just answered my own questions. We can, of course, use suitably coded #define-style C macros, even in .S sources. I see, for example, in exceptn.S, macors defined like this: #define EXCEPTION_ENTRY(number) \ pushl number ; \ jmp exception_handler And obviously this can also be used for LJMP and LCALL. I'll work on another version of those changes that uses macros instead of direct coding. --------------------------------------------------------- Peter J. Farley III (pjfarley AT dorsai DOT org OR pjfarley AT banet DOT net)