Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/hppa/hppa.mdl
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/hppa/hppa.mdl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 796, Tue Mar 6 00:04:33 2001 UTC revision 1033, Thu Jan 24 05:45:18 2002 UTC
# Line 70  Line 70 
70        fun %% l = (l : #32 bits)        fun %% l = (l : #32 bits)
71    
72        rtl NOP{} = ()        rtl NOP{} = ()
       (* rtl COPY{dst,src} = $r[forall dst] := $r[forall src]  
       rtl FCOPY{dst,src} = $f[forall dst] := $f[forall src] *)  
73    
74        (* Integer loads *)        (* Integer loads *)
75        (* On the HP, addressing modes can be scaled and/or autoincrement *)        (* On the HP, addressing modes can be scaled and/or autoincrement *)
# Line 544  Line 542 
542        datatype ea =        datatype ea =
543            Direct of $GP            Direct of $GP
544          | FDirect of $GP          | FDirect of $GP
545          | Displace of {base: $GP, disp:int}          | Displace of {base: $GP, disp: T.labexp, mem: Region.region}
546    
547        datatype operand =        datatype operand =
548            (* this is used only during instruction selection *)            (* this is used only during instruction selection *)
# Line 555  Line 553 
553          | LOLabExp of T.labexp * field_selector ``<labexp>''          | LOLabExp of T.labexp * field_selector ``<labexp>''
554    
555        datatype addressing_mode =        datatype addressing_mode =
556          DISPea of C.cell * operand    (* displacement *)          DISPea of CellsBasis.cell * operand               (* displacement *)
557        | INDXea of C.cell * C.cell       (* indexed *)        | INDXea of CellsBasis.cell * CellsBasis.cell       (* indexed *)
558        | INDXSCALEDea of C.cell * C.cell (* indexed with scaling (b,x) *)        | INDXSCALEDea of CellsBasis.cell * CellsBasis.cell (* indexed with scaling (b,x) *)
559    
560     end  (* Instruction *)     end  (* Instruction *)
561    
# Line 643  Line 641 
641      *========================================================================*)      *========================================================================*)
642     structure MC =     structure MC =
643     struct     struct
644        val zeroR = Option.valOf(C.zeroReg C.GP)        val zeroR = Option.valOf(C.zeroReg CellsBasis.GP)
645        fun opn opnd =        fun opn opnd =
646        let fun hi21 n  = (itow n) >> 0w11        let fun hi21 n  = (itow n) >> 0w11
647            fun hi21X n = (itow n) ~>> 0w11            fun hi21X n = (itow n) ~>> 0w11
648            fun lo11 n  = (itow n) && 0wx7ff            fun lo11 n  = (itow n) && 0wx7ff
649            (* BUG: should respect the field selectors instead of ignoring them *)            (* BUG: should respect the field selectors instead of ignoring them *)
650        in  case opnd of        in  case opnd of
651              I.HILabExp(lexp, _) => hi21X(LabelExp.valueOf lexp)              I.HILabExp(lexp, _) => hi21X(MLTreeEval.valueOf lexp)
652            | I.LOLabExp(lexp, _) => lo11(LabelExp.valueOf lexp)            | I.LOLabExp(lexp, _) => lo11(MLTreeEval.valueOf lexp)
653            | I.LabExp(lexp, _)   => itow(LabelExp.valueOf lexp)            | I.LabExp(lexp, _)   => itow(MLTreeEval.valueOf lexp)
654            | I.IMMED i           => itow i            | I.IMMED i           => itow i
655            | I.REG _             => error "REG"            | I.REG _             => error "REG"
656        end        end
# Line 969  Line 967 
967                   Label.setAddr(tmpLab, !loc+4);                   Label.setAddr(tmpLab, !loc+4);
968                   branchLink(0wx3a,tmp,tmpLab,0w0,n);                   branchLink(0wx3a,tmp,tmpLab,0w0,n);
969                   LongImmed{Op=0wxa,r=tmp,                   LongImmed{Op=0wxa,r=tmp,
970                             im21=assemble_21(itow(LabelExp.valueOf offset))};                             im21=assemble_21(itow(MLTreeEval.valueOf offset))};
971                   BranchVectored{Op=0wx3a,t=tmp,x=zeroR,ext3=0w6,n=n}                   BranchVectored{Op=0wx3a,t=tmp,x=zeroR,ext3=0w6,n=n}
972               end               end
973          rtl: ``B''          rtl: ``B''
# Line 1015  Line 1013 
1013                mem:Region.region}                mem:Region.region}
1014          asm: ``ble\t<d>(<emit_int sr>,<b>)<mem><          asm: ``ble\t<d>(<emit_int sr>,<b>)<mem><
1015                 emit_defs(defs)><emit_uses(uses)><emit_cutsTo cutsTo>''                 emit_defs(defs)><emit_uses(uses)><emit_cutsTo cutsTo>''
1016          mc:  (case (d,C.registerId t) of          mc:  (case (d,CellsBasis.registerId t) of
1017                 (I.IMMED 0,31) =>                 (I.IMMED 0,31) =>
1018                   BranchExternal{Op=0wx39,b=b,w1=0w0,s=assemble_3(itow sr),                   BranchExternal{Op=0wx39,b=b,w1=0w0,s=assemble_3(itow sr),
1019                                  w2=0w0,n=true,w=0w0}                                  w2=0w0,n=true,w=0w0}
# Line 1160  Line 1158 
1158          rtl: ``NOP''          rtl: ``NOP''
1159          pipeline: NOP          pipeline: NOP
1160    
     | COPY of {dst: $GP list, src: $GP list,  
                impl:instruction list option ref, tmp: ea option}  
         asm: emitInstrs (Shuffle.shuffle{tmp,src,dst})  
         rtl: ``COPY''  
         pipeline: ARITH  
   
     | FCOPY of {dst: $FP list, src: $FP list,  
                 impl:instruction list option ref, tmp: ea option}  
         asm: emitInstrs (Shuffle.shufflefp{tmp,src,dst})  
         rtl: ``FCOPY''  
         pipeline: ARITH  
   
     | ANNOTATION of {i:instruction, a:Annotations.annotation}  
         asm: (comment(Annotations.toString a); nl(); emitInstr i)  
         mc:  emitInstr i  
         (* rtl: [[ #i ]] *)  
   
1161      | SOURCE of {}      | SOURCE of {}
1162          asm: ``source''          asm: ``source''
1163          mc:  ()          mc:  ()

Legend:
Removed from v.796  
changed lines
  Added in v.1033

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