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/hppa/hppaMask.sml
ViewVC logotype

View of /sml/trunk/src/compiler/CodeGen/hppa/hppaMask.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 107 - (download) (annotate)
Thu May 28 21:30:17 1998 UTC (21 years, 1 month ago) by monnier
File size: 1136 byte(s)
This commit was generated by cvs2svn to compensate for changes in r106,
which included commits to RCS files with non-trunk default branches.
(* hppaMask.sml
 *
 * COPYRIGHT (c) 1996 Bell Laboratories.
 *
 *)

structure HppaMask : REGMASK = struct

  fun error msg = ErrorMsg.impossible ("HppaMask." ^ msg)

  val sentinel = Word.fromInt ~1
  val regMap = Array.array(32, sentinel)
  val _ = app (fn (i,j) => Array.update(regMap,i,j))
	       [( 9, 0w0),	(* stdlink *)
		(10, 0w1),	(* stdclos *)
		(11, 0w2),	(* stdarg *)
		(12, 0w3),	(* stdcont *)
		( 1, 0w4),	(* misc0 *)
		(13, 0w5),	(* misc1 *)
		(14, 0w6),	(* ...   *)
		(15, 0w7),
		(16, 0w8),
		(17, 0w9),
		(18, 0w10),
		(19, 0w11),
		(22, 0w12),
		(23, 0w13),
		(24, 0w14),
		(25, 0w15),
		(26, 0w16),
		(28, 0w17),
		(2, 0w18),
		(21, 0w19)]

	handle _ => error "setting regMap"


  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: hppaMask.sml,v $
 * Revision 1.2  1998/05/08 10:52:24  george
 *   The exhausted register has been made optional -- leung
 *
 * Revision 1.1.1.1  1998/04/08 18:39:55  george
 * Version 110.5
 *
 *)

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