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/compiler/CodeGen/alpha32/alpha32Mask.sml
ViewVC logotype

View of /sml/trunk/src/compiler/CodeGen/alpha32/alpha32Mask.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 94 - (download) (annotate)
Tue May 12 21:56:22 1998 UTC (22 years, 9 months ago) by monnier
File size: 1083 byte(s)
This commit was generated by cvs2svn to compensate for changes in r93,
which included commits to RCS files with non-trunk default branches.
(* alpha32Mask.sml
 *
 * COPYRIGHT (c) 1996 Bell Laboratories.
 *
 *)

(** This is temporary until we modify the runtime system with the new mask **)

structure Alpha32Mask : REGMASK = struct
  fun error msg = ErrorMsg.impossible ("Alpha32Mask." ^ msg)

  val nrRegs = 32

  val sentinel = Word.fromInt ~1
  val regMap = Array.array(32, sentinel)
  fun mapR(i,j) = Array.update(regMap,i,j)

  val _ = app mapR 
	       [( 3, 0w0),	(* stdlink *)
		( 2, 0w1),	(* stdclos *)
		( 0, 0w2),	(* stdarg *)
		( 1, 0w3),	(* stdcont *)
		( 6, 0w4),	(* misc0 *)
		( 7, 0w5),	(* misc1 *)
		( 8, 0w6),	(* ...   *)
		(16, 0w7),
		(17, 0w8),
		(18, 0w9),
		(19, 0w10),
		(20, 0w11),
		(21, 0w12),
		(22, 0w13),
		(23, 0w14),
		(24, 0w15),
		(25, 0w16),
		(27, 0w17)]

  fun regMask(reg, mask) = let
    val bit = Array.sub(regMap, reg)
  in
    if bit=sentinel then error ("regMask - " ^ Int.toString reg)
    else Word.orb(mask,Word.<<(0w1,bit))
  end

  fun memMask _ = error "memMask"
end


(*
 * $Log: alpha32Mask.sml,v $
 * Revision 1.1.1.1  1998/04/08 18:39:54  george
 * Version 110.5
 *
 *)

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