## no-delay-slots-g.pkg
#
# This is a default description for architectures without *any* delay slots.
# By using this dummy module the architecture can use the squash-jumps-and-write-code-to-code-segment-buffer-sparc32-g.pkg
# module for span dependency resolution.
#
# -- Allen Leung
# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.lib# This is nowhere invoked.
generic package no_delay_slots_g (
# ================
#
mcf: Machcode_Form # Machcode_Form is from
src/lib/compiler/back/low/code/machcode-form.api)
: (weak) Delay_Slot_Properties # Delay_Slot_Properties is from
src/lib/compiler/back/low/jmp/delay-slot-props.api{
package mcf = mcf; # "mcf" == "machcode_form" (abstract machine code).
Delay_Slot
= D_NONE # no delay slot
| D_ERROR
# an error */
| D_ALWAYS
# one delay slot
| D_TAKEN
# Delay slot is only active when branch is taken
| D_FALLTHRU
# Delay slot is only active when branch is not taken
;
delay_slot_bytes = 0; # size of delay slot in bytes
# Return the delay slot properties of an instruction
#
fun delay_slot { instruction, backward }
=
{ n => FALSE, # is the nullified bit on?
n_on => D_ERROR, # Delay type when nullified
n_off => D_NONE, # Delay type when not nullified
nop => FALSE # is there a nop padded?
};
# Change the delay slot properties of an instruction
#
fun enable_delay_slot { instruction, n, nop }
=
instruction;
# Is there any dependency conflict?
#
fun conflict { src, dst }
=
TRUE;
# Can delay_slot fit within the delay slot of jmp?
#
fun delay_slot_candidate { jmp, delay_slot }
=
FALSE;
# Change the branch target of an instruction
#
fun set_target (instruction, label)
=
instruction;
};