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/OldCGen/mips/endian.sml
ViewVC logotype

View of /sml/trunk/src/compiler/OldCGen/mips/endian.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 114 - (download) (annotate)
Fri Jun 5 19:41:21 1998 UTC (22 years, 4 months ago) by monnier
File size: 765 byte(s)
This commit was generated by cvs2svn to compensate for changes in r113,
which included commits to RCS files with non-trunk default branches.
(* Copyright 1991 by AT&T Bell Laboratories 
 *
 *)
structure LittleEndian : ENDIAN = 
    struct
      val architecture = "mipsel"
      val bigEndian = false
      val >> = Word.>>
      val &  = Word.andb
      infix >> &

      val order_real = implode o rev o explode
      val low_order_offset = 0
      fun wordLayout (hi,lo) =
	(lo & 0w255, (lo >> 0w8) & 0w255, hi & 0w255, (hi >> 0w8) & 0w255)
    end

structure BigEndian : ENDIAN = 
    struct
      val architecture = "mipseb"
      val bigEndian = true
      val >> = Word.>>
      val &  = Word.andb
      infix >> &

      fun order_real x = x
      val low_order_offset = 1
      fun wordLayout (hi,lo) =
	((hi >> 0w8) & 0w255, hi & 0w255, (lo >> 0w8) & 0w255, lo & 0w255)
    end


(*
 * $Log$
 *)

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