This is the mail archive of the gcc-patches@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]

Re: [PATCH v2] rs6000: Add 2 built-ins to read the Time Base Register on PowerPC


Segher Boessenkool <segher@kernel.crashing.org> writes:

I don't think TARGET_MFCRF is correct. For example, if you use
-mcpu=powerpc64 (which doesn't set this flag) you will get code
that does not run on the newer machines.

Sorry, but it seems to be working here... I explain how I tested this in the end of the email.

David tells me all current CPUs actually do support the MFTB insns
just fine, so that there is no problem.

I don't understand the problem.


Let me paste again this snippet of code here:
It was generated using the __builtin_ppc_get_timebase test case with the
extra parameters -S -m64 -mcpu=power7. The rest is the same used by the
test suite.


.L.main:
	std 31,-8(1)
	stdu 1,-80(1)
	mr 31,1
	mfspr 9, 268
	std 9,56(31)
	li 9,0
	stw 9,48(31)
	b .L2

I've just done this same test for all -mcpu values from power3 through power7
and both -m32 and -m64. The only value that outputs mftb is power3 in both
environments.


What am I missing?

--
Tulio Magno


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