| 1 |
(* pseudo-ops.sml |
| 2 |
* |
| 3 |
* COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies |
| 4 |
* |
| 5 |
* MLRISC pseudo-ops. |
| 6 |
* Ties together the assembler and client pseudo-ops |
| 7 |
*) |
| 8 |
|
| 9 |
|
| 10 |
functor PseudoOps(structure Client : CLIENT_PSEUDO_OPS) : PSEUDO_OPS = struct |
| 11 |
structure Client = Client |
| 12 |
structure Basis = Client.AsmPseudoOps |
| 13 |
structure T = Basis.T |
| 14 |
structure BT = PseudoOpsBasisTyp |
| 15 |
|
| 16 |
type pseudo_op = Client.pseudo_op Basis.pseudo_op |
| 17 |
|
| 18 |
fun toString(BT.EXT ext) = Client.toString ext |
| 19 |
| toString pOp = Basis.toString pOp |
| 20 |
|
| 21 |
fun sizeOf(BT.EXT ext, loc) = Client.sizeOf(ext, loc) |
| 22 |
| sizeOf(pOp, loc) = Basis.sizeOf(pOp, loc) |
| 23 |
|
| 24 |
fun emitValue(arg as {pOp, loc, emit}) = |
| 25 |
(case pOp |
| 26 |
of BT.EXT ext => Client.emitValue{pOp=ext, loc=loc, emit=emit} |
| 27 |
| _ => Basis.emitValue arg |
| 28 |
(*esac*)) |
| 29 |
|
| 30 |
fun adjustLabels(BT.EXT ext, loc) = Client.adjustLabels(ext, loc) |
| 31 |
| adjustLabels _ = false |
| 32 |
|
| 33 |
end |
| 34 |
|
| 35 |
|