If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Please evaluate my perception of these selectors in DSP/ASM
12 posts
• Page 2 of 2 • 1, 2
Re: Please evaluate my perception of these selectors in DSP/
So if we remove the xorps it takes it from 7 instructions to 6? We got it to 6? is that the most efficient for an instant switch?
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
Re: Please evaluate my perception of these selectors in DSP/
I'm totally self-taught in the assembler arena - so anything I say should not to be taken as gospel! (Well, guided right here by FS Guru / Trog / MV / KG /MyCo etc. etc. in the main!) but as far as I can deduce xorps xmm0,xmm0 is only required when you're generating a bool variable within the code itself, where it's generally followed by a cmpps to determine the condition. (For the uninitiated the strange 'xorps xmm0,xmm0' instruction is the recognised guaranteed method to clear every bit in the xmm0 register).
Whereas here the bool is specified by 'switch' being on a streamboolin input type. So it certainly appears that we can legitamately loose that line. (In fact, had we needed xorps xmm0,xmm0 , I guess we'd logically also have needed xorps xmm1,xmm1 , because xmm1 is used in exactly the same way for in2).
I'll have to scour though all my code, see if I can make use of this one! Credit should go to Adam though; the latest Alpha still doesn't automatically offer andnps when compiling DSP code when you write ' &!<bool> '. I wasn't aware of it.
H
Whereas here the bool is specified by 'switch' being on a streamboolin input type. So it certainly appears that we can legitamately loose that line. (In fact, had we needed xorps xmm0,xmm0 , I guess we'd logically also have needed xorps xmm1,xmm1 , because xmm1 is used in exactly the same way for in2).
I'll have to scour though all my code, see if I can make use of this one! Credit should go to Adam though; the latest Alpha still doesn't automatically offer andnps when compiling DSP code when you write ' &!<bool> '. I wasn't aware of it.
H
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
12 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 62 guests