flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Windows > Bug with 64-bit dword registers in proc64.inc / fastcall? | 
| Author | 
 | 
| KingDemon 18 Feb 2014, 19:09 Hi, I'm getting "Error: operand sizes do not match" on this line of code:
 Code: invoke wsprintf, rdi, msg, r12d I also tried adding the dword size modifier, but still get the error: Code: invoke wsprintf, rdi, msg, dword r12d The fastcall macro translates the last parameter to "mov r8b, r12d": Code: else if size@param = 1 if ~ param eq r8b mov r8b,param end if end if I then tracked it down to where size@param was being set: Code: virtual origin = $ inc param load opcode byte from origin if opcode = 67h; | opcode = 41h load opcode byte from origin+1 end if if opcode and 0F8h = 48h size@param = 8 else if opcode = 66h size@param = 2 else if opcode = 0FFh size@param = 4 else size@param = 1 end if end virtual The commented-out part is my addition to fix the problem. For some reason, the "inc r12d" instruction in this case gets encoded with the 0x41 prefix-opcode added to it. _________________ Don't mind me! I'm just a crazy next-door neighbor. | |||
|  18 Feb 2014, 19:09 | 
 | 
| Tomasz Grysztar 18 Feb 2014, 19:55 You are using an outdated version of fasmw package. This bug had been fixed a few months ago. | |||
|  18 Feb 2014, 19:55 | 
 | 
| KingDemon 19 Feb 2014, 20:50 Thanks... I had 1.70.03. Time to update. | |||
|  19 Feb 2014, 20:50 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.