[PATCH v2] rs6000: Add 2 built-ins to read the Time Base Register on PowerPC
Tulio Magno Quites Machado Filho
tuliom@linux.vnet.ibm.com
Sat Sep 15 00:35:00 GMT 2012
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
More information about the Gcc-patches
mailing list