An apparatus and method to support pipelining of variable-latency
instructions in a multithreaded processor. In one embodiment, a processor
may include instruction fetch logic configured to issue a first and a
second instruction from different ones of a plurality of threads during
successive cycles. The processor may also include first and second
execution units respectively configured to execute shorter-latency and
longer-latency instructions and to respectively write shorter-latency or
longer-latency instruction results to a result write port during a first
or second writeback stage. The first writeback stage may occur a fewer
number of cycles after instruction issue than the second writeback stage.
The instruction fetch logic may be further configured to guarantee result
write port access by the second execution unit during the second
writeback stage by preventing the shorter-latency instruction from
issuing during a cycle for which the first writeback stage collides with
the second writeback stage.