This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for linux 2.1.127


On Tue, 10 Nov 1998, Richard B. Johnson wrote:

> It is thoretically possible to convert correct code to GNU `as` junk,
> however, the damn thing doesn't even do MACROs so if I am going to
> make:
> 		adc eax, [ebx+1000]
>                 adc eax, [ebx+996]
> 		adc eax, [ebx+992]

How about:

for (i = 1000; i < 0; i -= 4)
	asm { adc eax, [ebx+i] }

OK, I know that was stupid. There's an Intel assembler that runs on Linux
called nasm-0.97, have you tried it? It accepts Intel opcodes and outputs
in a number of object formats including COFF, ELF and MS's very own object
code. It does link quite well with gcc object files. 
 
> That's why we have BYTE PTR, WORD PTR, DWORD PTR, etc. Otherwise a
> zero could (and does) smash adjacent data. It's a very bad tool.

That's why they have movb, movw, and movl et. al. 

Cheers,
Alex
--
 /\_/\  Legalise cannabis now! 
( o.o ) Grow some cannabis today!
 > ^ <  Peace, Love, Unity and Respect to all.

http://www.tahallah.demon.co.uk - *new* - rewritten for text browser users!

Linux tahallah 2.1.127 #61 SMP Sat Nov 7 18:17:58 EST 1998
Two Intel Pentium Pro processors, 331.78 total bogomips, 48M RAM
System library 2.0.100



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]