Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/branches/SMLNJ/src/MLRISC/hppa/backpatch/hppaDelaySlots.sml
ViewVC logotype

View of /sml/branches/SMLNJ/src/MLRISC/hppa/backpatch/hppaDelaySlots.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 410 - (download) (annotate)
Fri Sep 3 00:25:03 1999 UTC (20 years, 1 month ago)
File size: 2618 byte(s)
This commit was manufactured by cvs2svn to create branch 'SMLNJ'.
(*
 * This file was automatically generated by MDGen
 * from the machine description file "hppa/hppa.md".
 *)


functor HppaDelaySlots(structure I : HPPAINSTR
                       structure P : INSN_PROPERTIES
                          where I = I
                      ) : DELAY_SLOT_PROPERTIES =
struct
   structure I = I
   datatype delay_slot =
     D_NONE     
   | D_ERROR    
   | D_ALWAYS   
   | D_TAKEN    
   | D_FALLTHRU 
   
   fun error msg = MLRiscErrorMsg.error("HppaDelaySlots",msg)
   val delaySlotSize = 4

   fun delaySlot {instr=I.BCOND{cmp, bc, r1, r2, n, nop, t, f}, backward} = {nop=nop, n=n, nOn=(if (not backward)
          then D_FALLTHRU
          else D_TAKEN), nOff=D_ALWAYS}
     | delaySlot {instr=I.BCONDI{cmpi, bc, i, r2, n, nop, t, f}, backward} = {nop=nop, n=n, nOn=(if (not backward)
          then D_FALLTHRU
          else D_TAKEN), nOff=D_ALWAYS}
     | delaySlot {instr=I.BB{bc, r, p, n, nop, t, f}, backward} = {nop=false, n=n, nOn=(if (not backward)
          then D_FALLTHRU
          else D_TAKEN), nOff=D_ALWAYS}
     | delaySlot {instr=I.B{lab, n}, backward} = {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
     | delaySlot {instr=I.BV{x, b, labs, n}, backward} = {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
     | delaySlot {instr=I.BLR{x, t, labs, n}, backward} = {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
     | delaySlot {instr=I.BL{x, t, defs, uses, n}, backward} = {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
     | delaySlot {instr=I.BLE{d, b, sr, t, defs, uses, mem}, backward} = {nop=false, n=false, nOn=D_ERROR, nOff=D_ALWAYS}
     | delaySlot _ = {nop=true, n=false, nOn=D_ERROR, nOff=D_NONE}
   fun enableDelaySlot _ = error "enableDelaySlot"
   fun conflict _ = error "conflict"

   fun delaySlotCandidate {jmp, delaySlot=I.BCOND{cmp, bc, r1, r2, n, nop, t, f}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BCONDI{cmpi, bc, i, r2, n, nop, t, f}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BB{bc, r, p, n, nop, t, f}} = false
     | delaySlotCandidate {jmp, delaySlot=I.B{lab, n}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BV{x, b, labs, n}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BLR{x, t, labs, n}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BL{x, t, defs, uses, n}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BLE{d, b, sr, t, defs, uses, mem}} = false
     | delaySlotCandidate {jmp, delaySlot=I.FBRANCH{cc, fmt, f1, f2, t, f, n, long}} = false
     | delaySlotCandidate {jmp, delaySlot=I.BREAK{code1, code2}} = false
     | delaySlotCandidate _ = true
   fun setTarget _ = error "setTarget"
end


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0