Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for constBool (0.29 sec)

  1. src/cmd/compile/internal/ssa/func_test.go

    	f := c.Fun("entry",
    		Bloc("entry",
    			Valu("mem", OpInitMem, types.TypeMem, 0, nil),
    			Exit("mem")))
    	v1 := f.f.ConstBool(c.config.Types.Bool, false)
    	v2 := f.f.ConstBool(c.config.Types.Bool, true)
    	f.f.freeValue(v1)
    	f.f.freeValue(v2)
    	v3 := f.f.ConstBool(c.config.Types.Bool, false)
    	v4 := f.f.ConstBool(c.config.Types.Bool, true)
    	if v3.AuxInt != 0 {
    		t.Errorf("expected %s to have auxint of 0\n", v3.LongString())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:01:04 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/func.go

    const (
    	constSliceMagic       = 1122334455
    	constInterfaceMagic   = 2233445566
    	constNilMagic         = 3344556677
    	constEmptyStringMagic = 4455667788
    )
    
    // ConstBool returns an int constant representing its argument.
    func (f *Func) ConstBool(t *types.Type, c bool) *Value {
    	i := int64(0)
    	if c {
    		i = 1
    	}
    	return f.constVal(OpConstBool, t, i, true)
    }
    func (f *Func) ConstInt8(t *types.Type, c int8) *Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/_gen/LOONG64.rules

    (NeqB ...) => (XOR ...)
    (Not x) => (XORconst [1] x)
    
    // constants
    (Const(64|32|16|8) [val]) => (MOVVconst [int64(val)])
    (Const(32|64)F [val]) => (MOV(F|D)const [float64(val)])
    (ConstNil) => (MOVVconst [0])
    (ConstBool [t]) => (MOVVconst [int64(b2i(t))])
    
    (Slicemask <t> x) => (SRAVconst (NEGV <t> x) [63])
    
    // truncations
    // Because we ignore high parts of registers, truncates are just copies.
    (Trunc16to8 ...) => (Copy ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 19:26:25 UTC 2023
    - 31.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/_gen/RISCV64.rules

    (Const(64|32|16|8) [val]) => (MOVDconst [int64(val)])
    (Const32F [val]) => (FMVSX (MOVDconst [int64(math.Float32bits(val))]))
    (Const64F [val]) => (FMVDX (MOVDconst [int64(math.Float64bits(val))]))
    (ConstNil) => (MOVDconst [0])
    (ConstBool [val]) => (MOVDconst [int64(b2i(val))])
    
    (Addr {sym} base) => (MOVaddr {sym} [0] base)
    (LocalAddr <t> {sym} base mem) && t.Elem().HasPointers() => (MOVaddr {sym} (SPanchored base mem))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 14:57:07 UTC 2024
    - 40.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/MIPS64.rules

    (NeqB ...) => (XOR ...)
    (Not x) => (XORconst [1] x)
    
    // constants
    (Const(64|32|16|8) [val]) => (MOVVconst [int64(val)])
    (Const(32|64)F [val]) => (MOV(F|D)const [float64(val)])
    (ConstNil) => (MOVVconst [0])
    (ConstBool [t]) => (MOVVconst [int64(b2i(t))])
    
    (Slicemask <t> x) => (SRAVconst (NEGV <t> x) [63])
    
    // truncations
    // Because we ignore high parts of registers, truncates are just copies.
    (Trunc16to8 ...) => (Copy ...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 03:59:48 UTC 2023
    - 41.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	// arg0=ptr/int arg1=mem, output=int/ptr
    	{name: "Convert", argLength: 2, zeroWidth: true, resultInArg0: true},
    
    	// constants. Constant values are stored in the aux or
    	// auxint fields.
    	{name: "ConstBool", aux: "Bool"},     // auxint is 0 for false and 1 for true
    	{name: "ConstString", aux: "String"}, // value is aux.(string)
    	{name: "ConstNil", typ: "BytePtr"},   // nil pointer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top