This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

building gcc 4.0.1 using CAS (part of the sun v8plus arch)


I modified the file: ./libstdc++-v3/config/cpu/sparc/atomicity.h
to use the 32bit equivalent CAS/LD instructions from the arch64 bit in the arch32.


I then built the code using the -mv8plus option in the (xxx)FLAGS and all is happy.

However, the code will no longer compile without the v9 32bit CAS/LD code.

What is the preferred way of doing this for GCC code?

Is there a macro I can ifdef on to check to see if I can use the v8plus instructions, otherwise use the existing spinlock implementation?

I would like to submit this and get it mainstreamed, but I am not sure how to proceed here.

Thanks!

--
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]