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/branches/idlbasis-devel/src/MLRISC/ppc/emit/ppcMC.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/MLRISC/ppc/emit/ppcMC.sml

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

revision 858, Wed Jun 27 21:20:27 2001 UTC revision 859, Wed Jun 27 21:43:12 2001 UTC
# Line 49  Line 49 
49         in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end         in loc := i + 1; CodeString.update(i,Word8.fromLargeWord w) end
50    
51         fun doNothing _ = ()         fun doNothing _ = ()
52           fun getAnnotations () = error "getAnnotations"
53    
54         fun pseudoOp pOp = P.emitValue{pOp=pOp, loc= !loc,emit=eByte}         fun pseudoOp pOp = P.emitValue{pOp=pOp, loc= !loc,emit=eByte}
55    
# Line 432  Line 433 
433            let            let
434  (*#line 423.12 "ppc/ppc.mdl"*)  (*#line 423.12 "ppc/ppc.mdl"*)
435                val (opcd, xo) = oper                val (opcd, xo) = oper
436            in x_form {opcd=opcd, rt=ft, ra=0wx0, rb=fb, xo=xo, rc=Rc}            in
437                 (case oper of
438                   (0wx3f, 0wx16) => a_form {opcd=opcd, frt=ft, fra=0wx0, frb=fb,
439                      frc=0wx0, xo=xo, rc=Rc}
440                 | (0wx3b, 0wx16) => a_form {opcd=opcd, frt=ft, fra=0wx0, frb=fb,
441                      frc=0wx0, xo=xo, rc=Rc}
442                 | _ => x_form {opcd=opcd, rt=ft, ra=0wx0, rb=fb, xo=xo, rc=Rc}
443                 )
444            end            end
445         end         end
446     and farith {oper, ft, fa, fb, Rc} =     and farith {oper, ft, fa, fb, Rc} =
# Line 441  Line 449 
449             val fb = emit_FP fb             val fb = emit_FP fb
450         in         in
451            let            let
452  (*#line 429.12 "ppc/ppc.mdl"*)  (*#line 436.12 "ppc/ppc.mdl"*)
453                val (opcd, xo) = emit_farith oper                val (opcd, xo) = emit_farith oper
454            in            in
455               (case oper of               (case oper of
# Line 460  Line 468 
468             val fb = emit_FP fb             val fb = emit_FP fb
469         in         in
470            let            let
471  (*#line 438.12 "ppc/ppc.mdl"*)  (*#line 445.12 "ppc/ppc.mdl"*)
472                val (opcd, xo) = oper                val (opcd, xo) = oper
473            in a_form {opcd=opcd, frt=ft, fra=fa, frb=fb, frc=fc, xo=xo, rc=Rc}            in a_form {opcd=opcd, frt=ft, fra=fa, frb=fb, frc=fc, xo=xo, rc=Rc}
474            end            end
475         end         end
476     and cr_bit {cc} =     and cr_bit {cc} =
477         let         let
478  (*#line 443.12 "ppc/ppc.mdl"*)  (*#line 450.12 "ppc/ppc.mdl"*)
479             val (cr, bit) = cc             val (cr, bit) = cc
480         in ((emit_CC cr) << 0wx2) + (itow         in ((emit_CC cr) << 0wx2) + (itow
481            (case bit of            (case bit of
# Line 670  Line 678 
678            )            )
679         end         end
680    
681  (*#line 533.7 "ppc/ppc.mdl"*)  (*#line 540.7 "ppc/ppc.mdl"*)
682     fun relative (I.LabelOp lexp) = (itow ((LabelExp.valueOf lexp) - ( ! loc))) ~>> 0wx2     fun relative (I.LabelOp lexp) = (itow ((LabelExp.valueOf lexp) - ( ! loc))) ~>> 0wx2
683       | relative _ = error "relative"       | relative _ = error "relative"
684         fun emitter instr =         fun emitter instr =
# Line 712  Line 720 
720       | emitInstr (I.BCLR{bo, bf, bit, LK, labels}) = bclr {bo=bo, bi=cr_bit {cc=(bf,       | emitInstr (I.BCLR{bo, bf, bit, LK, labels}) = bclr {bo=bo, bi=cr_bit {cc=(bf,
721            bit)}, lk=LK}            bit)}, lk=LK}
722       | emitInstr (I.B{addr, LK}) = b {li=relative addr, aa=false, lk=LK}       | emitInstr (I.B{addr, LK}) = b {li=relative addr, aa=false, lk=LK}
723       | emitInstr (I.CALL{def, use, mem}) = bclr {bo=I.ALWAYS, bi=0wx0, lk=true}       | emitInstr (I.CALL{def, use, cutsTo, mem}) = bclr {bo=I.ALWAYS, bi=0wx0,
724              lk=true}
725       | emitInstr (I.COPY{dst, src, impl, tmp}) = error "COPY"       | emitInstr (I.COPY{dst, src, impl, tmp}) = error "COPY"
726       | emitInstr (I.FCOPY{dst, src, impl, tmp}) = error "FCOPY"       | emitInstr (I.FCOPY{dst, src, impl, tmp}) = error "FCOPY"
727       | emitInstr (I.ANNOTATION{i, a}) = emitInstr i       | emitInstr (I.ANNOTATION{i, a}) = emitInstr i
# Line 731  Line 740 
740                  entryLabel=doNothing,                  entryLabel=doNothing,
741                  comment=doNothing,                  comment=doNothing,
742                  exitBlock=doNothing,                  exitBlock=doNothing,
743                  annotation=doNothing                  annotation=doNothing,
744                    getAnnotations=getAnnotations
745                 }                 }
746     end     end
747  end  end

Legend:
Removed from v.858  
changed lines
  Added in v.859

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