Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > openwatcom.users.c_cpp > #3447

Re: Saving XMM registers required in assembly functions (DOS / 16-bit)?

From "Wilton Helm" <whelm@compuserve.com>
Newsgroups openwatcom.users.c_cpp
Subject Re: Saving XMM registers required in assembly functions (DOS / 16-bit)?
Date 2015-07-10 17:05 -0600
Organization OpenWatcom
Message-ID <mnqbms$gt7$1@www.openwatcom.org> (permalink)
References <mivjjh$atj$1@www.openwatcom.org>

Show all headers | View raw


Unfortunately, trial and error isn't the most reliable teacher, either. 
That assumes that a register is used in the particular program and that 
modifying it at that particular place in the code will have visible effects. 
Particularly with something as specialized as XMM registers, that may not be 
the case.  The compiler probably doesn't use them if there is no FP, for 
instance, so a given test might not show anything.

I have no experience with the compiler internals.  The register behavior 
should be documented in the documentation.  Short of that, someone who has 
worked on the compiler would need to weigh in on whether, and under what 
condition XMM registers are used for normal C/C++ code and what is done 
about preserving registers.

I looked at the User's guide (the document that generally contains most of 
this sort of information) and no mention of XMM registers is made.  Given 
that they are part of the SIMD extensions, my guess is that the compiler 
doesn't use them--i.e. they are only used by library calls designed to take 
advantage of them or user written assembly code.

Since you are talking about DOS / 16-bit, I think I can say for certain that 
they are not used, because the processors traditionally used for DOS and 16 
bit don't have them, so obviously the compiler can't assume them.  I realize 
that it is possible to write 16 bit code on processors with more capability, 
but the extra capability isn't going to be taken advantage of under those 
circumstances.

Wilton

Back to openwatcom.users.c_cpp | Previous | NextNext in thread | Find similar


Thread

Re: Saving XMM registers required in assembly functions (DOS / 16-bit)? "Wilton Helm" <whelm@compuserve.com> - 2015-07-10 17:05 -0600
  Re: Saving XMM registers required in assembly functions (DOS / 16-bit)? Paul S. Person <psperson@ix.netscom.com.invalid> - 2015-07-11 09:36 -0700
    Re: Saving XMM registers required in assembly functions (DOS / 16-bit)? "Marty Stanquist" <martys1ow@att.net> - 2015-07-14 00:08 -0500

csiph-web