Skip to contentSkip to conversation

PowerPC 970/G5 suggestion/request

Qemu-devel Kai Cherry 2 participants 3 messages Aug 12, 2004

lore
Share & tools
lore

Kai Cherry

author
#0 lore raw

Hi...

I'd like to know what the maintainers et al would think of having the 970 as a different cpu like the Sparc and i386's.

I ask this because it really does make a huge, measurable difference if or not code is targeted to that cpu. Apple has several documents on this, and what assembler instructions should be used, changed or avoided altogether, as well as notes on why stuff really needs to be aligned "correctly" so as not to waste huge amounts of cycles.

Is this feasible? Can the code generators/re-compiler in qemu be modified without too much pain to generate code closer to Apple's recommendations at http://developer.apple.com/technotes/tn/tn2087.html

Thanks in advance for any thoughts on this,

-Kai

#1 lore raw
Quoted 11 lines · Kai Cherry

Hi...

I'd like to know what the maintainers et al would think of having the 970 as a different cpu like the Sparc and i386's.

I ask this because it really does make a huge, measurable difference if or not code is targeted to that cpu. Apple has several documents on this, and what assembler instructions should be used, changed or avoided altogether, as well as notes on why stuff really needs to be aligned "correctly" so as not to waste huge amounts of cycles.

Quoted 5 lines

Is this feasible? Can the code generators/re-compiler in qemu be modified without too much pain to generate code closer to Apple's recommendations at http://developer.apple.com/technotes/tn/tn2087.html

Thanks in advance for any thoughts on this,

AFAIK Qemu doesn't do any optimization between the sussessive micro-ops. There's generally very little scope for optimization of the code of the individual ops, and that should already be done by gcc anyway.

Adding some sort of optimization pass over the generated code/op stream might speed up emulation. This isn't specific to the G5 though. The same applies for pretty much all modern CPUs, including the G4.

Paul

author
#2 lore raw
Quoted 3 lines · Paul Brook

AFAIK Qemu doesn't do any optimization between the sussessive micro-ops. There's generally very little scope for optimization of the code of the individual ops, and that should already be done by gcc anyway.

The thing is tho, dyngen can't/doesn't seem to work on code that had been...massaged with any of the gcc flags. "blr expected after..." sort of errors. My guess because the compiled code is padded with NOOPs and this is not being accounted for...

-K