Thank you Scott.
1. Yes, as indicated in section 5.5.5.2 "Forcing Load and Store Ordering (Memory Barriers)" of the e500mc reference manual, mbar 1 performs better than sync or mbar 0.
So , I assume theoretically EIEIO (mbar 1) is better than MBAR instruction.
You'll have to benchmark your application to determine if the difference is significant.
Yes. I am in process of writing standalone tool which makes use of both the instruction to profile the actual difference in terms of instruction latency.
2. I don't know of any hardware mechanism to accomplish this, though maybe you could automate the change to your source code, or use a preprocessor define.
I understand this instruction is user level, but anyway to make this instruction(MBAR) execution to trap ..?
Which HID bit are you thinking of? I don't see a relevant HID bit on e500v2.
Sorry, It was my assumption that EIEIO_EN bit is supported on e500v2.
EREF Manual section 4.6.4.1
Eieio synchronization enable. Allows mbar instructions to provide the same synchronization semantics
as the eieio instruction from PowerPC 1.xx architectures.
0 The synchronization provided by the mbar instruction is performed in the PowerISA manner.
Additional forms of synchronization, if implemented, are determined by the value in the MO field.
1 The synchronization provided by the mbar instruction is equivalent to PowerPC 1.xx eieio
synchronization. The MO field is ignored.
I am in need of this bit on e500mc and same is unfortunately not available :smileysad: