Source file src/cmd/compile/internal/mips64/ggen.go

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package mips64
     6  
     7  import (
     8  	"cmd/compile/internal/objw"
     9  	"cmd/compile/internal/types"
    10  	"cmd/internal/obj"
    11  	"cmd/internal/obj/mips"
    12  )
    13  
    14  func zerorange(pp *objw.Progs, p *obj.Prog, off, cnt int64, _ *uint32) *obj.Prog {
    15  	if cnt%int64(types.PtrSize) != 0 {
    16  		panic("zeroed region not aligned")
    17  	}
    18  
    19  	for cnt != 0 {
    20  		p = pp.Append(p, mips.AMOVV, obj.TYPE_REG, mips.REGZERO, 0, obj.TYPE_MEM, mips.REGSP, off+8)
    21  		cnt -= int64(types.PtrSize)
    22  		off += int64(types.PtrSize)
    23  	}
    24  
    25  	return p
    26  }
    27  
    28  func ginsnop(pp *objw.Progs) *obj.Prog {
    29  	p := pp.Prog(mips.ANOOP)
    30  	return p
    31  }
    32  

View as plain text