Support

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

Please evaluate my perception of these selectors in DSP/ASM

For general discussion related FlowStone

Re: Please evaluate my perception of these selectors in DSP/

Postby guyman » Sat Mar 20, 2021 12:43 am

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?
User avatar
guyman
 
Posts: 199
Joined: Fri Mar 02, 2018 8:27 pm

Re: Please evaluate my perception of these selectors in DSP/

Postby HughBanton » Sat Mar 20, 2021 5:18 pm

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
User avatar
HughBanton
 
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 43 guests