| 1 |
(* |
| 2 |
* This file was automatically generated by MDGen (v3.0) |
| 3 |
* from the machine description file "mips/mips.md". |
| 4 |
*) |
| 5 |
|
| 6 |
|
| 7 |
functor MIPSDelaySlots(structure I : MIPSINSTR |
| 8 |
structure P : INSN_PROPERTIES |
| 9 |
where I = I |
| 10 |
) : DELAY_SLOT_PROPERTIES = |
| 11 |
struct |
| 12 |
structure I = I |
| 13 |
datatype delay_slot = D_NONE | D_ERROR | D_ALWAYS | D_TAKEN | D_FALLTHRU |
| 14 |
|
| 15 |
fun error msg = MLRiscErrorMsg.error("MIPSDelaySlots",msg) |
| 16 |
fun delaySlot {instr, backward} = let |
| 17 |
fun delaySlot instr = |
| 18 |
( |
| 19 |
case instr of |
| 20 |
_ => {nop=true, n=false, nOn=D_ERROR, nOff=D_NONE} |
| 21 |
) |
| 22 |
in delaySlot instr |
| 23 |
end |
| 24 |
|
| 25 |
fun enableDelaySlot _ = error "enableDelaySlot" |
| 26 |
fun conflict _ = error "conflict" |
| 27 |
fun delaySlotCandidate {jmp, delaySlot} = let |
| 28 |
fun delaySlotCandidate delaySlot = |
| 29 |
( |
| 30 |
case delaySlot of |
| 31 |
_ => true |
| 32 |
) |
| 33 |
in delaySlotCandidate delaySlot |
| 34 |
end |
| 35 |
|
| 36 |
fun setTarget _ = error "setTarget" |
| 37 |
end |
| 38 |
|