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/trunk/src/MLRISC/hppa/backpatch/hppaDelaySlots.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/hppa/backpatch/hppaDelaySlots.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 744 - (download) (annotate)
Fri Dec 8 04:11:42 2000 UTC (18 years, 8 months ago) by leunga
File size: 2945 byte(s)

   A CVS update record!

   Changed type cell from int to datatype, and numerous other changes.
   Affect every client of MLRISC.  Lal says this can be bootstrapped on all
   machines.  See smlnj/HISTORY for details.

   Tag:  leunga-20001207-cell-monster-hack
(*
 * This file was automatically generated by MDGen (v3.0)
 * 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)
   fun delaySlot {instr, backward} = let
          fun delaySlot instr = 
              (
               case instr of
               I.BCOND{cmp, bc, r1, r2, n, nop, t, f} => {nop=nop, n=n, nOn=(if backward
                  then D_TAKEN
                  else D_FALLTHRU), nOff=D_ALWAYS}
             | I.BCONDI{cmpi, bc, i, r2, n, nop, t, f} => {nop=nop, n=n, nOn=(if backward
                  then D_TAKEN
                  else D_FALLTHRU), nOff=D_ALWAYS}
             | I.BB{bc, r, p, n, nop, t, f} => {nop=nop, n=n, nOn=(if backward
                  then D_TAKEN
                  else D_FALLTHRU), nOff=D_ALWAYS}
             | I.B{lab, n} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | I.LONGJUMP{lab, n, tmp, tmpLab} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | I.BE{b, d, sr, n, labs} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | I.BV{x, b, labs, n} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | I.BLR{x, t, labs, n} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | I.BL{lab, t, defs, uses, mem, n} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | I.BLE{d, b, sr, t, defs, uses, mem} => {nop=false, n=false, nOn=D_NONE, nOff=D_ALWAYS}
             | I.FBRANCH{cc, fmt, f1, f2, t, f, n, long} => {nop=false, n=n, nOn=D_NONE, nOff=D_ALWAYS}
             | _ => {nop=true, n=false, nOn=D_ERROR, nOff=D_NONE}
              )
       in delaySlot instr
       end

   fun enableDelaySlot _ = error "enableDelaySlot"
   fun conflict _ = error "conflict"
   fun delaySlotCandidate {jmp, delaySlot} = let
          fun delaySlotCandidate delaySlot = 
              (
               case delaySlot of
               I.BCOND{cmp, bc, r1, r2, n, nop, t, f} => false
             | I.BCONDI{cmpi, bc, i, r2, n, nop, t, f} => false
             | I.BB{bc, r, p, n, nop, t, f} => false
             | I.B{lab, n} => false
             | I.LONGJUMP{lab, n, tmp, tmpLab} => false
             | I.BE{b, d, sr, n, labs} => false
             | I.BV{x, b, labs, n} => false
             | I.BLR{x, t, labs, n} => false
             | I.BL{lab, t, defs, uses, mem, n} => false
             | I.BLE{d, b, sr, t, defs, uses, mem} => false
             | I.FBRANCH{cc, fmt, f1, f2, t, f, n, long} => false
             | I.BREAK{code1, code2} => false
             | _ => true
              )
       in delaySlotCandidate delaySlot
       end

   fun setTarget _ = error "setTarget"
end


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