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/flowgraph/pseudo-ops-basis-typ.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/flowgraph/pseudo-ops-basis-typ.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (download) (annotate)
Wed Nov 21 19:00:08 2001 UTC (18 years, 7 months ago) by george
File size: 1865 byte(s)
  Implemented a complete redesign of MLRISC pseudo-ops. Now there
  ought to never be any question of incompatabilities with
  pseudo-op syntax expected by host assemblers.

  For now, only modules supporting GAS syntax are implemented
  but more should follow, such as MASM, and vendor assembler
  syntax, e.g. IBM as, Sun as, etc.
(* pseudo-ops-basis-typ.sml
 *
 * COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies
 *
 * Representation of pseudo-ops.
 *)

structure PseudoOpsBasisTyp = struct
  datatype ('labexp, 'ext) pseudo_op = 

	   (*
	    * ALIGN_SZ aligns on a 2^n boundary.
	    *
	    * ALIGN_ENTRY forces alignment on an instruction cache line 
	    * boundary, and ALIGN_LABEL is used for internal labels 
	    * (such as loops) and may only align if a small (architecture 
	    * determined) number of nops are required 
	    *)		      
     ALIGN_SZ of int			
   | ALIGN_ENTRY			
   | ALIGN_LABEL

	   (* 
	    * Labels for data pseudo-ops.
	    * All code labels should not be generated as pseudo-ops.
	    *)
   | DATA_LABEL of Label.label

           (*
	    * The usual text and data sections. 
	    * Sections are not allowed inside a text segment 
            *)
   | DATA_READ_ONLY
   | DATA
   | TEXT
   | SECTION of Atom.atom 

	  (*
	   * May have to rethink this one!
	   * For now, all instructions following a NOREORDER pseudo-op
           * are preserved in the order they were generated, until 
	   * a REORDER pseudo-op is seen.
           *
           * Perhaps what we also want a BARRIER pseudo-op that says
           * no instructions must be moved above or below the barrier.
	   *)
   | REORDER
   | NOREORDER

          (*
           * Constant integral data
           *)
   | INT of {sz : int, i: 'labexp list}
	     
	 (*
          * Strings and zero terminated strings
	  *)
   | ASCII of string
   | ASCIIZ of string

	 (*
          * Constant real data
	  *)
   | FLOAT of {sz : int, f : string list}

	(*
	 * Import and export identifiers
         *)
   | IMPORT of Label.label list
   | EXPORT of Label.label list

	(*
         * Client specific pseudo-ops
	 * All these pseudo-ops must be related to data
	 * and not code!
	 *)
   | EXT of 'ext
end

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