flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > fasm is hanging

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 27 Oct 2015, 08:29
Code:
use16
vpgatherdd xmm0{k1},dword [rax+xmm0+0x40]        ;hanging
    

Code:
use64
vpgatherdd xmm0{k1},dword [eax+xmm1+0x40]       ;disallowed combination of registers
    

Code:
vcvtsi2sd xmm31,xmm2,dword [rsp+64]     ;needed disp8=10h
vcvtusi2sd xmm1,xmm2,dword [rax+64]     ;needed disp8=10h
    

_________________
smaller is better
Post 27 Oct 2015, 08:29
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 27 Oct 2015, 12:03
CandyMan wrote:
Code:
use64
vpgatherdd xmm0{k1},dword [eax+xmm1+0x40]       ;disallowed combination of registers
    
Can you give more detail on this one? I was not able to reproduce the error.
Post 27 Oct 2015, 12:03
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 27 Oct 2015, 13:10
Code:
use16
vpgatherdd xmm0{k1},[rax+xmm0+64]
    


Code:
      check_vsib:
        xor     ah,ah
      check_vsib_base:                         ;*
        test    bh,bh
        jz      check_vsib_index
        mov     al,bh
        shr     al,4
        cmp     al,4
        je      check_vsib_base_size 
        cmp     [code_type],64
        jne     swap_vsib_registers           ;*
        cmp     al,8
        jne     swap_vsib_registers
      check_vsib_base_size:
        mov     ah,[address_size]
        and     ah,0Fh
        jz      check_vsib_index
        cmp     al,ah
        jne     invalid_address
      check_vsib_index:
        mov     al,bl
        and     al,0E0h
        cmp     al,0C0h
        jae     check_index_scale
        cmp     al,60h
        je      check_index_scale
        jmp     invalid_address
      swap_vsib_registers:
        xor     al,-1
        jz      invalid_address
        cmp     cl,1
        ja      invalid_address
        xchg    bl,bh
        mov     cl,1
        jmp     check_vsib_base       ;* closed loop
    

_________________
smaller is better
Post 27 Oct 2015, 13:10
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 27 Oct 2015, 13:13
No, I meant the second one of your samples. The first one is already fixed.
Post 27 Oct 2015, 13:13
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 27 Oct 2015, 13:46
Whether you could what combinations of registers are disallowed?
thanks...

_________________
smaller is better
Post 27 Oct 2015, 13:46
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 27 Oct 2015, 14:12
The disallowed combinations are defined in Intel manuals this way:
Intel wrote:
The instruction will #UD fault if the destination vector zmm1 is the same as index vector VINDEX.
Therefore the error message is caused by this instruction:
Code:
vpgatherdd xmm0{k1},dword [eax+xmm0+0x40] ; error: disallowed combination of registers    
but it should not be caused by the instruction you've shown. If you encountered a case when it signals that error, please show the entire [minimal] source that causes the problem.
Post 27 Oct 2015, 14:12
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.