Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 124038

Forum Post: RE: CSL Libraries and Bitwise C code

$
0
0

The ## operator is the C standard token-pasting operator.  When a call to macro CSL_FINST is preprocessed, it will result in something that looks like this (assuming no further macros).  This is usually because CSL_b_c is defined as a macro elsewhere.

   CSL_FINST(a,b,c) /* before */
   CSL_FINS((a), b, CSL_b_c) /* after */

The macro CSL_FEXTR is doing just what it says; it's extracting a field (a run of bits) from an expression by first shifting away the unused LSB, and than masking with a mask of all-ones computed on the spot.

Does that clear it up?


Viewing all articles
Browse latest Browse all 124038

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>