x86: reimplement integer division
Review Request #2743 - Created April 17, 2015 and discarded
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10790:25e772c6cb98 --------------------------- x86: reimplement integer division This patch reimplements integer division for x86 architecture. Earlier the division algorithm was implemented using microops. I don't think that's what happens in actual implementations. As I have read, there is separate division unit that would carry out the whole operation. This means we only need to issue a small number of microops, not a microop for each bit of the dividend, as is happening currently. This patch implements the division algorithm in a using four microops. The first microop reads the higher part of the dividend and the divisor and records them in local registers. The second microop reads the lower part of the dividend and carries out the division algorithm. The next two microops populate the remainder and quotient registers (unchanged from before).
Posted (April 18, 2015, 8:13 p.m.)
I like the restructuring... I agree the micro-op loop is probably not realistic. Is there a reason to code a loop in C though, as opposed to just using '/' and '%'?
