* Re: gas is overly conservative with itc instruction
2006-03-01 18:59 gas is overly conservative with itc instruction Chen, Kenneth W
@ 2006-03-01 19:28 ` John S. Worley
2006-03-01 20:09 ` Chen, Kenneth W
2006-03-03 1:13 ` James E Wilson
2 siblings, 0 replies; 4+ messages in thread
From: John S. Worley @ 2006-03-01 19:28 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
Ken -
Have you tried explicit bundling? I wouldn't rely on
the assembler to bundle critical code like this, and the
performance is worth the extra effort.
Regards,
John Worley
jsworley@qwest.net
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 5295 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: gas is overly conservative with itc instruction
2006-03-01 18:59 gas is overly conservative with itc instruction Chen, Kenneth W
2006-03-01 19:28 ` John S. Worley
@ 2006-03-01 20:09 ` Chen, Kenneth W
2006-03-03 1:13 ` James E Wilson
2 siblings, 0 replies; 4+ messages in thread
From: Chen, Kenneth W @ 2006-03-01 20:09 UTC (permalink / raw)
To: linux-ia64
John S. Worley wrote on Wednesday, March 01, 2006 11:29 AM
> Have you tried explicit bundling? I wouldn't rely on
> the assembler to bundle critical code like this, and the
> performance is worth the extra effort.
I suppose so. And just realize that it might be because of gcc assembler
bent backwards for sloppy kernel developer. If we follow the software
developer manual to the teeth, the code in vhpt_miss isn't strictly
correct:
(p10) itc.i r18 // insert the instruction TLB entry
(p11) itc.d r18 // insert the data TLB entry
(p6) br.cond.spnt.many page_fault // handle bad address/page not present (page fault)
It misses stop bits in the source for both itc instructions. And gas
silently fixed up the bug and forced stop bit right before insn, except
it wasn't doing a good job at collapsing multiple stop. Manually adding
stop bits to it produces desired bundling.
Even though p10 and p11 are mutually exclusive, there are no m-m-stop-i
bundle template and itc can be only issued to one of the 4 memory port,
so adding a stop bit in between won't matter anyway.
HJ, nevermind, I think we are OK.
- Ken
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gas is overly conservative with itc instruction
2006-03-01 18:59 gas is overly conservative with itc instruction Chen, Kenneth W
2006-03-01 19:28 ` John S. Worley
2006-03-01 20:09 ` Chen, Kenneth W
@ 2006-03-03 1:13 ` James E Wilson
2 siblings, 0 replies; 4+ messages in thread
From: James E Wilson @ 2006-03-03 1:13 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]
On Wed, 2006-03-01 at 10:59, Chen, Kenneth W wrote:
> The stop after first mmi bundle is unnecessary. HJ, is it possible
> to get that relaxed a bit?
Yes. The double stop bit here is a bug. It is better to fix the kernel
assembly source, but the assembler should be fixed also. I wrote and
checked in a patch to fix it.
I tested this with a kernel build, and the only difference with the
patch is that the one extra stop bit you complained about is gone.
There were no other changes to the kernel binary.
[-- Attachment #2: patch.last.stop --]
[-- Type: text/plain, Size: 922 bytes --]
2006-03-02 James E Wilson <wilson@specifix.com>
* config/tc-ia64.c (emit_one_bundle): For IA64_OPCODE_LAST, if we
change the template, then clear md.slot[curr].end_of_insn_group.
Index: tc-ia64.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ia64.c,v
retrieving revision 1.186
diff -p -p -r1.186 tc-ia64.c
*** tc-ia64.c 23 Feb 2006 21:36:17 -0000 1.186
--- tc-ia64.c 2 Mar 2006 22:32:53 -0000
*************** emit_one_bundle ()
*** 6855,6860 ****
--- 6855,6864 ----
changing NOPs in front of this slot. */
for (j = i; j < 3; ++j)
insn[j] = nop[ia64_templ_desc[required_template].exec_unit[j]];
+
+ /* We just picked a template that includes the stop bit in the
+ middle, so we don't need another one emitted later. */
+ md.slot[curr].end_of_insn_group = 0;
}
template = required_template;
}
^ permalink raw reply [flat|nested] 4+ messages in thread