Mac Intel

Mikael Pettersson <>
Tue Aug 15 10:05:48 CEST 2006


On Tue, 15 Aug 2006 02:24:31 +0100, Joel Reymont wrote:
> Could you please give me some insight into skip_sse2_insn?
> 
> I'm bombing out on MULSD which has the opcode of F2 0F 59 /r.
> 
> In the code below what's the significance of "if( (opcode & 0xF0) ==  
> 0x40 )"? It does not seem to apply to me as my opcode at that point  
> is 0x0F but I still need to move forward to 0x59.
> 
>      opcode = *pc++;
>      switch( opcode ) {
>      case 0x66: case 0xF2: case 0xF3:
> 	opcode = *pc++;
>      }
>      if( (opcode & 0xF0) == 0x40 )
> 	opcode = *pc++;

It recognises and skips the x86-64 REX prefix.
All you need to do is to bracket those two lines
with #ifdef __x86_64__ ... #endif.



More information about the erlang-questions mailing list