PreviousUpNext

15.4.375  src/lib/compiler/back/low/sparc32/code/machcode-sparc32-g.codemade.pkg

## machcode-sparc32-g.codemade.pkg
#
# This file generated at   2013-04-15:13:05:35   by
#
#     src/lib/compiler/back/low/tools/arch/make-sourcecode-for-machcode-xxx-package.pkg
#
# from the architecture description file
#
#     src/lib/compiler/back/low/sparc32/sparc32.architecture-description
#
# Edits to this file will be LOST on next system rebuild.

# Compiled by:
#     src/lib/compiler/back/low/sparc32/backend-sparc32.lib


# We are invoked from:
#
#     src/lib/compiler/back/low/main/sparc32/backend-lowhalf-sparc32.pkg

stipulate
    package lbl =  codelabel;                                           # codelabel             is from   src/lib/compiler/back/low/code/codelabel.pkg
    package nt  =  note;                                                        # note                          is from   src/lib/src/note.pkg
    package rkj =  registerkinds_junk;                                          # registerkinds_junk            is from   src/lib/compiler/back/low/code/registerkinds-junk.pkg
herein
                                                                                # Treecode_Form                 is from   src/lib/compiler/back/low/treecode/treecode-form.api

    generic package machcode_sparc32_g (
        #
        tcf: Treecode_Form
    )
    : (weak) Machcode_Sparc32
    {
                                                                                # Machcode_Sparc32              is from   src/lib/compiler/back/low/sparc32/code/machcode-sparc32.codemade.api
        # Export to client packages:
        #
        package tcf =  tcf;
        package rgn =  tcf::rgn;                                                # "rgn" == "region".
        package lac =  tcf::lac;                                                # "lac" == "late_constant".
        package rgk =  registerkinds_sparc32;                                   # registerkinds_sparc32 is from   src/lib/compiler/back/low/sparc32/code/registerkinds-sparc32.codemade.pkg
        
        
        Load = LDSB
             | LDSH
             | LDUB
             | LDUH
             | LD
             | LDX
             | LDD
             ;

        Store = STB
              | STH
              | ST
              | STX
              | STD
              ;

        Fload = LDF
              | LDDF
              | LDQF
              | LDFSR
              | LDXFSR
              ;

        Fstore = STF
               | STDF
               | STFSR
               ;

        Arith = AND
              | ANDCC
              | ANDN
              | ANDNCC
              | OR
              | ORCC
              | ORN
              | ORNCC
              | XOR
              | XORCC
              | XNOR
              | XNORCC
              | ADD
              | ADDCC
              | TADD
              | TADDCC
              | TADDTV
              | TADDTVCC
              | SUB
              | SUBCC
              | TSUB
              | TSUBCC
              | TSUBTV
              | TSUBTVCC
              | UMUL
              | UMULCC
              | SMUL
              | SMULCC
              | UDIV
              | UDIVCC
              | SDIV
              | SDIVCC
              | MULX
              | SDIVX
              | UDIVX
              ;

        Shift = SLL
              | SRL
              | SRA
              | SLLX
              | SRLX
              | SRAX
              ;

        Farith1 = FITOS
                | FITOD
                | FITOQ
                | FSTOI
                | FDTOI
                | FQTOI
                | FSTOD
                | FSTOQ
                | FDTOS
                | FDTOQ
                | FQTOS
                | FQTOD
                | FMOVS
                | FNEGS
                | FABSS
                | FMOVD
                | FNEGD
                | FABSD
                | FMOVQ
                | FNEGQ
                | FABSQ
                | FSQRTS
                | FSQRTD
                | FSQRTQ
                ;

        Farith2 = FADDS
                | FADDD
                | FADDQ
                | FSUBS
                | FSUBD
                | FSUBQ
                | FMULS
                | FMULD
                | FMULQ
                | FSMULD
                | FDMULQ
                | FDIVS
                | FDIVD
                | FDIVQ
                ;

        Fcmp = FCMPS
             | FCMPD
             | FCMPQ
             | FCMPES
             | FCMPED
             | FCMPEQ
             ;

        Branch = BN
               | BE
               | BLE
               | BL
               | BLEU
               | BCS
               | BNEG
               | BVS
               | BA
               | BNE
               | BG
               | BGE
               | BGU
               | BCC
               | BPOS
               | BVC
               ;

        Rcond = RZ
              | RLEZ
              | RLZ
              | RNZ
              | RGZ
              | RGEZ
              ;

        Cc = ICC
           | XCC
           ;

        Prediction = PT
                   | PN
                   ;

        Fbranch = FBN
                | FBNE
                | FBLG
                | FBUL
                | FBL
                | FBUG
                | FBG
                | FBU
                | FBA
                | FBE
                | FBUE
                | FBGE
                | FBUGE
                | FBLE
                | FBULE
                | FBO
                ;

        Effective_Address = DIRECT      rkj::Codetemp_Info
                          | FDIRECT     rkj::Codetemp_Info
                          | DISPLACE { base: rkj::Codetemp_Info, 
                                       disp: tcf::Label_Expression, 
                                       ramregion: rgn::Ramregion
                                     }

                          ;

        Fsize = SS
              | DD
              | QQ
              ;

        Operand = REG   rkj::Codetemp_Info
                | IMMED Int
                | LAB   tcf::Label_Expression
                | LO    tcf::Label_Expression
                | HI    tcf::Label_Expression
                ;

        Addressing_Mode = (rkj::Codetemp_Info, Operand);
        Base_Op = LOAD { l: Load, 
                         d: rkj::Codetemp_Info, 
                         r: rkj::Codetemp_Info, 
                         i: Operand, 
                         ramregion: rgn::Ramregion
                       }

                | STORE { s: Store, 
                          d: rkj::Codetemp_Info, 
                          r: rkj::Codetemp_Info, 
                          i: Operand, 
                          ramregion: rgn::Ramregion
                        }

                | FLOAD { l: Fload, 
                          r: rkj::Codetemp_Info, 
                          i: Operand, 
                          d: rkj::Codetemp_Info, 
                          ramregion: rgn::Ramregion
                        }

                | FSTORE { s: Fstore, 
                           d: rkj::Codetemp_Info, 
                           r: rkj::Codetemp_Info, 
                           i: Operand, 
                           ramregion: rgn::Ramregion
                         }

                | UNIMP { const22: Int }
                | SETHI { i: Int, 
                          d: rkj::Codetemp_Info
                        }

                | ARITH { a: Arith, 
                          r: rkj::Codetemp_Info, 
                          i: Operand, 
                          d: rkj::Codetemp_Info
                        }

                | SHIFT { s: Shift, 
                          r: rkj::Codetemp_Info, 
                          i: Operand, 
                          d: rkj::Codetemp_Info
                        }

                | MOVICC { b: Branch, 
                           i: Operand, 
                           d: rkj::Codetemp_Info
                         }

                | MOVFCC { b: Fbranch, 
                           i: Operand, 
                           d: rkj::Codetemp_Info
                         }

                | MOVR { rcond: Rcond, 
                         r: rkj::Codetemp_Info, 
                         i: Operand, 
                         d: rkj::Codetemp_Info
                       }

                | FMOVICC { size: Fsize, 
                            b: Branch, 
                            r: rkj::Codetemp_Info, 
                            d: rkj::Codetemp_Info
                          }

                | FMOVFCC { size: Fsize, 
                            b: Fbranch, 
                            r: rkj::Codetemp_Info, 
                            d: rkj::Codetemp_Info
                          }

                | BICC { b: Branch, 
                         a: Bool, 
                         label: lbl::Codelabel, 
                         nop: Bool
                       }

                | FBFCC { b: Fbranch, 
                          a: Bool, 
                          label: lbl::Codelabel, 
                          nop: Bool
                        }

                | BR { rcond: Rcond, 
                       p: Prediction, 
                       r: rkj::Codetemp_Info, 
                       a: Bool, 
                       label: lbl::Codelabel, 
                       nop: Bool
                     }

                | BP { b: Branch, 
                       p: Prediction, 
                       cc: Cc, 
                       a: Bool, 
                       label: lbl::Codelabel, 
                       nop: Bool
                     }

                | JMP { r: rkj::Codetemp_Info, 
                        i: Operand, 
                        labs: List( lbl::Codelabel ), 
                        nop: Bool
                      }

                | JMPL { r: rkj::Codetemp_Info, 
                         i: Operand, 
                         d: rkj::Codetemp_Info, 
                         defs: rgk::Codetemplists, 
                         uses: rgk::Codetemplists, 
                         cuts_to: List( lbl::Codelabel ), 
                         nop: Bool, 
                         ramregion: rgn::Ramregion
                       }

                | CALL { defs: rgk::Codetemplists, 
                         uses: rgk::Codetemplists, 
                         label: lbl::Codelabel, 
                         cuts_to: List( lbl::Codelabel ), 
                         nop: Bool, 
                         ramregion: rgn::Ramregion
                       }

                | TICC { t: Branch, 
                         cc: Cc, 
                         r: rkj::Codetemp_Info, 
                         i: Operand
                       }

                | FPOP1 { a: Farith1, 
                          r: rkj::Codetemp_Info, 
                          d: rkj::Codetemp_Info
                        }

                | FPOP2 { a: Farith2, 
                          r1: rkj::Codetemp_Info, 
                          r2: rkj::Codetemp_Info, 
                          d: rkj::Codetemp_Info
                        }

                | FCMP { cmp: Fcmp, 
                         r1: rkj::Codetemp_Info, 
                         r2: rkj::Codetemp_Info, 
                         nop: Bool
                       }

                | SAVE { r: rkj::Codetemp_Info, 
                         i: Operand, 
                         d: rkj::Codetemp_Info
                       }

                | RESTORE { r: rkj::Codetemp_Info, 
                            i: Operand, 
                            d: rkj::Codetemp_Info
                          }

                | RDY { d: rkj::Codetemp_Info }
                | WRY { r: rkj::Codetemp_Info, 
                        i: Operand
                      }

                | RET { leaf: Bool, 
                        nop: Bool
                      }

                | SOURCE { }
                | SINK { }
                | PHI { }
                ;

        Machine_Op
          = LIVE  { regs: rgk::Codetemplists,   spilled: rgk::Codetemplists }
          | DEAD  { regs: rgk::Codetemplists,   spilled: rgk::Codetemplists }
          #
          | COPY  { kind:               rkj::Registerkind,
                    size_in_bits:       Int,
                    dst:                List( rkj::Codetemp_Info ),
                    src:                List( rkj::Codetemp_Info ),
                    tmp:                Null_Or( Effective_Address )                    # NULL if |dst| == |src| == 1
                  }
          #
          | NOTE  { op:         Machine_Op,
                    note:               nt::Note
                  }
          #
          | BASE_OP  Base_Op
          ;
        
        load = BASE_OP o LOAD;
        store = BASE_OP o STORE;
        fload = BASE_OP o FLOAD;
        fstore = BASE_OP o FSTORE;
        unimp = BASE_OP o UNIMP;
        sethi = BASE_OP o SETHI;
        arith = BASE_OP o ARITH;
        shift = BASE_OP o SHIFT;
        movicc = BASE_OP o MOVICC;
        movfcc = BASE_OP o MOVFCC;
        movr = BASE_OP o MOVR;
        fmovicc = BASE_OP o FMOVICC;
        fmovfcc = BASE_OP o FMOVFCC;
        bicc = BASE_OP o BICC;
        fbfcc = BASE_OP o FBFCC;
        br = BASE_OP o BR;
        bp = BASE_OP o BP;
        jmp = BASE_OP o JMP;
        jmpl = BASE_OP o JMPL;
        call = BASE_OP o CALL;
        ticc = BASE_OP o TICC;
        fpop1 = BASE_OP o FPOP1;
        fpop2 = BASE_OP o FPOP2;
        fcmp = BASE_OP o FCMP;
        save = BASE_OP o SAVE;
        restore = BASE_OP o RESTORE;
        rdy = BASE_OP o RDY;
        wry = BASE_OP o WRY;
        ret = BASE_OP o RET;
        source = BASE_OP o SOURCE;
        sink = BASE_OP o SINK;
        phi = BASE_OP o PHI;
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext