| www.delorie.com/archives/browse.cgi | search |
| From: | "Böhme Uwe" <uwe AT hof DOT baynet DOT de> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: _lrotl replacement |
| Date: | Sat, 25 Jul 1998 19:50:12 +0200 |
| Organization: | Bingo (Buergernetz Ingolstadt eV) |
| Lines: | 24 |
| Message-ID: | <35BA1AD4.8E6F5EEA@hof.baynet.de> |
| References: | <35b9deda DOT 40014807 AT news DOT deol DOT ru> |
| NNTP-Posting-Host: | port60.hof.baynet.de |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
> I have some Visual C C++ sources with _lrotl function (cyclic
> rotate left). Seem it is MS extension to standart C library. Which
> replacement can i use with GCC 2.8.1 ?
>
> Vladimir
int _lrotl( int v ) {
__asm__ __volatile__ (
" movw %0, %%eax \n"
" rol $1, %%eax \n"
" jo IsDone \n"
" or $1, %%eax \n"
"IsDone: \n"
: : "gl" (v)
);
};
I didn't check that out, so you have to debug it (especially weather the
or operation for the
left out right in by carry flag is working)
Uwe
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |