CodeGeneration.CGenState.CGenLongConst C# (CSharp) Method

CGenLongConst() public method

public CGenLongConst ( Int32 val ) : String
val System.Int32
return String
        public String CGenLongConst(Int32 val) {
            String name = ".LC" + this.rodata_idx;
            this.rodata.WriteLine("    .align 4");
            this.rodata.WriteLine(name + ":");
            this.rodata.WriteLine("    .long " + val);
            this.rodata_idx++;
            return name;
        }

Usage Example

示例#1
0
 /// <summary>
 /// flds addr
 /// </summary>
 public override Reg CGenValue(CGenState state) {
     byte[] bytes = BitConverter.GetBytes(this.Value);
     Int32 intval = BitConverter.ToInt32(bytes, 0);
     String name = state.CGenLongConst(intval);
     state.FLDS(name);
     return Reg.ST0;
 }