Computer Chess Club Archives


Search

Terms

Messages

Subject: Inline assembler question

Author: James Robertson

Date: 18:13:05 01/15/02


Suppose I write an inline function containing assembler code, or I just insert
some assembler stuff in the middle of a large block of C code. Obviously, when I
write my assembler lines I will be stomping on registers, simply because the
syntax requires I use 'eax' or 'ebx' in such simple commands as 'mov eax,ebx'.
Suppose though that I really don't care what registers are used and I would like
the compiler to replace the registers in my assembler code with whatever it
finds convenient and will best benefit the surrounding code. How can I do this?
Help for both MSVC and gcc code would be great.

James



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.