PureBasic Forum
http://forums.purebasic.com/english/

Structure variables with inline asm
http://forums.purebasic.com/english/viewtopic.php?f=35&t=68905
Page 1 of 1

Author:  wilbert [ Tue Aug 08, 2017 2:53 pm ]
Post subject:  Structure variables with inline asm

Is it always valid to use structure variables like this
Code:
Structure test
  a.l
  b.l
EndStructure

v.test\a = 1

EnableASM
mov edx, 1
mov eax, v\a
add edx, eax
mov v\b, edx
DisableASM

Debug v\b

and if so, which registers are free to use (unaltered by the compiler when it encounters a structure variable) ?

Author:  STARGĂ…TE [ Tue Aug 08, 2017 5:01 pm ]
Post subject:  Re: Structure variables with inline asm

Quote:
- On x86 processors, the available volatile registers are: eax, ecx and edx, xmm0, xmm1, xmm2 and xmm3. All others must be always preserved.
- On x64 processors, the available volatile registers are: rax, rcx, rdx, r8, r9, xmm0, xmm1, xmm2 and xmm3. All others must be always preserved.
http://www.purebasic.com/documentation/reference/inlinedasm.html

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/