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/ppc/emit/ppcMC.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/ppc/emit/ppcMC.sml

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

revision 1545, Wed Jul 14 18:33:15 2004 UTC revision 1546, Wed Jul 14 18:38:08 2004 UTC
# Line 233  Line 233 
233         | (d, I.LWZ) => loadd {opcd=0wx20, rt=rt, ra=ra, d=d}         | (d, I.LWZ) => loadd {opcd=0wx20, rt=rt, ra=ra, d=d}
234         | (de, I.LWZE) => loadde {opcd=0wx3a, rt=rt, ra=ra, de=de, xop=0wx6}         | (de, I.LWZE) => loadde {opcd=0wx3a, rt=rt, ra=ra, de=de, xop=0wx6}
235         | (de, I.LDE) => loadde {opcd=0wx3e, rt=rt, ra=ra, de=de, xop=0wx0}         | (de, I.LDE) => loadde {opcd=0wx3e, rt=rt, ra=ra, de=de, xop=0wx0}
236           | (I.RegOp rb, I.LHAU) => loadx {rt=rt, ra=ra, rb=rb, xop=0wx177}
237           | (I.RegOp rb, I.LHZU) => loadx {rt=rt, ra=ra, rb=rb, xop=0wx137}
238           | (I.RegOp rb, I.LWZU) => loadx {rt=rt, ra=ra, rb=rb, xop=0wx37}
239           | (d, I.LHZU) => loadd {opcd=0wx29, rt=rt, ra=ra, d=d}
240           | (d, I.LWZU) => loadd {opcd=0wx21, rt=rt, ra=ra, d=d}
241         )         )
242     and floadx {ft, ra, rb, xop} =     and floadx {ft, ra, rb, xop} =
243         let val ft = emit_FP ft         let val ft = emit_FP ft
# Line 258  Line 263 
263         | (I.RegOp rb, I.LFSE) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx21f}         | (I.RegOp rb, I.LFSE) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx21f}
264         | (I.RegOp rb, I.LFD) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx257}         | (I.RegOp rb, I.LFD) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx257}
265         | (I.RegOp rb, I.LFDE) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx25f}         | (I.RegOp rb, I.LFDE) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx25f}
266           | (I.RegOp rb, I.LFDU) => floadx {ft=ft, ra=ra, rb=rb, xop=0wx277}
267         | (d, I.LFS) => floadd {ft=ft, ra=ra, d=d, opcd=0wx30}         | (d, I.LFS) => floadd {ft=ft, ra=ra, d=d, opcd=0wx30}
268         | (de, I.LFSE) => floadde {ft=ft, ra=ra, de=de, opcd=0wx3e, xop=0wx4}         | (de, I.LFSE) => floadde {ft=ft, ra=ra, de=de, opcd=0wx3e, xop=0wx4}
269         | (d, I.LFD) => floadd {ft=ft, ra=ra, d=d, opcd=0wx32}         | (d, I.LFD) => floadd {ft=ft, ra=ra, d=d, opcd=0wx32}
270         | (de, I.LFDE) => floadde {ft=ft, ra=ra, de=de, opcd=0wx3e, xop=0wx6}         | (de, I.LFDE) => floadde {ft=ft, ra=ra, de=de, opcd=0wx3e, xop=0wx6}
271           | (d, I.LFDU) => floadd {ft=ft, ra=ra, d=d, opcd=0wx33}
272         )         )
273     and storex {rs, ra, rb, xop} =     and storex {rs, ra, rb, xop} =
274         let val rs = emit_GP rs         let val rs = emit_GP rs
# Line 433  Line 440 
440             val fb = emit_FP fb             val fb = emit_FP fb
441         in         in
442            let            let
443  (*#line 423.12 "ppc/ppc.mdl"*)  (*#line 449.12 "ppc/ppc.mdl"*)
444                val (opcd, xo) = oper                val (opcd, xo) = oper
445            in            in
446               (case oper of               (case oper of
# Line 451  Line 458 
458             val fb = emit_FP fb             val fb = emit_FP fb
459         in         in
460            let            let
461  (*#line 436.12 "ppc/ppc.mdl"*)  (*#line 462.12 "ppc/ppc.mdl"*)
462                val (opcd, xo) = emit_farith oper                val (opcd, xo) = emit_farith oper
463            in            in
464               (case oper of               (case oper of
# Line 470  Line 477 
477             val fb = emit_FP fb             val fb = emit_FP fb
478         in         in
479            let            let
480  (*#line 445.12 "ppc/ppc.mdl"*)  (*#line 471.12 "ppc/ppc.mdl"*)
481                val (opcd, xo) = oper                val (opcd, xo) = oper
482            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}
483            end            end
484         end         end
485     and cr_bit {cc} =     and cr_bit {cc} =
486         let         let
487  (*#line 450.12 "ppc/ppc.mdl"*)  (*#line 476.12 "ppc/ppc.mdl"*)
488             val (cr, bit) = cc             val (cr, bit) = cc
489         in ((emit_CC cr) << 0wx2) + (itow         in ((emit_CC cr) << 0wx2) + (itow
490            (case bit of            (case bit of
# Line 694  Line 701 
701         in eWord32 ((rs << 0wx15) + ((ra << 0wx10) + ((rb << 0wxb) + 0wx7c00012d)))         in eWord32 ((rs << 0wx15) + ((ra << 0wx10) + ((rb << 0wxb) + 0wx7c00012d)))
702         end         end
703    
704  (*#line 546.7 "ppc/ppc.mdl"*)  (*#line 572.7 "ppc/ppc.mdl"*)
705     fun relative (I.LabelOp lexp) = (itow ((MLTreeEval.valueOf lexp) - ( ! loc))) ~>> 0wx2     fun relative (I.LabelOp lexp) = (itow ((MLTreeEval.valueOf lexp) - ( ! loc))) ~>> 0wx2
706       | relative _ = error "relative"       | relative _ = error "relative"
707         fun emitter instr =         fun emitter instr =

Legend:
Removed from v.1545  
changed lines
  Added in v.1546

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