From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Subject: Alpha Assembly: Why does cc generate xor sp,zero,sp?
Date: 29 Jun 2002 23:18:24 +0200 [thread overview]
Message-ID: <87vg814wdb.fsf@student.uni-tuebingen.de> (raw)
Hi,
I noticed that for fp->int conversions on ev5, the Compaq C compiler
generates code like
30: e0 05 e0 5b cvttq/c $f0,$f0
34: 00 00 1e 9c stt $f0,0(sp)
38: 9e 04 fe 47 cmoveq zero,sp,sp
3c: 00 00 fe 2f unop
40: 00 00 1e a4 ldq v0,0(sp)
or
30: 00 00 1c 88 lds $f0,0(at)
34: 00 14 00 5a addt $f16,$f0,$f0
38: e0 05 e0 5b cvttq/c $f0,$f0
3c: 00 00 1e 9c stt $f0,0(sp)
40: 1e 08 df 47 xor sp,zero,sp
44: 00 00 1e a4 ldq v0,0(sp)
Now what is this fiddling with the stack pointer doing? Does it avoid
the replay trap? The HRM says: "If the load instruction is scheduled
to issue two cycles after the store instruction, then it will be
issue-stalled for one cycle." Does the xor avoid this cycle?
--
Falk
reply other threads:[~2002-06-29 21:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox