flat assembler
Message board for the users of flat assembler.
Index
> Main > [fasmg] movbe (0x0F 0x38 0xF[01]) instruction? |
Author |
|
sylware 09 Aug 2021, 12:57
It seems this instruction is missing, or it is me missing something.
|
|||
09 Aug 2021, 12:57 |
|
Tomasz Grysztar 09 Aug 2021, 14:31
MOVBE is one of the single-instruction extensions that have dedicated CPUID bits, in fasmg's headers set it should therefore have its own file (ext/movbe.inc). I've been slowly adding most of the Intel extensions (I did not even begin with AMD-specific stuff), but it's never been complete.
|
|||
09 Aug 2021, 14:31 |
|
bitRAKE 09 Aug 2021, 15:39
Code: ; CPUID Fn0000_0001_ECX[MOVBE] = 1 calminstruction movbe? dest*,src* asmcmd =x86.=parse_operand =@dest,dest asmcmd =x86.=parse_operand =@src,src local size check @dest.size <> 0 & @src.size <> 0 & @dest.size <> @src.size jyes operand_sizes_do_not_match compute size, @dest.size or @src.size check size > 1 jno invalid_operand_size main: check @dest.type = 'reg' & @src.type = 'mem' jyes movbe_reg_mem check @dest.type = 'mem' & @src.type = 'reg' jyes movbe_mem_reg invalid_combination_of_operands: asmcmd =err 'invalid combination of operands' exit movbe_reg_mem: asmcmd =x86.=select_operand_prefix =@dest,size asmcmd =x86.=store_instruction <0Fh,38h,0F0h>,=@dest,=@src.=rm exit movbe_mem_reg: asmcmd =x86.=select_operand_prefix =@src,size asmcmd =x86.=store_instruction <0Fh,38h,0F1h>,=@src,=@dest.=rm exit invalid_operand_size: asmcmd =err 'invalid operand size' compute size, 0 jump main operand_sizes_do_not_match: asmcmd =err 'operand sizes do not match' compute size, 0 jump main end calminstruction This instruction was introduced with Intel Atom and later migrated (movbe'd ) to higher end processors. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
09 Aug 2021, 15:39 |
|
sylware 09 Aug 2021, 18:47
It does not work. As far I understand, it seems related to modrm/sib bytes computation.
Well, I have to dive into this because I got hit by the missing "pdep" instruction too. |
|||
09 Aug 2021, 18:47 |
|
Tomasz Grysztar 09 Aug 2021, 19:07
sylware wrote: Well, I have to dive into this because I got hit by the missing "pdep" instruction too. |
|||
09 Aug 2021, 19:07 |
|
bitRAKE 09 Aug 2021, 19:11
Oh, I got the dest<>src mixed up in the output. Maybe there is something else too?
Code: movbe_reg_mem: asmcmd =x86.=select_operand_prefix =@src,size asmcmd =x86.=store_instruction <0Fh,38h,0F0h>,=@src,=@dest.=rm exit movbe_mem_reg: asmcmd =x86.=select_operand_prefix =@dest,size asmcmd =x86.=store_instruction <0Fh,38h,0F1h>,=@dest,=@src.=rm exit Some more instructions, SSE4a, etc... https://board.flatassembler.net/topic.php?t=21823 _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
09 Aug 2021, 19:11 |
|
sylware 09 Aug 2021, 21:09
Tomasz Grysztar wrote: PDEP is part of the BMI2 extension ok... my egrep -i was a failure then or I don't know what I did... jez, really unlucky with text search lately. bitRAKE wrote: I got the dest<>src mixed up |
|||
09 Aug 2021, 21:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.