GCC bitwise operators source code

I’d like to know how the code for the GCC >> and << bitwise operators is written, does anyone know where to download the code from without having to download the whole GCC source code? I had a look at the GNU website and I think I could view the source code using SVN, but I haven’t a clue how to navigate the GCC repositories. Can anyone help? Thanks.

Am 05.02.2012 17:36, schrieb Minsky:
> I think I could view the source code using SVN, but I haven’t a clue
> how to navigate the GCC repositories. Can anyone help? Thanks.
>
Not sure if I understand what the problem is, but you can navigate the
cvs with your browser http://gcc.gnu.org/viewcvs/


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Am 05.02.2012 17:48, schrieb Martin Helm:
> Am 05.02.2012 17:36, schrieb Minsky:
>> I think I could view the source code using SVN, but I haven’t a clue
>> how to navigate the GCC repositories. Can anyone help? Thanks.
>>
> Not sure if I understand what the problem is, but you can navigate the
> cvs with your browser http://gcc.gnu.org/viewcvs/
>
>
Still not sure what you exactly want to see (the source code which
implements the << operator or to what it is compiled), but I add this
here just in case it is of interest.
You can see the assembler output to what your code is compiled for
example this way:
create a source file foo.c


int shift(int a, int x){
return a << x;
}

and compile it with


gcc -O2 -S -c foo.c

which gives you a file foo.s which contains the assembler code.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

You’ve sort of answered my query. My plan was, just as an exercise, to write rotate left and rotate right bitwise routines and I just wanted to follow the same convention as the shift routines. That’s why I wanted to view the code which I mistakenly thought would be written in C - I didn’t even consider that it could be in assembler - and which I now realize couldn’t be possible, just one of those Doh! moments. I was a bit vague about my problem with the GCC repositories, what I meant was, that I had no idea where to look within them for the code. Thanks for taking the time in providing the link and the example Martin, I’m much clearer on how to proceed with the exercise.