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 775, Fri Jan 12 01:17:51 2001 UTC revision 984, Wed Nov 21 19:00:08 2001 UTC
# Line 555  Line 555 
555          | LOLabExp of T.labexp * field_selector ``<labexp>''          | LOLabExp of T.labexp * field_selector ``<labexp>''
556    
557        datatype addressing_mode =        datatype addressing_mode =
558          DISPea of C.cell * operand    (* displacement *)          DISPea of CellsBasis.cell * operand               (* displacement *)
559        | INDXea of C.cell * C.cell       (* indexed *)        | INDXea of CellsBasis.cell * CellsBasis.cell       (* indexed *)
560        | INDXSCALEDea of C.cell * C.cell (* indexed with scaling (b,x) *)        | INDXSCALEDea of CellsBasis.cell * CellsBasis.cell (* indexed with scaling (b,x) *)
561    
562     end  (* Instruction *)     end  (* Instruction *)
563    
# Line 643  Line 643 
643      *========================================================================*)      *========================================================================*)
644     structure MC =     structure MC =
645     struct     struct
646        val zeroR = Option.valOf(C.zeroReg C.GP)        val zeroR = Option.valOf(C.zeroReg CellsBasis.GP)
647        fun opn opnd =        fun opn opnd =
648        let fun hi21 n  = (itow n) >> 0w11        let fun hi21 n  = (itow n) >> 0w11
649            fun hi21X n = (itow n) ~>> 0w11            fun hi21X n = (itow n) ~>> 0w11
650            fun lo11 n  = (itow n) && 0wx7ff            fun lo11 n  = (itow n) && 0wx7ff
651            (* BUG: should respect the field selectors instead of ignoring them *)            (* BUG: should respect the field selectors instead of ignoring them *)
652        in  case opnd of        in  case opnd of
653              I.HILabExp(lexp, _) => hi21X(LabelExp.valueOf lexp)              I.HILabExp(lexp, _) => hi21X(MLTreeEval.valueOf lexp)
654            | I.LOLabExp(lexp, _) => lo11(LabelExp.valueOf lexp)            | I.LOLabExp(lexp, _) => lo11(MLTreeEval.valueOf lexp)
655            | I.LabExp(lexp, _)   => itow(LabelExp.valueOf lexp)            | I.LabExp(lexp, _)   => itow(MLTreeEval.valueOf lexp)
656            | I.IMMED i           => itow i            | I.IMMED i           => itow i
657            | I.REG _             => error "REG"            | I.REG _             => error "REG"
658        end        end
# Line 969  Line 969 
969                   Label.setAddr(tmpLab, !loc+4);                   Label.setAddr(tmpLab, !loc+4);
970                   branchLink(0wx3a,tmp,tmpLab,0w0,n);                   branchLink(0wx3a,tmp,tmpLab,0w0,n);
971                   LongImmed{Op=0wxa,r=tmp,                   LongImmed{Op=0wxa,r=tmp,
972                             im21=assemble_21(itow(LabelExp.valueOf offset))};                             im21=assemble_21(itow(MLTreeEval.valueOf offset))};
973                   BranchVectored{Op=0wx3a,t=tmp,x=zeroR,ext3=0w6,n=n}                   BranchVectored{Op=0wx3a,t=tmp,x=zeroR,ext3=0w6,n=n}
974               end               end
975          rtl: ``B''          rtl: ``B''
# Line 1003  Line 1003 
1003          pipeline: BRANCH          pipeline: BRANCH
1004    
1005      | BL of {lab:Label.label ,t: $GP, defs: $cellset, uses: $cellset,      | BL of {lab:Label.label ,t: $GP, defs: $cellset, uses: $cellset,
1006               mem:Region.region, n:bool}               cutsTo: Label.label list, mem:Region.region, n:bool}
1007          asm: ``bl<n>\t<lab>, <t><mem><emit_defs(defs)><emit_uses(uses)>''          asm: ``bl<n>\t<lab>, <t><mem><emit_defs(defs)><emit_uses(uses)><emit_cutsTo cutsTo>''
1008          mc:  branchLink(0wx3a,t,lab,0w0,n)          mc:  branchLink(0wx3a,t,lab,0w0,n)
1009          nullified: n = true          nullified: n = true
1010          delayslot candidate: false          delayslot candidate: false
1011          pipeline: BRANCH          pipeline: BRANCH
1012    
1013      | BLE of {d:operand,b: $GP, sr:int, t: $GP,      | BLE of {d:operand,b: $GP, sr:int, t: $GP,
1014                defs: $cellset, uses: $cellset, mem:Region.region}                defs: $cellset, uses: $cellset, cutsTo: Label.label list,
1015                  mem:Region.region}
1016          asm: ``ble\t<d>(<emit_int sr>,<b>)<mem><          asm: ``ble\t<d>(<emit_int sr>,<b>)<mem><
1017                 emit_defs(defs)><emit_uses(uses)>''                 emit_defs(defs)><emit_uses(uses)><emit_cutsTo cutsTo>''
1018          mc:  (case (d,C.registerId t) of          mc:  (case (d,CellsBasis.registerId t) of
1019                 (I.IMMED 0,31) =>                 (I.IMMED 0,31) =>
1020                   BranchExternal{Op=0wx39,b=b,w1=0w0,s=assemble_3(itow sr),                   BranchExternal{Op=0wx39,b=b,w1=0w0,s=assemble_3(itow sr),
1021                                  w2=0w0,n=true,w=0w0}                                  w2=0w0,n=true,w=0w0}

Legend:
Removed from v.775  
changed lines
  Added in v.984

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