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

View of /sml/branches/SMLNJ/src/compiler/CodeGen/hppa/hppaMask.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (download) (annotate)
Sat Nov 7 20:11:41 1998 UTC (21 years, 1 month ago) by monnier
File size: 1115 byte(s)
version $version
(* 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.4  1998/10/19 13:50:43  george
 * *** empty log message ***
 *
 * Revision 1.3  1998/05/23 14:09:23  george
 *   Fixed RCS keyword syntax
 *
 *)

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