Fixed variable storage
Posted: Sun Aug 25, 2019 2:12 pm
I recently wondered how 'fixed' variables are stored in assembler, and if they involve ram access or not. Maybe someone can offer some insight...
I'm thinking of the situation where in DSP I write e.g ( x>336 ) ... When converted to assem it allocates a float, gives it a name, such as 'F_336', and makes F_336 = 336. And somewhere there will be cmpps xmm0, F_336, etc. etc.
But presumably I could equally write cmpps xmm0, 336, etc. ; without involving the variable.
Doing that, does that save the extra overhead of a ram access to a stored varable, or does assem make it work the same either way?
One of those many things I muse over
I'm thinking of the situation where in DSP I write e.g ( x>336 ) ... When converted to assem it allocates a float, gives it a name, such as 'F_336', and makes F_336 = 336. And somewhere there will be cmpps xmm0, F_336, etc. etc.
But presumably I could equally write cmpps xmm0, 336, etc. ; without involving the variable.
Doing that, does that save the extra overhead of a ram access to a stored varable, or does assem make it work the same either way?
One of those many things I muse over