Some small addition:

On Thu, 28 Oct 2010 16:25:59 +0200, Thomas Schatzl <tom_at_w...@gmx.at>
wrote:
> Hi,
> 
> On Thu, 28 Oct 2010 08:28:16 -0500, Andrew Brunner
> <andrew.t.brun...@gmail.com> wrote:
>> I tried to use the assembly code from the x64 unit on a i386 build of
>> FPC but FPC throws error on compile.  Why are the specific x64
>> instructions being blocked?  The cpu running the code has the ability
> 
> In general, the 32 and 64 bit instructions partially use the same opcode
> for different actual instructions depending on the processor mode. The
code
> segment selector contains information about the type of instruction set
> used.
> It might be worth a try to hack a REX prefix in 32 bit assembly and see
> what happens, but I'd assume that either you get an invalid opcode
> exception or the prefix is just ignored.

Actually, the REX prefix uses the 32 bit inc/dec opcode space (0x40-0x4f)
- so you *will* get an invalid opcode in the best case, and if you are
lucky, some unwanted program behavior.

Hth,
  Thomas

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to