flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
cod3b453 06 Jan 2016, 19:12
Yes but T may be a problem. The obvious one is:
Code: macro swap lhs,rhs { xchg lhs,rhs } Code: macro swap lhs,rhs,T { if lhs in <...> and rhs in <...> then ; regs/mem xchg lhs,rhs ; could add more cases/checks for other specialisations here else ; assume structs mov ecx,sizeof.T sub esp,ecx mov esi,lhs mov edi,esp rep movsb mov esi,rhs mov edi,lhs rep movsb mov esi,esp mov edi,rhs movsb add esp,ecx end if } ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.